Lock Tab

jneirinckx

Registered User.
Local time
Today, 13:54
Joined
Feb 28, 2004
Messages
133
Good Morning,

I have a form that contains two tabs Imperial and Metric. I also have an option group to select how the recorded is entered ie: Metric or Imperial.

What I'am trying to accomplish is when you choose say the Imperial option that it locks out the metric tab. Therefore preventing accidental double entry.

I can disable the tab but ideally I would like to prevent any access to that tab.

Any ideas ?

Thanks

Jerry
 
When the user selects Metric or Imperial you could make the relevant tab invisible:

TabCtl0.Pages.Item(1).Visible = False
 
Thank You

I've thought of that as a possibility.

Are there any other options that would allow the tab to be visible.

Thanks again

Jerry
 
Sorry, not sure what you mean. If you mean how do you make the tab visible use:

TabCtl0.Pages.Item(1).Visible = True
 
Code:
Private Sub UnitTab_Change()
If UnitOption.Value = 1 Then
UnitTab.Value = 0
MsgBox "Select metric option to access metric page"
Else
UnitTab.Value = 1
MsgBox "Select imperial option to access imperial page"
End If
End Sub
Where UnitOption is your unit options and UnitTab is the tab control of the unit pages.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom