Home  |  About  |   Search   

What's New
Table Of Contents
Credits
Netiquette
10 Commandments 
Bugs
Tables
Queries
Forms
Reports
Modules
APIs
Strings
Date/Time
General
Downloads
Resources
Search
Feedback
mvps.org

RunCommand Constants

Terms of Use


 

Queries: Turn off the default Action query confirmations

Author(s)
Dev Ashish

(Q)    How can I get rid of the default "You're about to change x records....." confirmation message when I run an action query?

(A)    There are two methods of doing this. 

First one:

Toggle SetWarnings property before and after running the SQL statement.

Docmd.Setwarnings False
    Docmd.runSQL "Delete * From tblCustomers"
Docmd.Setwarnings True

or

Second option:

Use the Execute method in which case SetWarnings is not required.

Dim db As Database
Set db = CurrentDb
db.Execute "Delete * from tblCustomers"


1998-2009, Dev Ashish & Arvin Meyer, All rights reserved. Optimized for Microsoft Internet Explorer