Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide/Unhide Tabs 1

Status
Not open for further replies.

wayniac42

Technical User
Aug 7, 2007
18
I require something very similar. I have a database built on 4 tabs, but inside one of those tabs I would like another group of tabs. The problem is that my second group of tabs are being displayed on ALL of the main 4 tabs and not the single tab that I would like it to. What I am asking is if anyone knows of a code that would only make my second group of tabs visible when only 1 of the 4 main tabs is clicked, and when the other 3 main tabs are clicked, the second group of tabs are NOT visible.

Here is a more visual look at the database.


Thank you
 
Does the Education Tab have its own subform ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
You probably won't like my suggestion, but the only way I've been able to get anything like this to work is to hide the tabs (set the property Style=None) and create my own buttons that display the tab pages. Then I have control over what is visible and what is not.

See a simple example here:
hidden tabs

Once I used a set of six radio buttons to determine which tab page to set focus on when the tabs were hidden.

Sorry I didn't have the exact result you were looking for!
Good luck!


Diana
VBA Princess
-- I'm hoping to grow up to be a Goddess!
 
How are ya wayniac42 . . .

A tab control can't be installed on a page of a parent tab control. This is why your receiving the effect you've stated. However it can be hidden as you seek. in the On Change event of the parent tab control:
Code:
[blue]   If Me![purple][b]Parent[/b][/purple]TabCtlName = PageNumber Then
      Me![purple][b]Child[/b][/purple]TabCtlName.Visible = False
   Else
      Me![purple][b]Child[/b][/purple]TabCtlName.Visible = True
   End If[/blue]
Note: [purple]the child tab control can't have the focus when you set visible to false.[/purple]
Although I prefer the method presented by [blue]MajP[/blue] & [blue]PHV[/blue], the above should do just fine . . .

Calvin.gif
See Ya! . . . . . .

Be sure to see FAQ219-2884:
 
Thank you, it works excellent now :) You all sure do know your stuff.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top