Referring to control on subform

B

BobT

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).
 
Top