Macro to run several queries

C

Catherine

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?
 
J

John Vinson

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]
 
Top