Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 4th, 2004, 09:12 AM
Friend of Wrox
 
Join Date: Aug 2003
Location: Warks, Warks, United Kingdom.
Posts: 137
Thanks: 0
Thanked 0 Times in 0 Posts
Default Update queries


I have created several updates queries for my database which at present when run Access issues a warning message. Is possible to disable these messages and create my own? And if so how?

Gaz
__________________
Gaz
Reply With Quote
  #2 (permalink)  
Old March 4th, 2004, 09:23 AM
Authorized User
 
Join Date: Dec 2003
Location: Ravenshead, Notts, United Kingdom.
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can use the DoCmd operator if you use code. From memory the syntax is "DoCmd Setwarnings.false" or something very similar. However you should remember at the end of your code to use "DoCmd Setwarnings.true"

Reply With Quote
  #3 (permalink)  
Old March 4th, 2004, 10:03 AM
Friend of Wrox
 
Join Date: Jul 2003
Location: Houston, Texas, USA.
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Before execution it would be:
Code:
DoCmd.SetWarnings False
and after the query use:
Code:
DoCmd.SetWarnings True
Beth M
Reply With Quote
  #4 (permalink)  
Old March 4th, 2004, 11:57 AM
Friend of Wrox
 
Join Date: Aug 2003
Location: Warks, Warks, United Kingdom.
Posts: 137
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Beth your suggestion work.

Many thanks to everyone else also

Gaz
Reply With Quote
  #5 (permalink)  
Old March 4th, 2004, 06:18 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Melbourne, Vic, Australia.
Posts: 308
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Another option would be to use Execute instead of RunSQL

So you'd have something along the lines of:
Code:
CurrentDb.Execute("DELETE * FROM Table1 WHERE Field1='Something'")
rather than:
Code:
DoCmd.SetWarnings False
DoCmd.RunSQL ("DELETE * FROM Table1 WHERE Field1='Something'")
DoCmd.SetWarnings True
Diff'rent Strokes. It takes. Diff'rent Strokes. It takes. Diff'rent Strokes to move the world, yes it does

I am a loud man with a very large hat. This means I am in charge
Reply With Quote
Reply


Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
IIF Formulas used in Update queries kypros79 Access 5 April 12th, 2018 10:06 PM
update multiple columns in an update statement debbiecoates SQL Server 2000 1 August 17th, 2008 05:01 AM
Combining Queries or results from 2 queries Ford SQL Server 2000 24 November 7th, 2005 08:54 PM
update/insert work in queries but not on form jonicholson Access VBA 3 January 18th, 2005 06:05 PM
Queries xzvi0r Access 5 September 8th, 2003 11:03 AM



All times are GMT -4. The time now is 12:55 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.