linking combo boxes to a query

  • Thread starter Thread starter LJB
  • Start date Start date
L

LJB

What code do I need to use to have each value in my combo box attached to a
particular query?

If "A" is selected from the combo box, I need "Query A" to run...etc.

Thank you!
 
What code do I need to use to have each value in my combo box attached to a
particular query?

If "A" is selected from the combo box, I need "Query A" to run...etc.

Thank you!

As the Combo Box rowsource:

SELECT MSysObjects.Name FROM MSysObjects WHERE
(((Left([Name],1))<>"~") AND ((MSysObjects.Type)=5)) ORDER BY
MSysObjects.Name;

Then to have the user run the query after selecting it, place code in
the Combo AfterUpdate event (or in a Command Button click event):

DoCmd.OpenQuery Me!ComboBoxName
 
Back
Top