Tab Control Selected Via Combo Box Value

gschimek

Registered User.
Local time
Today, 09:22
Joined
Oct 2, 2006
Messages
102
I have a form that has a combo box with a list of selections. I also have a tab control with a tab that corresponds to each option in the combo box, so that I can show the details specific to the selected item.

Is there a way to have the value of the combo box select the appropriate tab in the tab control automatically? And I don't want it to select the tab only after I've entered or selected something from the combo box. I'd like it to select based on the already stored value of the combo box. So if the combo box shows Cars, then the Cars tab would automatically select.

Any ideas?
 
Use the On Current event of your form. Do something as follows:

Select Case me.cboComboBox

Case = "Cars"
me.tbTabControl = 1

Case = "Trucks"
me.tbTabControl = 2

etc...
 

Users who are viewing this thread

Back
Top Bottom