473,382 Members | 1,375 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Removing SQL pop-up

Whenever I execute a sql command (using docmd.runsql), it always gives
a popup when executed asking if I want to confirm deleting 3 rows, or
updating 1 row, or whatever. Is there a way to prevent this popup from
appearing?

Aug 7 '06 #1
2 3411
try

DoCmd.SetWarnings False
DoCmd.RunSQL
DoCmd.SetWarnings True

make sure you include that last line, since warnings will not be turned back
on automatically, as they are in a macro.

you can also use

CurrentDb.Execute "SQL string goes here"

without the need for the SetWarnings lines of code. but note that the
Execute action can result in a different outcome than the RunSQL or
OpenQuery actions, when the SQL statement appends records to a table.

hth
<kk*******@gmail.comwrote in message
news:11*********************@75g2000cwc.googlegrou ps.com...
Whenever I execute a sql command (using docmd.runsql), it always gives
a popup when executed asking if I want to confirm deleting 3 rows, or
updating 1 row, or whatever. Is there a way to prevent this popup from
appearing?

Aug 7 '06 #2
"tina" <no****@address.comwrote in message
news:Y3********************@bgtnsc05-news.ops.worldnet.att.net...
try

DoCmd.SetWarnings False
DoCmd.RunSQL
DoCmd.SetWarnings True

make sure you include that last line, since warnings will not be turned
back
on automatically, as they are in a macro.
And assuming you're using some sort of error handling, put the
DoCmd.SetWarnings True in your clean up code, in case you get an error
between the DoCmd.SetWarnings False and DoCmd.SetWarnings True

Emily
>
you can also use

CurrentDb.Execute "SQL string goes here"

without the need for the SetWarnings lines of code. but note that the
Execute action can result in a different outcome than the RunSQL or
OpenQuery actions, when the SQL statement appends records to a table.

hth
<kk*******@gmail.comwrote in message
news:11*********************@75g2000cwc.googlegrou ps.com...
>Whenever I execute a sql command (using docmd.runsql), it always gives
a popup when executed asking if I want to confirm deleting 3 rows, or
updating 1 row, or whatever. Is there a way to prevent this popup from
appearing?


Aug 7 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: J. J. Cale | last post by:
I have the following. There must be something less cumbersome without push pop. The function parameter obj is the event.srcElement and has the attributes(properties?) picNum and alb pinned to it....
8
by: Charlie Zender | last post by:
Hi, First, this may be a GCC or Linux-specific problem, I'm not sure. I am unable to compile a large body of code with extremely pedantic compile time checks activate, so that warnings cause...
32
by: Stephen | last post by:
Is there a standard way to remove the warning that a C compiler might produce from the statement: if (a = b) {} I don't want to do: if ((a = b) != 0) {} Because my "a = b" is actually...
24
by: RyanTaylor | last post by:
I have a final coming up later this week in my beginning Java class and my prof has decided to give us possible Javascript code we may have to write. Problem is, we didn't really cover JS and what...
6
by: Niyazi | last post by:
Hi all, What is fastest way removing duplicated value from string array using vb.net? Here is what currently I am doing but the the array contains over 16000 items. And it just do it in 10 or...
3
by: Gregory Piñero | last post by:
I'm going to assume that it's supposed to work like this, but could someone tell me the reasoning behind it? I.E. why is 3 skipped? .... print item .... if item==2: .... alist.remove(item)...
6
by: Srikanth | last post by:
Hi, list.remove(item) removes the first item from the list, but how do I say to remove a particular index from a list without using it's value? Let's say I have 4 items in my list as And...
13
by: Mumia W. | last post by:
Hello all. I have a C++ program that can count the YOYOs that are in a grid of Y's and O's. For example, this Y O Y O O Y O Y O Y O O Y O Y Y O Y O Y O O Y O O Y Y O Y O
21
by: mantrid | last post by:
I use <form action="screen.php" target="_blank" method="post"and a submit button to open a new separate window which is simply a display screen. I therefore do not wish to have the address, tool...
2
by: bladedpenguin | last post by:
I am writing a game, and it must keep a list of objects. I've been representing this as a list, but I need an object to be able to remove itself. It doesn't know it's own index. If I tried to make...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.