473,405 Members | 2,404 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,405 software developers and data experts.

Getting rid of warning messages for delete queries

I have a delete query I linked to in a form. Everytime I click on the link, I get two warning messages about using the delete query. The first is "Are you sure you want to run this delete query" and the second is "You are about to delete XXX number of lines." Is there any way to eliminate these warning messages? Thanks.
Aug 16 '10 #1
3 2142
NeoPa
32,556 Expert Mod 16PB
You can either use these lines around your code :
Expand|Select|Wrap|Line Numbers
  1. Call DoCmd.SetWarnings(False)
  2. Call DoCmd.RunSQL(...)
  3. Call DoCmd.SetWarnings(True)
or, alternatively, use the .Execute method of the database instead :
Expand|Select|Wrap|Line Numbers
  1. Call CurrentDB.Execute(strSQL)
Aug 16 '10 #2
Thanks, the code took out the messages
Aug 16 '10 #3
NeoPa
32,556 Expert Mod 16PB
I'm pleased that helped :)
Aug 16 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: John Baker | last post by:
Hi: I have W98 and Access 2000, and am running a fairly complex application with all sorts of delete and append queries. These queries run in background on my system, and make no fuss when they...
5
by: Nonoize | last post by:
Hi all, Could someone please advise on how to stop access issuing warning messages. I have a simple Hyperlink to an MP3 file and everytime I click, up pops "Some files contain viuses etc..."....
0
by: Dan | last post by:
Hello to all. Any knowledge that you might have one the following subject will be GREATLY appriciated. I am new to Access Pages and I can not get rid of the following errors when I open my...
0
by: Matt | last post by:
Hello, I am having an issue when I try to automate Access. When working in the automated application, it seems that all warning messages have been disabled and error handling in reports...
2
by: Irfan Akram | last post by:
Hi Guys, I was wondering if you can help me with this question. I am trying to display warning messages on my web-page, prompting the user to check his action, and confirm what the current...
1
by: Raed Sawalha | last post by:
when i build asp.net application i have theses warnings messages ,what they mean? Preparing resources... Updating references... Warning: The dependency 'EW_Calender, Version=2.5.2055.20123,...
3
by: Chuck Cobb | last post by:
I'm doing a CSharp project in VS2005 and I'm getting some strange warning messages. The problem is that the warning messages don't link to anything in my code so they are very difficult to track...
3
by: Neilg | last post by:
Does any know what the messsage "could not find schema information... happens with Visual Studio 2005 and how to fix it? Thanks -- Neil Gott
0
by: Manish | last post by:
PHP INI File Setting ------------------------------------------------------------------------------------------------------------------ error_reporting = E_ALL & ~E_NOTICE No warning message are...
1
atksamy
by: atksamy | last post by:
Hi, I am running a few delete queries which r getting executed without any error. But the data in tables are not getting deleted. It is as if the queries were not run. I ran them through...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
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
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...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.