Tab controls/ Hiding Tabs

  • Thread starter szag via AccessMonster.com
  • Start date
S

szag via AccessMonster.com

I am looking for some coding assistance. I have a tab control called "Master
Tab" with 3 tabs on it called "Type" "CIP" and "Vacuum".

When I load the tab control form I want "CIP" and "Vacuum" to be hidden -
only "Type" should be showing.

Then when I want to go to the "CIP" tab, I would like to create an event that
hides the "Type" form and makes the "CIP" form visible.

Any ideas?

Thanks, Zag
 
G

Guest

Zag,

First to have any tabl hidden at startup, in design mode, set the Visible
property of the tab you want hidden to false.

Then to show a tab you can use one of two methods to show a specific tab:

If you have a command button that you want to have the user click to show
the CIP tab, just put the followin code in the On Click event of that command
button:

Me.TabCtl0.Pages("Page2").Visible = False
The line above uses the name of the tab control: "TabCtl0" and then
references the name of a specific page "Pages("Page2")". Each of the pages of
your tab control has a Name. Then specifies the visible status.

You can also use:
Me.TabCtl0.Pages(1).Visible = True
The line above uses the name of the tab control: "TabCtl0" and then
references the "Page Indes" of the page. This numbering sequence is a zero
based numbering.

The values that you are providing for each tab are only Captions. You must
refernece either the Page Name or the Page Index.
 
S

szag via AccessMonster.com

Thanks!


Mr said:
Zag,

First to have any tabl hidden at startup, in design mode, set the Visible
property of the tab you want hidden to false.

Then to show a tab you can use one of two methods to show a specific tab:

If you have a command button that you want to have the user click to show
the CIP tab, just put the followin code in the On Click event of that command
button:

Me.TabCtl0.Pages("Page2").Visible = False
The line above uses the name of the tab control: "TabCtl0" and then
references the name of a specific page "Pages("Page2")". Each of the pages of
your tab control has a Name. Then specifies the visible status.

You can also use:
Me.TabCtl0.Pages(1).Visible = True
The line above uses the name of the tab control: "TabCtl0" and then
references the "Page Indes" of the page. This numbering sequence is a zero
based numbering.

The values that you are providing for each tab are only Captions. You must
refernece either the Page Name or the Page Index.
I am looking for some coding assistance. I have a tab control called "Master
Tab" with 3 tabs on it called "Type" "CIP" and "Vacuum".
[quoted text clipped - 8 lines]
Thanks, Zag
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top