Link to home
Start Free TrialLog in
Avatar of Juan Velasquez
Juan VelasquezFlag for United States of America

asked on

Need help on how to refer to a nested subform from another nested subform

Hello

I have a form that contains a subform.  This subform contains another subform. This subform in turns contains three subforms.  I need help on the vba syntax required to refer to one of the three subforms from a subform on the same level
ASKER CERTIFIED SOLUTION
Avatar of Bill Ross
Bill Ross
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Juan Velasquez

ASKER

Thanks for the clarification
Avatar of IrogSinta
It depends on what form your code is on.
Using the figure below, to refer to the textbox called txtAddress in the middle subform:

If your code is on sf_B, you would use:
Me.sf_C2.Form.txtAddress
If your code is on sf_A, you would use:
Me.sf_B.Form.sf_C2.Form.txtAddress
If your code is on the main form, you would use:
Me.sf_A.Form.sf_B.Form.sf_C2.Form.txtAddress
User generated image
Oops, looks like I should have refreshed the page before I answered.