Home  |   French  |   About  |   Search  | mvps.org  

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

In Memoriam

Terms of Use


VB Petition

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-2010, Dev Ashish & Arvin Meyer, All rights reserved. Optimized for Microsoft Internet Explorer