Underlying form name in a tabbed form

giedrius

Registered User.
Local time
Today, 03:31
Joined
Dec 14, 2003
Messages
80
Hello,

I have a question how can I retrieve the pointer to underlying form in a tabbed form. If I use the following code,

Dim frm As Form
Set frm = Screen.ActiveForm

it returns pointer to the tabbed form itself. I need to get hold of the pointer to the form that is currently displayed in a tabbed form.

Thanks,
giedrius
 
Active.form returns only the name of the form on which the tab is located. The tab is a control.

I have the same problem. I save the name of the tab I'm on is a textbox on the main part of the form. Rather than multiple tabs, I hide them and use buttons to jump to the tab I want. On the Onclick event, I requery the tab I'm jumping to and take care of whatever other overhead I need, like save the name of that tab.
 
I suspected there was no easy solution. Thanks.

Is there a way to check if the form is called from a tabbed form or a standalone form?

Giedrius
 
To modify my earlier response -

While Screen.activeform.name gives the main form nAME,
screen.activecontrol.name can give the name of a control on a tab sheet, but not the tab sheet name.

Is there a way to check if the form is called from a tabbed form or a standalone form? No. You have to keep track of where you are. Use one or more hidden unbound textboxes to keep track.

The method I use really isn't difficult. Using buttons to change tAB SHEET, while hiding the tabs themselves, let me easily keep track of wether or no I'm on a tab sheet, and if so , which, and if I'm not on a tab sheet, I'm on the form. With this method I'm able to use common code for all tab sheets.
 

Users who are viewing this thread

Back
Top Bottom