Macro to run several queries

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to run 7 delete queries with one button. I created the macro
just by typing "openquery' for each query. That is all I have in my macro
other than "stopmacro". When the macro runs, It stops in between each
'openquery' for me to confirm 'yes' to delete. What should I type in the
macro to automatically answer 'yes' in between each query?
 
I would like to run 7 delete queries with one button. I created the macro
just by typing "openquery' for each query. That is all I have in my macro
other than "stopmacro". When the macro runs, It stops in between each
'openquery' for me to confirm 'yes' to delete. What should I type in the
macro to automatically answer 'yes' in between each query?

Better, put a line at the beginning of the Macro:

SetWarnings value False

and then, at the end

SetWarnings value True

This will turn off warning messages for the duration of the macro, and
turn them back on again when you're done.

John W. Vinson[MVP]
 

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

Back
Top