Unhide Form Tab Controls based on Drop Down Selection (1 Viewer)

Smokeeater

Registered User.
Local time
Today, 11:01
Joined
Jan 15, 2009
Messages
58
I have tab control form with (5) tabs. For this discussion - Tabs 1 through 5. For a blank (new) form sheet tabs 4 & 5 need to be hidden. Based on what is selected via the drop down box (on tab 1) then tabs 4 & 5 may remain hidden or needed to be un-hidden. Example: [DropDown1]

Selection 1: stay hidden
Selection 2: unhide
Selection 3: unhide
Selection 4: stay hidden
Selection 5: unhide
Selection 6: stay hidden
Selection 7: unhide
Selection 8: stay hidden
Selection 9: stay hidden


I think one I figure this out then I can use the 'OnCurrent' event to check the drop down selection as a user selects the a record or scrolls through records.

Any assistance is much appreciated.
 

mrojas

Registered User.
Local time
Today, 08:01
Joined
Sep 8, 2012
Messages
22
On the AfterUpdate event of your drop-down control, insert code that validate choice and then it would make a given tab visible or not.
' Tabs are zero-index, meaning the first tab is zero, second is 1, etc.
Me.tabMain.Pages(1).Visible = False ' This will hide the second tab
 

Smokeeater

Registered User.
Local time
Today, 11:01
Joined
Jan 15, 2009
Messages
58
mrojas - thanks for the reply. Where I am struggling is the first part - how to tie the selected response to un-hiding the sheet tabs, or leaving them hidden.
 

Users who are viewing this thread

Top Bottom