How to bypass having to ok the prompts in Access Macros

T

Tim Spangenberg

I have an Access 2000 db that I have a multi-step macro that runs several
make table queries. It takes approximately 15 minutes to run. How do I
prevent or bypass the prompts for deleting and overwriting the existing
tables? I want to run the macro without any manual intervention if possible.
Thanks
 
S

Steve Schapel

Tim,

Put a SetWarnings/No action in the macro, prior to the first OpenQuery
action.
 
G

Guest

the VBA code is:

DoCmd.SetWarnings False
'Run queries here
DoCmd.SetWarnings True

This will suppress the Access messages like "You are about to delete 100
records.."

jmonty
 
D

DanielS via AccessMonster.com

Tim said:
I have an Access 2000 db that I have a multi-step macro that runs several
make table queries. It takes approximately 15 minutes to run. How do I
prevent or bypass the prompts for deleting and overwriting the existing
tables? I want to run the macro without any manual intervention if possible.
Thanks
The setwarnings to no will work fine b4 the query, DO NOT FORGET TO reset
afterwards.
 
S

Steve Schapel

Thanks, Daniel. However, this is not necessary. The SetWarnings
automatically reverts to Yes at the end of the macro, so no need to do
it explicitly.
 

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

Top