Macro to run a Delete Query

UncleBulgaria

New member
Local time
Today, 22:11
Joined
Jun 12, 2008
Messages
9
Hi,

I wasn't sure whether to put this in the query section or Macro section of the forums, so forgive if not in the right one.

I have a macro that runs a delete query, and that works ok, but could be improved if it could automatically answer yes to any confirmation boxes that appear (the data being deleted is not needed and is just used to run a query, so I am confident there is no need for a manual confirmation).

Any help on whether this is possible would be gratefully received.

Thanks,

Robert.
 
You can probably solve this problem with:
DoCmd.SetWarnings False
at the beginning of the macro and:
DoCmd.SetWarnings True
...at the end. Be sure and turn them back on!
 
And turned into "Macro speak" it is

Action = SetWarnings
Argument = No

.. do your query

Action = SetWarnings
Argument = Yes
 
Thanks Bob for putting it into "Macro Speak". I don't use them so I didn't know the actual syntax.
 
Have you tried turning off the echo and Set Warnings before you run the query and then turn them back on after the query is run. I like to beep before exiting the macro just to know that the macro completely ran. Just a thought.
 

Users who are viewing this thread

Back
Top Bottom