referencing subtotals fields on mainform from subform

Truckfin

New member
Local time
Today, 15:15
Joined
Jul 5, 2004
Messages
8
Hi,

i'm working in access 97 and am having difficulties pulling a subtotal or referencing any fields on my subform on my main form. I've searched the forum and help and tried to apply the info provided, but i still can't seem to get it to work.

as far as i can tell this should work:

=[MySubForm].[Form]![TxtTotalStaffNumbers]
but i'm still getting the dreaded #Name? error.

anyone got any clues as to what i'm doing wrong?

what about the case where the subtotal i'm referencing is a calculation such as =Sum([Quantity]*[FacilityArea]). Should i still be able to reference it on my main form by pointing to the name of the field?

Thanks very much!
 
Is the subform control name on your main form = "MySubForm"?

what about the case where the subtotal i'm referencing is a calculation such as =Sum([Quantity]*[FacilityArea]). Should i still be able to reference it on my main form by pointing to the name of the field?

Yes.

hth,
 
This always works for me;

=[Forms]![MyParentForm]![MySubForm]![MyField]
 
Thanks, that's it.

The name of the control on my subform was defaultly name "child6" or something instead of "MySubForm". & after renaming it correctly
=[Forms]![MyParentForm]![MySubForm]![MyField] works.

THANKS FOR YOUR HELP!!
 

Users who are viewing this thread

Back
Top Bottom