Solved

How to disable DoCmd.RunSQL confirmation box?

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

757 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

20 Experts available now in Live!

Get 1:1 Help Now