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

Tab Control 3

Status
Not open for further replies.

bjarvis

Technical User
Jan 15, 2001
38
0
0
US
I've got a tab control with it's visible property set to no. When the user selects a certain value from a combo box the tab control is visible. Here's my code.

Private Sub Carts_Change()
If Me!Carts.Value = 73 Then
TabCtl17.Pages(6).Visible = True
End If
End Sub

Now when the user goes to the next record I want the tab control to be invisible again. How do I do this?
 
Try setting the visible property to false on the OnCurrent event. This will fire every time you move to another record. Jim Lunde
compugeeks@hotmail.com
Custom Application Development
 
In the forms oncurrent event place

TabCtl17.Pages(6).Visible = false
 
I am thinking that you most likely already tried this but here it is anyway. Use the lostFocus handle of the field you are tabbing off of.
Code:
Private Sub Carts_LostFocus()
     TabCtl17.Pages(6).Visible = False
End Sub
The hardest questions always have the easiest answers.
 
Thanks that did exactly what I wanted it to do.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top