Multiple queries in a single form

R

rsmith

How can I base a form off of 2 queries that need to run in
a specific order?
I need to have an append query run, then after it
finishes, have a criteria query run and base the form on
the results of the second query.
Is there a way to trigger the second query upon completion
of the first on the load of the form or am I going about
this wrong?
 
J

John Vinson

How can I base a form off of 2 queries that need to run in
a specific order?
I need to have an append query run, then after it
finishes, have a criteria query run and base the form on
the results of the second query.
Is there a way to trigger the second query upon completion
of the first on the load of the form or am I going about
this wrong?

Yes. You are.

You don't need to "run" the second query AT ALL. Just use it as the
Recordsource for your form. You can run the action query from the
Form's Open event (not the Load event, it's opened the form's
recordsource by then - the Open event is earlier).
 
M

Mike Painter

John Vinson said:
Yes. You are.

You don't need to "run" the second query AT ALL. Just use it as the
Recordsource for your form. You can run the action query from the
Form's Open event (not the Load event, it's opened the form's
recordsource by then - the Open event is earlier).

I'd add a do events in there someplace. The form could load before the query
event completed. I don't know what you'd get.
 

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