Tab control - hide one of the pages?

Steff_DK

Registered User.
Local time
Today, 19:55
Joined
Feb 12, 2005
Messages
110
Tab control - how to add/change subforms?

I have been trying to figure out how the tab control works on a form...
So far, not at all... :rolleyes:

How do I display another form as a subform on one of the pages on the tab control? I can't seem to find anything in the toolbox to add to the page...

I wanted to use the tab control as a way to "browse" the forms in the database, so I'd have a static look/size of the application window, where only the sub form area on the form - or the tab control - would change depending on what form was requested by the user.

How do I do this (without constantly adding movesize to the load event of each form)?
 
Last edited:
Should work just like any other sub-form.

Open your form with the tab control in design view.

Then go to the database window, and drag the sub-form onto the tab page.

The tab page will briefly turn black while you are doing this. Drop the sub-form.

Done.
 
Works great! Thanx!

But how do I change the source of the subform window on my tab ctrl page?
Is there any way to change what form is displayed as subform on my page?
 
Worked it out:

Me.[mysubform].ObjectSource = "frmMyNewForm"

Will change the source of the subform to "frmMyNewForm".

However, it will only work if the object that has this event is not placed on the subform itself.

Does anyone know why??? I assume it's got something to do with parent/child... thingy... of which I know absolutely nothing :o
 
Last edited:
It depends on how many forms you want to use.
I toggle the visibility of two and change their respective record sources with the OnChange event of the tab control, works fine with fifteen tabs
 

Users who are viewing this thread

Back
Top Bottom