How to turn off a dialogue box

wem3rd

Registered User.
Local time
Today, 05:20
Joined
May 4, 2014
Messages
13
I am running a Make Table query from a macro. How may I stop the Dialogue Box that questions whether or not to delete the target table before running the query?

Thank you.

wem3rd.
 
presume you are using docmd.runquery and not currentdb.execute

use docmd.setwarnings (set to false before you run the maketable code and true after the code)
 
If you are running the query using VBA, add the following lines:

DoCmd.SetWarnings False
DoCmd.OpenQuery "YOUR QUERY NAME HERE"
DoCmd.SetWarnings True​

Make sure you include the last line!

Not sure if you can do that for a macro as I don't use them

However, you can turn off warnings 'globally' as follows:
If using access 2010 , go to File...Options then untick 'Confirm Action queries'
See screenshot
The process is similar for other versions of Access

However, I wouldn't recommend doing this as the warnings are there to help prevent users doing things by mistake
 

Attachments

  • Capture.PNG
    Capture.PNG
    34 KB · Views: 119

Users who are viewing this thread

Back
Top Bottom