Referencing Sub-form field from the main form. ------H E L P

I have a  Form &  Sub-Form

What is the proper syntax to reference a field in the sub-form or visa 
versa.

I tried accessing the field from the subform below:

        :: [Forms].[pagosdet subform3].[fieldname]

but this doesn't seems to work.

I need to put the value of a subform field into a variable and add that 
variable

to a field in the main-form.

Please Help

Thanks.



0
lalexander
5/17/2006 6:58:52 PM
access.conversion 3038 articles. 0 followers. Follow

4 Replies
579 Views

Similar Articles

[PageSpeed] 37

You shouldn't have a space in the subform name.  Change it to 
pagosdet_subform3

Then on your main form create an unbound text box and use this as the 
control source

=pagosdet_subform3!fieldname

Use the  !  to seperate.


-- 
Wayne




"lalexander" wrote:

> I have a  Form &  Sub-Form
> 
> What is the proper syntax to reference a field in the sub-form or visa 
> versa.
> 
> I tried accessing the field from the subform below:
> 
>         :: [Forms].[pagosdet subform3].[fieldname]
> 
> but this doesn't seems to work.
> 
> I need to put the value of a subform field into a variable and add that 
> variable
> 
> to a field in the main-form.
> 
> Please Help
> 
> Thanks.
> 
> 
> 
> 
0
Utf
5/17/2006 7:11:02 PM
lalexander wrote:

>I have a  Form &  Sub-Form
>
>What is the proper syntax to reference a field in the sub-form or visa 
>versa.
>
>I tried accessing the field from the subform below:
>
>        :: [Forms].[pagosdet subform3].[fieldname]
>
>but this doesn't seems to work.
>
>I need to put the value of a subform field into a variable and add that 
>variable to a field in the main-form.


take a look at:
	 http://www.mvps.org/access/forms/frm0031.htm

-- 
Marsh
MVP [MS Access]
0
Marshall
5/17/2006 7:14:18 PM
I'm not sure why you needed to add so many news groups to your question? 
Surely "reports", "externaldata", and others are way off-topic. Please limit 
your question to a single or maybe a couple appropriate news groups.

Try opening Help and typing in "referencing a control on a subform"

-- 
Duane Hookom
MS Access MVP

"lalexander" <lalexander@bsiinsurance.com> wrote in message 
news:ut3jxPeeGHA.3348@TK2MSFTNGP03.phx.gbl...
>I have a  Form &  Sub-Form
>
> What is the proper syntax to reference a field in the sub-form or visa 
> versa.
>
> I tried accessing the field from the subform below:
>
>        :: [Forms].[pagosdet subform3].[fieldname]
>
> but this doesn't seems to work.
>
> I need to put the value of a subform field into a variable and add that 
> variable
>
> to a field in the main-form.
>
> Please Help
>
> Thanks.
>
>
> 


0
Duane
5/17/2006 7:18:21 PM
Wayne,
            Thanks for the reply.

I figured out why it wasn't working.

Seemed like I had another form called Sales that called the subform, so once 
I added that
it worked , was just about to alert the newsgroup to cancel that posting.

I have the subform with spaces as shown below and that worked.  In the 
future I will
bear in mind not to leave spaces in the subform.

Thanks for your quick response.



example: =Forms!SALES![custord subform].Form!DepositAmount

"Wayne-in-Manchester" <WayneinManchester@discussions.microsoft.com> wrote in 
message news:66CFD3D0-18CB-4895-BDD5-360CB111C43A@microsoft.com...
>
> You shouldn't have a space in the subform name.  Change it to
> pagosdet_subform3
>
> Then on your main form create an unbound text box and use this as the
> control source
>
> =pagosdet_subform3!fieldname
>
> Use the  !  to seperate.
>
>
> -- 
> Wayne
>
>
>
>
> "lalexander" wrote:
>
>> I have a  Form &  Sub-Form
>>
>> What is the proper syntax to reference a field in the sub-form or visa
>> versa.
>>
>> I tried accessing the field from the subform below:
>>
>>         :: [Forms].[pagosdet subform3].[fieldname]
>>
>> but this doesn't seems to work.
>>
>> I need to put the value of a subform field into a variable and add that
>> variable
>>
>> to a field in the main-form.
>>
>> Please Help
>>
>> Thanks.
>>
>>
>>
>> 


