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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tab control disable page 2

Status
Not open for further replies.

loneranger27

Programmer
Apr 22, 2003
94
US
Hi,

I have a tab control with 4 pages and each one contains a different subform.

I have a combobox on the mainform tnat I want to use to control which tab they can view and or enter info into.

the tabs are named redux, mature, new, old.

if the combobox = &quot;<11&quot; then I only want the page labeled &quot;redux&quot; to be available to the user.

Any ideas would be appreciated.
Thanks
 
In the AfterUpdate event of the combo box, do something like this (assuming that the tab contols pages are labeled as PageRedux, PageMature, PageNew, PageOld):

if (YourCombobox = &quot;<11&quot;) then
PageRedux.Enabled = true
PageMature.enabled = false
PageNew.Enabled = False
PageOld.Enabled = False
End if
 
Hi,
I must be doing something wrong.
I am using
if [combo77]=&quot;<11&quot; then PageRedux.Enabled = true
if [combo77]<>&quot;<11&quot; then PageMature.Enabled = false

I keep getting a &quot;object required&quot; error. Should there be some me.something inthere somewhere ?
 
If [combo77] = &quot;<11&quot; Then
PageRedux.Enabled = True
Else
PageMature.Enabled = False
End If

Ken S.
 
Yes, it's a good idea to specify Me! (or Me.); however, in theory, Access is going to assume Me and look for fields on the current object (i.e. form). Double check that the names of your tab pages match the code (or vice versa) that FancyPrairie and I have given.

Ken S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top