Referencing Subform Control on Main Form

R

Ruth

I want to pass the value of a calculated control on a subform to the
footer of my main form. I'm terrible doing this and struggle with it
every time.

The main form name is New_frmLR1. The subform name is New_frmLR2. The
control name is txtLeakCt. In looking through online resources, I
found one that said I should reference the subform "container." If
that is needed, the container name is New_qryLR5.

I know this shouldn't be hard, but I am having absolutely no luck and
am getting #Name? with every variation I try. Any help would be
greatly appreciated!

Thanks,
Ruth
 
D

Dirk Goldgar

Ruth said:
I want to pass the value of a calculated control on a subform to the
footer of my main form. I'm terrible doing this and struggle with it
every time.

The main form name is New_frmLR1. The subform name is New_frmLR2. The
control name is txtLeakCt. In looking through online resources, I
found one that said I should reference the subform "container." If
that is needed, the container name is New_qryLR5.

I know this shouldn't be hard, but I am having absolutely no luck and
am getting #Name? with every variation I try. Any help would be
greatly appreciated!


So "txtLeakCt" is the name of the control on the subform? From what you've
said, I believe the Control Source of the text box on the main form should
be:

=[New_qryLR5].[Form]![txtLeakCt]

It could be that I'm misinterpreting you, and the control source should be:

=[New_frmLR2].[Form]![txtLeakCt]

Have you tried those variations?
 
R

Ruth

Dirk,
Your suggestion =[New_qryLR5].[Form]![txtLeakCt] Worked like a
charm! Obviously, I had not tried that combination. Thank you so, so
much!!!

Best regards,
Ruth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top