0
lalexander
5/17/2006 7:26:00 PM
Reply:

Similar Artilces:

E-mail Issues
I have a couple of questions regarding our e-mail server. We are running Windows 2003 SBS, and use the exchange server included for incoming and outgoing e-mail. Incoming appears to operate without any issues, however, the outgoing e-mail is extremely slow for e-mail being sent off of the server. E-mail from one address to another within our domain (ie. on our own server) is instant. My questions are: 1) What would cause such slow outgoing mail that has a destination elsewhere? We recently had to re-install Windows Server, and it seems that this is a new issue. E-mail does get t...

Closing form minimizes entire Ms Access Application
Hello Guys, I have a problem and I hope you can help me. I have 2 forms. Form A and Form B. Form B opena from a link on Form A. I was having a problem with Form B ie it always opened offscreen. I used the following info from a different forum to fix this issue... I created a visible text box, named TxtHoldfocus, with its Left, Width and Height properties each set to 0". Then on the form's, ONOpen event I executed. I think we resolved this in the other forum, right? http://www.accessforums.net/forms/closing-form-minimizes-entire-ms-access-application-3869.html#post12310 ...

Form Help Please
I have a nice clean, useful report except for one thing. No search function. Is there any way to put a search function on a report? If not, I have been unsuccessful using the filter. I have a 157 page report so how can I filter or just "jump" to the page I need? I need to find a certain school district and then print the information on the report for that district. Each district is on its own page in the report, so if I could just go to XYZ district without having to scroll al the way through it would help. Thanks so much!!!!! On Thu, 31 Jan 2008 14:58:06 -0800, Golfinray wrot...

hyperlinks in received e-mails in Outlook
When I click on a hyperlink in a received e-mail in Outlook I get the following box: "This operation has been canceled due to restrictions in effect on this computer. Please contact your system administrator". Please help. See http://www.slipstick.com/problems/link_restrict.htm for the latest information -- Peter Please Reply to Newsgroup for the benefit of others Requests for assistance by email can not and will not be acknowledged. "dhariri" <dhariri@discussions.microsoft.com> wrote in message news:3273FC95-84FE-4A0A-9E8D-EF99A5B1E690@mic...

Lock a field after a certain date
I have an employee attendance calendar where employees will enter vacation days for a given month/year. I am using Access 2003 and I have what I think is a simple question. My users can edit or delete dates. I want to continue this BUT I want to make sure they can't change a past date. IE if they were scheduled to take off 1/12/10 up to 1/12 they can make changes, however on 1/13 the field will be locked and only the administrator can make the change. Any help appreciated. On Tue, 12 Jan 2010 11:47:02 -0800, Lori <Lori@discussions.microsoft.com> wrote: >I ha...

Referencing merged cells
I'm having trouble referencing a merged cell in another workbook. Say I merge cells A1 to C1 in workbook 1. When I make this the active cell, the Name Box says "A1". When I go to another workbook (say, workbook 2), go to cell B1, type "=" and then go to the merged cell and select it, I get 'workbook1'!$A$1:$C$1 as the formula and, of course, the "#VALUE" error. I've successfully tried typing "=sum(" without the quotes hen clicking on the contents of the cell and then adding the ")" and it works O.K. but there should be an easi...

Form Fields
I am creating a data entry form that contains 2 controls: one is a combo box and the other is a list box. I am populating the control box using the .AddItem method (property?) during the Form.Initialize Event and have successfully accomplished this. The list box is intended to be a dynamic list based on whichever choice is selected in the ComboBox. All the data is listed in 2 rows of a single worksheet - PartsList!A:B. Column A contains the Customer Name which would correspond with the value selected in the Combobox and Column B contains the Part Number. I know I could programmical...

