Results 1 to 2 of 2
2005-02-08, 22:04 #1
- Join Date
- Apr 2003
- Morgantown, Pennsylvania, USA
- Thanked 0 Times in 0 Posts
Getting totals from Subforms onto a Main Form (Access 2000)
I tried to search for this, but the answers I found didn't exactly apply to my case, which seems more basic than most.
I have a main form frmBookInvoice. I have a subform frmBookInvoiceDetails. I have a lngQuantity field in the subform. I have created a footer in the subform, and placed a text field called Total in the footer which contains the sum of the lngQuantity field (it works well).
When I try to display this information in the main form, I have created a text box field in the main form with the following in the control source: =[frmBookInvoiceDetails]![Total]
I'm getting a #Name? reference in the field on the main form. However this exact same technique has worked in other Access 2000 databases.
What's wrong here, and how can I fix it so that it works everytime?
Thanks very much.
2005-02-08, 22:07 #2
- Join Date
- Mar 2002
- Thanked 29 Times in 29 Posts
Re: Getting totals from Subforms onto a Main Form (Access 2000)
Make sure that you use the name of the subform as a control on the main form. This is not necessarily the same as the name of the subform in the database. To check this:
- Open the main form in design view.
- Click once on the subform to select it. Don't click on it a second time, that will select something in the subform.
- The control name will be displayed in the title bar of the Properties window, in the Name property (in the Other tab of the Properties window) and in the Object dropdown in the Formatting toolbar.