Solved

How to disable DoCmd.RunSQL confirmation box?

Posted on 2004-04-12
1
1,870 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

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…
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

773 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