combo box linking to queries

  • Thread starter Thread starter Lauren B.
  • Start date Start date
L

Lauren B.

I have approximately 16 queries that I want users to be able to access
through a drop down menu. I want each item listed in the drop down menu to
correspond to a specific query out of the 16.

I do not understand how to specify that if "A" is selected from the drop
down menu, then "Query A" will run and open for viewing.

I assume I must create language in Visual Basic; however, I am not very
familiar with the terminology.

Thank you in advance for any assistance.

*Lauren
 
Hi Lauren,
You can put this code in the AfterUpdate event of your combo
or in a command button Click event.

You would have something like this:

Select Case Me.yourComboBox
Case "A"
DoCmd.OpenQuery "Query A"
Case "B"
DoCmd.OpenQuery "Query B"
End Select
 
Back
Top