How to bypass having to ok the prompts in Access Macros

How to bypass having to ok the prompts in Access Macros

Post by Tim Spange » Wed, 26 Jul 2006 22:35:04


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
 
 
 

How to bypass having to ok the prompts in Access Macros

Post by Steve Scha » Thu, 27 Jul 2006 03:51:34

Tim,

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

--
Steve Schapel, Microsoft Access MVP

 
 
 

How to bypass having to ok the prompts in Access Macros

Post by am1vbnR » Thu, 27 Jul 2006 04:00:02

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
 
 
 

How to bypass having to ok the prompts in Access Macros

Post by DanielS vi » Thu, 27 Jul 2006 07:22:55


The setwarnings to no will work fine b4 the query, DO NOT FORGET TO reset
afterwards.

--
Message posted via AccessMonster.com
http://www.yqcomputer.com/
 
 
 

How to bypass having to ok the prompts in Access Macros

Post by Steve Scha » Thu, 27 Jul 2006 07:45:31

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.

--
Steve Schapel, Microsoft Access MVP