Referring to control on subform

G

Guest

I have a mainform with two subforms ( the subforms are not nested on the
mainform. I am trying to refer to a control that is on subform 2 from
subform1. What would be the correct syntax?
Thanks,
 
K

Ken Snell [MVP]

Couple of ways to do it:

Me.Parent.Subform2Name!ControlnameOnSubform2

or

Forms!NameOfMainForm!Subform2Name!ControlnameOnSubform2

Note that Subform2Name needs to be replaced with the actual name of the
subform control (the control that holds the subform, which may or may not be
the same name as its Source Object).
 

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