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

Combo Box with multiple row source 1

Status
Not open for further replies.

May2000

Programmer
Dec 1, 2006
9
Hi,

Need some help here. I am creating a Form with an Option Group (values 1, 2 & 3), A combo box wherein the row source changes (from Table1, Table2 & Table3) depending on the value of the Option Group. The selected text on the Combo box will the be used to filter the records on the Form.

Cna somebody show how to do this. I am just a beginner in VBA.

Thanks in advance.

May
 
Assuming buttons in your option group have data values 1, 2 & 3
You could use a select case statement in the after update even of your option group



Select Case Me.YourOptionGroup

Case 1
Me.YourComboBox.RowSource = "Table1"
Case 1
Me.YourComboBox.RowSource = "Table2"
Case 3
Me.YourComboBox.RowSource = "Table3"


End Select


Hope this helps

Jimmy
 
Thank you Jimmy for the quick response I will try this!

May
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top