Set criteria for multiple queries entered in one dialog form?

E

Emily T

How do I set up option buttons to tell my dialog form for which query to set
criteria?

For example I have multiple queries and only want to use one dialog form. I
want the user to be able to choose between "Europe" or "Asia" on the dialog
form and enter criteria in the text boxes. If "Europe" was selected by the
user on the dialog form I want the "Europe" query run, and the "Asia" query
run if "Asia" was selected on the dialog form.

Thanks!
 
D

Dale Fye

Are there significant differences between the fields in the Europe and Asia
queries? Generally, the point of having a form to enter query criteria is to
only create a single query that uses the values in your form as criteria to
filter the same recordset.

What are you doing with the results of the query? Are you generating a
report, using it as the RecordSource for a form?

If you really feel you must do this, because the queries use different
recordsets, then I woud add a "Query" button to your form, and in the code
behind that button use an IF Then statement to test the value in you
Europe/Asia and run the appropriate query.

--
HTH
Dale

Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.
 

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