Problems removing Form/Subform link using LinkMasterFields
Hi, I'm trying to remove a link between a form and a subform using the following code: Me!subform.LinkMasterFields = "" Me!subform.LinkChildFields = "" The result is the error code: You canceled the previous operation (run- time error 2001). Don't know what is wrong. I also tried: Me!subform.LinkMasterFields = Null Me!subform.LinkChildFields = Null but that gave me a different error message. FYI, I have access 2003. Thanks, Daniel ...

Referencing another field if result is N/A
Hello, I have a situation where I am referencing data on another workbook. The reason behind this is the data in Column H can be entered incorrectly and often is. I am able to prevent this going forward but can not do so for the items already entered. I enter a formula via VBA, however, sometimes the result will be #N/A and if so I would prefer to leave the old value and just highlight it that it needs to be verified by hand. I am not sure if I can just "leave" the value as it has pretty much already been replaced. Due to this, I copy the column to a different colum...

How does on stop countless repetitions of e-mails please?
Over the past two days I have received several repetitions of e-mails. Some are repeated three or four times and there are about 300 messages at a time. I have, however, not received e-mails for today, 28th Septembere. Type of server used is? If POP3 do you leave messages on the server? Version of Outlook is? Do you have any email antivirus integration enabled? -- Bill R "Nick." <Nick.@discussions.microsoft.com> wrote in message news:45385CE5-38DD-4024-B9FE-C96E1BC8D30D@microsoft.com... > Over the past two days I have received several repetitions of e-mails. > Some...

sizing forms; STAY !
I have ,sadly, a customer who really cares about the size of the forms - and worse , cares about extra "gray area" after the last fields are shown I've tried me.width = #### and I tried setting it in properties. and I've tried dragging it larger. Nothing works - the form goes back to what it want to be - Any way to make a form stay the size its told ? On Wed, 26 Sep 2007 17:55:59 -0400, barret bonden wrote: > I have ,sadly, a customer who really cares about the size of the forms - > and worse , cares about extra "gray area" after the last > f...

my brain not comprehending the yes/no field
I have a db that enters orders. The "product" (insurance plan) has one price but 20 different "attributes" in any combo of one choice to many (plan types like medical, dental etc...) and with one "price" (premium). The plan types must show up on one line in a report with one price (they are not deliminated per plan type). The easiest way for personnel to enter all the plan types would be yes/no check boxes on the input form. My problem is I can't figure out how to make those "yes"es equal the plan name in the report! I know, it's proba...

A/P Batches not posting properly
I have two batches that I attempted to posted but instead of posting through to the G/L they show up under Transactions>>Financial>>General. When I tried to send them through from there, they ended up in Batch Recovery. When I select them in Batch Recovery, they go back to Transactions>>Financial>>General again. What can be done to allow these batches to post? There is probably an issue with the transactions in these batches that you need to correct before posting them. Usually it's something like a closed fiscal period or a missing account number (much ...

Sub-query
I have an orders table with several thousand orders. Each order has a Product_Id and a SubProduct_Id. I want to create a query that lists each Product_Id and the number of different SubProduct_Id's associated with it. I can figure out how to do this in 2 queries, but it seems like it should be possible to do it in one. Dear Jim: You can use a subquery. It might look something like this: SELECT P.Product_Id, COUNT(*) AS Ct FROM Products P LEFT JOIN SubProducts S ON S.Product_Id = P.Product_Id FROUP BY P.Product_Id Here are some details about the above: - The LEFT...

Switchboards and Forms
I have created a switchboard which calls up several forms. When I click on the button it brings up the form but the switch stays where it is on top of the new form. How do I get the switchboard to get out of the way automatically? Then, Once I have done with the form I have a button that closes that form but it doesnt bring the switchboard back up. How do you get the closing form to hand control back to the switchboard? Open the switchboard form in design view and bring up its properties. Go to the Other tab and make sure that both Pop Up and Modal are set to No. To force the issue, yo...

