473,651 Members | 2,994 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2129

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.Setwarnin gs False
<<Run your query here>>
DoCmd.Setwarnin gs True

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

"galsaba" <ga*****@aol.co m> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.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.SetWarnin gs False
DoCmd.OpenQuery "QueryName"
DoCmd.SetWarnin gs 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.Execu te 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.Execu te "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
4574
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 appreciate any help you can give me. Thanks,
7
6207
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): <HTML> <HEAD> .... </HEAD> <BODY onload="ShowPopUp();" MS_POSITIONING="GridLayout"> ....
13
38567
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. However, this is not the case with the IE7 I am using. What has changed?
1
1404
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 handling the info from there. Sometimes the JS doesn't find the newly inserted tags (divs with id), only when I add the alert command before it. It's kind of strange. Aswell as when enabling FireBug. So I guess that FireBug and the alert are doing...
9
5303
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 this variable is not empty. The message is shown using the "alert()" function. The page works good in almost all the case, but some users have reported to my that the alert window don't appear.
24
8203
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 seems to have a (tiny) amount overhead since window itself points to the global object, hence, a circular reference. (From everything I am reading, window is just a REFERENCE back to the global object, as opposed to a separate object.)
0
8361
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8278
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8701
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8466
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8584
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2701
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1912
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1588
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.