Set criteria for multiple queries entered in one dialog form?

  • Thread starter Thread starter Emily T
  • Start date Start date
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!
 
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.
 
Back
Top