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

How to enable or disable tab pages on form

Status
Not open for further replies.

mrbboy

Technical User
Feb 28, 2007
136
US
I have a form with 5 tab pages. The form, frm_Review, has a text box named txt_Status. How do I enable or disable the tab pages based on whether or not txt_Status is OPEN or CLOSE.
 
Code:
Private Sub txt_Status_AfterUpdate()
If Me.txt_Status = "open" Then
 Me.YourTabControl.Enabled = True
Else
 Me.YourTabControl.Enabled = False
End If
End Sub

Private Sub Form_Current()
If Me.txt_Status = "open" Then
 Me.YourTabControl.Enabled = True
Else
 Me.YourTabControl.Enabled = False
End If
End Sub

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top