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

Selectable drop down lists?

Status
Not open for further replies.
Sep 10, 2002
150
US
I have two fields in a form, the first is a drop down menu (Menu A) with four choices, 1 2 3 and 4. I want the second field (Menu B) to have a different drop down list for each different option. So, if Menu A=1, then I want Menu B to show me the drop down list associated with Table 1, A=2, Menu B=Table 2, etc. Any thoughts?
 
For ComboBox1, you could write this in the After update:

If Combobox1.value = 1 then
ComboBox2.RowSource = SELECT [Tbl_YourTable].[YourField] FROM Tbl_YourTable;
End if

If Combobox1.value = 2 then
ComboBox2.RowSource = SELECT [Tbl_YourTable2].[YourField2] FROM Tbl_YourTable2;
End if

etc..

Is this what you are looking for?

"The greatest risk, is not taking one."
 
I tried, however I keep getting a compiler error - expected:expression highlighting the SELECT portion.
Any thoughts?
 
combobox2 Row Source Type must be: Table/Query.
Was this the problem?

"The greatest risk, is not taking one."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top