Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / October 2007

Tip: Looking for answers? Try searching our database.

navigating controls in control tabs/subforms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
john431 - 23 Oct 2007 18:55 GMT
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
John Spencer - 23 Oct 2007 20:29 GMT
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.

Signature

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

> I'm having a bit of trouble referring to a control in a subform within a
> tab
[quoted text clipped - 10 lines]
>
> John431
john431 - 23 Oct 2007 22:09 GMT
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

> The same way as if the tab control did not exist.
> Forms![Main  Form]![Subform control].Form![Control name]
[quoted text clipped - 17 lines]
> >
> > John431
Paolo - 24 Oct 2007 07:21 GMT
Hi John,

Forms![name of the main form].Form![name of the subform containing the
control]![Control name]

HTH Paolo

> Thank you for the response, John.
>
[quoted text clipped - 30 lines]
> > >
> > > John431
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.