[AccessD] Acquiring subform's subform object name

Steve Erbach erbachs at gmail.com
Sat Mar 18 07:52:39 CST 2006


Dear Group,

I have a form, frmMainMenu, that contains a Tab Control.  The 8 tabs
in the Tab Control are generically named Tab1, Tab2, etc.

Each of the Tabs has one Subform Control "embedded" in it; each
Subform is also generically named:  Subform1, Subform2, etc.  The
reason for this is that frmMainMenu is set up with another Subform
Control "outside" the Tab Control.  This subform acts like the
vertical menu in an Access database window.  Once a menu item is
clicked, then all the tabs change, sometimes fewer tabs visible,
sometimes more, depending on which vertical menu item is selected.

Anyway my problem is this:

Say that Tab3's subform control, Subform3, has the form frmCustomers
as the subform's Source Object.  From the code within frmCustomers I
would like to be able to determine the name of it's subform control
"container".

Me.Parent.Name gives me the name of the "master" form, frmMainMenu. 
I've tried all sorts of things short of enumerating the collection of
controls to simply find the name of the subform control that
"contains" frmCustomers.

Could you give me an idea?

Regards,

Steve Erbach
Scientific Marketing
Neenah, WI
http://TheTownCrank/blogspot.com
Security Page: www.swerbach.com/security



More information about the AccessD mailing list