Running a saved query - hidden

  • Thread starter Thread starter -Michelle-
  • Start date Start date
M

-Michelle-

Hi
Using A2003

I want to run a saved query (called eg: qryMyQuery) from code, but I don't
want the results to be visible.

What is a good way to do this?

In comparison to what I'm trying to do, is it more efficient (ie: overhead,
speed, etc) to run the query writing the sql and then doing the Docmd.RunSQL
MySqlStr?

TIA
Michelle

**Please post replies to newsgroup**
 
-Michelle- said:
Hi
Using A2003

I want to run a saved query (called eg: qryMyQuery) from code, but I don't
want the results to be visible.

What is a good way to do this?

In comparison to what I'm trying to do, is it more efficient (ie: overhead,
speed, etc) to run the query writing the sql and then doing the Docmd.RunSQL
MySqlStr?

If this is an action query (update, delete, or append) then "running it"
does not involve anything being displayed on your screen. Just use...

CurrentDB.Execute "QueryName", dbFailOnError

....in a VBA code procedure. This is better than any of the DoCmd options
as it doesn't produce confirmations prompts which you would have to
suppress using DoCmd.
 
Back
Top