PC Review


Reply
Thread Tools Rate Thread

action query message

 
 
iccsi
Guest
Posts: n/a
 
      25th Nov 2010
I unchecked record changes and action queries on Edit Find tab on the
MS Access option, but I still get warning message when my applicaiton
run update and delete queries.

Are there any option can omit the warning mesage when runing update
and delete queries?


Your help is great appreciated,
 
Reply With Quote
 
 
 
 
Tony Toews
Guest
Posts: n/a
 
      25th Nov 2010
On Thu, 25 Nov 2010 08:44:12 -0800 (PST), iccsi <(E-Mail Removed)>
wrote:

>I unchecked record changes and action queries on Edit Find tab on the
>MS Access option, but I still get warning message when my applicaiton
>run update and delete queries.


The problem with DoCmd.RunSQL is that it ignores any errors. Either
of the following will display any error messages received by the
query. If using DAO, use Currentdb.Execute strSQL,dbfailonerror..
For ADO use CurrentProject.Connection.Execute strCommand,
lngRecordsAffected, adCmdText You can then remove the
docmd.setwarnings lines.

If you're going to use docmd.setwarnings make very sure you put the
True statement in any error handling code as well. Otherwise weird
things may happen later on especially while you are working on the
app. For example you will no longer get the "Do you wish to save your
changes" message if you close an object. This may mean that unwanted
changes, deletions or additions will be saved to your MDB.

Also performance can be significantly different between the two
methods. One posting stated currentdb.execute took two seconds while
docmd.runsql took eight seconds. As always YMMV.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access 2007 Macros - SendObject action, Message Text action argume rgille Microsoft Access Macros 8 28th Feb 2012 07:29 PM
Prevent the table modification message in action query Wendy Microsoft Access Queries 1 6th Apr 2010 12:52 PM
remove action query message Waxman Microsoft Access 3 25th Mar 2010 02:30 AM
Message displayed when running action query... MrBo Microsoft Access Queries 5 3rd Aug 2005 09:19 AM
Action Query Message Nick Microsoft Access Form Coding 8 24th Sep 2004 08:44 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:00 PM.