Order of operations

  • Thread starter Thread starter Eric G
  • Start date Start date
E

Eric G

I have a series of queries that are run as an On Open event for a
report.
The report printout is based on a record source query. Naturally the
queries that are run in the On Open event have a bearing on the
outcome of the query that the printout is based on.

My question, will the On Open queries always be run first, before the
record source query that the report printout is based on?

Thanks! Eric
 
You are running a series of action queries in Report_Open, and hoping that
they complete before the report actually loads its data?

Chances are that this will work (provided you don't include a DoEvents), but
I would not trust it. Especially, it's the kind of thing that is likely to
break in future versions where threading could trip you up.

Better to provide some kind of form for the user to fire off the report, and
execute your queries before the OpenReport action.
 
You are running a series of action queries in Report_Open, and hoping that
they complete before the report actually loads its data?

That's correct.

Chances are that this will work (provided you don't include a DoEvents), but
I would not trust it. Especially, it's the kind of thing that is likely to
break in future versions where threading could trip you up.

Better to provide some kind of form for the user to fire off the report, and
execute your queries before the OpenReport action.

Thanks for your help Allen. I really appreciate it.

Eric
 
Back
Top