Solved

How to disable DoCmd.RunSQL confirmation box?

Posted on 2004-04-12
1
1,864 Views
Last Modified: 2007-12-19
Given: you have an access database with linked tables to another odbc database (mine is db2)

given2: all sql statement to the database are managed via vba code

problem:

issuing an update, insert, or delete statement via the vba command "DoCmd.RunSQL strSQL"

causes an popup box asking if you are sure you want to "append/insert/delete X records"

I dont want my users to have a choice, the sql statements need to execute without user intervention.

how do i disable this popup and just execute the sql without prompting?

0
Comment
Question by:Rance_Hall
1 Comment
 
LVL 54

Accepted Solution

by:
nico5038 earned 50 total points
ID: 10808066
Surround the command by:
docmd.setwarnings false
... command
docmd.setwarnings true

Nic;o)
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now