Accessing Query based on Combo box

D

dwaynesworld

I have an interesting dillema. I have a combo box in my for with 4 values
(A, B, C, D). What I would like to do is if a user selects A, B or C, the
results pull from query A but if they select D, the results pull from query
B. Is there a way to do this? Thanks.
 
P

pietlinden

I have an interesting dillema. I have a combo box in my for with 4 values
(A, B, C, D). What I would like to do is if a user selects A, B or C, the
results pull from query A but if they select D, the results pull from query
B. Is there a way to do this? Thanks.


If you have a subform showing the results, set the rowsource in the
change event of the combobox. Just use a hidden column on your
combobox.
 
K

KARL DEWEY

You can use a union query. First add criteria to the individual queries for
the A, B, C, or D.
Then put the queries in your union query. Only the selected query, criteria
matching combobox, will pull data and be displayed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top