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

Tab control woes

Status
Not open for further replies.

maxxev

Technical User
Jul 17, 2008
139
NL
Hi, I have absolutely no idea where to start here...

I have a tab control "TabCtl63" with three named tabs.
Customers
Pack Suppliers
Ing Suppliers

And a combo box that will contain the values:
Customer
Packaging Supplier
Ingredient Supplier
(and more options)

I would like to know please how to either start the tab control at the tab relating to the option in the combo box "Combo42"
Or how to disable / hide the tabs that arn't the corresponding value in the text box.

The only thing in the tab pages are buttons.

Cheers
 
Code:
Private Sub Combo4_AfterUpdate()
  Dim pageVal As Integer
  Select Case Combo4.Value
     Case "Customer"
       pageVal = 0
     Case "Packaging Supplier"
       pageVal = 1
     Case "Ingredient Supplier"
       pageVal = 2
  End Select
  Me.TabCtl63.Value = pageVal
End Sub
 
Works like a charm thank you (though modified it to be on form load as the combo box is "pre-filled in") cheers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top