Form flashing
Hi- I have two forms. One is a datasheet view, the other a single form view, of pretty much the same data. When a user double-clicks a field in the datasheet view, the idea is that it will go to the single form with tabs, allowing the user to see all the data in a much more user friendly display. However, the first time I click on the field, the form flashes continuously until I CTRL+ALT+DEL to start the Windows Task manager to break the process. Once I do this, everytime after, I don't experience the problem. I tried inserting Debug.Print statements to find out where...

activies need to roll up from sub-accounts to accounts
activities associated with an account need to rollup through all parent accounts above. Jerry http://www.iBizInitiatives.com ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrowser/en-us/default.mspx?m...

Paper forms to Access
Hello, I have roughly 1000 paper forms hand filled out in the field for over a 30 year time span. I have started an Access data base to work with this data but the data input process is prohibatively time consuming. I am considering process where I would create a form in Access then scan the paper form and use it as a background under the Access form. I would then retype the data (numbers in boxes). The problem is that I have to open design form and insert each scanned form individualy. These forms are in poor shape and scanning to text would probably not work. Does anyone have any ...

forewarding IMPA e-mail to outlook
I have a IMPA e-mail address and I forewarding all mail from it to Outlook. However, I cannot delete e-mail from this account in Outlook. Must go to IMPA account and delete there. The subscribed folders are only showing "Inbox" -- Dennis ...

Automatic population of a field in an input form
I have been away from Access for a few years, so I am struggling with a problem which I'm sure is an easy fix. I am working with Access 2003, and my form has a field for a Customer ID number. When that number is put into the Customer ID field, the Customer Name is supposed to automatically populate the Customer Name field as soon as I tab into that field. I am working off of one table to accomplish this. Is this accomplished with the criteria section of a query, and if so, how? If now, can someone please walk me through the steps to accomplish this. OwlLover, If I unders...

Form Designer in VC Net 2003 ???
sorry but I am a newbie ... Does Visual C++ Net 2003 have a form designer like Borland's C Builder ??? Is it easier to develope applicaitons with VC Net then with Borland C Builder ??? Is the form designer in VC Net more flexible and powerful then the ones in Borland C Builder ??? Hope to hear from you soon ... Andy > Does Visual C++ Net 2003 have a form designer like Borland's C Builder ??? Has a form designer, but not like Borland's C Builder. > Is it easier to develope applicaitons with VC Net then with Borland C > Builder ??? I think yes, but this is personal....

This workbook is currently referenced by another workbook and cannot be closed.
The message is given when I try to close a workbook / kill Microsoft Excel. I'm using Microsoft Excel 2002 / XP. The spreadsheet includes a reference to another sheet that someone else referenced in another message here. I put the AddIn sheet in via: Tools, AddIns..., Analysis ToolPack - VBA. I've not referenced any function or procedure in the add-in. I get a Triangular Warning / Error ? It's got a graphic of a Yellow Triangle with an Exclamation Mark inside. The subject is the exact text of the warning. A Microsoft Search on the subject yielded nothing. Google yielded one ...

Using a VBA forms text box to show the filename path
Hi, I want that when i launch my userform the activesheet saved location i shown in a text box (textbox1) How can this be done? cheers stev -- Message posted from http://www.ExcelForum.com Do you mean that you want the saved location of the workbook to b displayed? If so, use the following. TEXTBOX1.TEXT = ACTIVEWORKBOOK.FULLNAM Rolli -- Message posted from http://www.ExcelForum.com ...

Custom Field for Leads-Carry over to Contact/Account
I have a CRM account that wants to include a custom field for Leads and would like the information from the field to carry over to a converted Contact or Account. The field is a boolean, with Yes or No for options. Anyone ever do such a thing before? Any recommendations? -- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $ $ Nick Maxwell, MCSE 2k, CCNA , A+ $ Systems Engineer $ Heartland Business Systems $ http://www.hbs.net $ nmaxwell@nospam.hbs.net $ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Add the field to Lead in Deployment Manager Add the field to Accoutns and Contacts in Deployment manager (must b...

Read only fields on a form
How do you make a field on a form "Read only"? ...