run query confirmation

  • Thread starter Thread starter Dimitris Nikolakakis
  • Start date Start date
D

Dimitris Nikolakakis

I have created a macro that has two lines:

RunSQL : delete * from storage
OpenQuery : an append query

For each of these actions the confirmation message of access appears (You
are about to delete.........AND...you are about to run.........)

Is there any way not to see these confirmations?

thanks
 
Tools > Options > Edit/Find > Confirm Action Queries

The downside to this method is that it turns off the
confirmation completely for all queries thereafter.
 
Yes, but this is not just for the database but for MsAccess on the specific
computer.
 
add two lines to your macro, so it reads

SetWarnings: Warnings On = No
RunSQL : delete * from storage
OpenQuery : an append query
SetWarnings: Warnings On = Yes

Access Help says you have to turn Warnings back on when
they're turned off in VBA, but not when they're turned off
in a macro. to be safe, i'd turn them back on in the macro
anyway.

hth
 
Back
Top