navigating controls in control tabs/subforms

J

john431

I'm having a bit of trouble referring to a control in a subform within a tab
control. Without the tab control, I would code it as Forms![Main
Form]![Subform control].Form![Control name].

However, the subform control is within a 4 page tab control. Each page has
a different subform. How do I refer to a control in a subform on one of the
control tab pages?

Any suggestions would be appreciated.

John431
 
J

John Spencer

The same way as if the tab control did not exist.
Forms![Main Form]![Subform control].Form![Control name]

If you want to confirm this try creating two controls with same name of
different pages of the tab. You'll get an error message when you try to
name the control on page 2 the same as the control on page 1.



--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
J

john431

Thank you for the response, John.

I have tried that and I have also tried:

Forms![Main Form]!Pages![Page1]![Subform control].Form![Control name]
Forms![Main Form]![Subform control].Form!Pages![Page1].[Control name]
Forms![Main Form]![Subform control].Pages![Page1]!Form![Control name]

None of these 4 combinations work. The error message is that the Main Form
cannot be found.

John431
John Spencer said:
The same way as if the tab control did not exist.
Forms![Main Form]![Subform control].Form![Control name]

If you want to confirm this try creating two controls with same name of
different pages of the tab. You'll get an error message when you try to
name the control on page 2 the same as the control on page 1.



--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

john431 said:
I'm having a bit of trouble referring to a control in a subform within a
tab
control. Without the tab control, I would code it as Forms![Main
Form]![Subform control].Form![Control name].

However, the subform control is within a 4 page tab control. Each page
has
a different subform. How do I refer to a control in a subform on one of
the
control tab pages?

Any suggestions would be appreciated.

John431
 

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