473,394 Members | 1,774 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,394 software developers and data experts.

How to avoide the "Alert Messages" when using Queries

When I run an "append query" or "Make a Table Query"
I get a pop up window alert message that alerts me that I am goint to
add rows, etc. How can I make my query that these alerts will not show
up?

Thanks,

galsaba

Nov 13 '05 #1
5 2116

galsaba wrote:
When I run an "append query" or "Make a Table Query"
I get a pop up window alert message that alerts me that I am goint to
add rows, etc. How can I make my query that these alerts will not show up?

Thanks,

galsaba


You have to use
SetWarnings False

before you run the query and then

SetWarnings True

after so that the warnings get turned back on. Otherwise, you'll get
NO warnings at all after shutting them off.

Nov 13 '05 #2
You will only get these messages for action queries.

DoCmd.Setwarnings False
<<Run your query here>>
DoCmd.Setwarnings True

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

"galsaba" <ga*****@aol.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
When I run an "append query" or "Make a Table Query"
I get a pop up window alert message that alerts me that I am goint to
add rows, etc. How can I make my query that these alerts will not show
up?

Thanks,

galsaba

Nov 13 '05 #3
Is there a way to put it in the macro? how?

Nov 13 '05 #4
On 13 Feb 2005 09:35:19 -0800, galsaba wrote:
Is there a way to put it in the macro? how?


You can use a macro.
Place the Warnings False macro first, then the Open Query macro then
the Warnings True macro.

Perhaps it's time for you to start doing this in code. It's not hard
(just as easy as using a macro) and you get the benefit of being able
to add error handling when needed.

On the event line of whatever event you are using to start this
process, type [Event Procedure].
Then click on the button with 3 dots that appears on that line.
When the VBA code window opens, the cursor will be flashing between 2
already existing lines of code.
Write (between thos 2 lines):

DoCmd.SetWarnings False
DoCmd.OpenQuery "QueryName"
DoCmd.SetWarnings True

Change "QueryName" to the actual name of the query you are using.
Exit the code window and you're done.

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #5
If you want to start learning to use VBA code, you could use the
CurrentDB.Execute method. Using Execute instead of Open won't bring up
warnings for action queries, so you won't have to set warnings to False and
hope you don't forget to set warnings to True again.

Since Execute doesn't warn you even if there's a problem, you should
include the dbFailOnError option to the code:

CurrentDB.Execute "MyActionQuery", dbFailOnError

Then you can add some logic to your error-handling routine to handle the
error.

--
Message posted via http://www.accessmonster.com
Nov 13 '05 #6

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

Similar topics

11
by: Alistair Saldanha | last post by:
I'm looking for the event that is fired by Internet Explorer to an "alert": <SCRIPT> Alert("You already have a session open") </SCRIPT> The event would be webBrowser.Document.???? Much...
7
by: Calvin KD | last post by:
Hi everyone, Has someone out there experienced the same problem? What i wanted to do is to display a popup window (modal) upon the loading of a webpage. Here is my code sample (in html view):...
13
by: alvin.yk | last post by:
Hi, Normally, a piece of code such as <a href="http://www.yahoo.com" onclick="alert('hello');return false;">link</a> will stop the browser from actually going to href's destination....
1
by: moho | last post by:
Hi, I've been struggling with AJAX for a while and notice that if I add the alert("xxx") in my code it always makes the code work. I'm using divs where I put the output from the server and then...
9
by: Tonio Tanzi | last post by:
I have an asp page with this tag <body onLoad="show_msg('<%=error_msg%>');"> where "show_msg" is a javascript function that shows the message contained in the asp variable "error_msg" only if...
24
by: Jeremy J Starcher | last post by:
While reading c.l.j, I've noticed that some people prefer and indeed even recommend the use of "window.alert()" over "alert()". I can't find any technical reason to make this distinction, and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.