Viewing Tabs

L

Lloyd

I have a subform with a command button to open a detail form. The detail
form has two tabs. I would like to place two command buttons in the subform,
one which opens the detail form with one tab control visible and one which
opens the form with the other tab control visible. Is there a way to do that?

Thanks, Lloyd
 
T

tina

on each command button, you could put code to open the form and then a line
of code to hide the tab control that you *don't* want to show, as

Forms!NameOfFormWithTwoTabControls!TabControlName.Visible=False

hth
 
L

Lloyd

That is a good idea Tina, but I don't want to hide the tabs contorls so much
as display a different one on the foreground, depending on which button is
selected. Any other ideas?

Thanks, Lloyd
 
R

Rick Brandt

Lloyd said:
That is a good idea Tina, but I don't want to hide the tabs contorls so much
as display a different one on the foreground, depending on which button is
selected. Any other ideas?

To change which TabPage is "in front" you set the value of the TabControl
itself.

For example...

Me.TabControlName.Value = 2

....will cause the third tab page to be moved to the front.
 
Top