Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Turning off annoying warning messages! 3

Status
Not open for further replies.

ColinM

Programmer
Jun 29, 2000
189
TH
I have an access database which contains three append queries which are run from a macro. This works okay but it comes up with this:
You are about to run an append query that will modify data in your table.

This can be turned by clearing the check box in:
Tools\Options\Edit\Action Queries

However for deployment I wish to turn it off in VBA, is this at all possible and if so how do I go about it??? [sig][/sig]
 
docmd.setwarnings = false will turn them off
docmd.setwarnings = true will turn them back on.

I HIGHLY recommend that you make sure that you have code that turns them back on in every possible exit point of your app! Some users have come to depend on those &quot;You are about to delete 10,000 records, do you really want to do this?&quot; messages. ;-) [sig]<p>Kathryn<br><a href=mailto: > </a><br><a href= > </a><br> [/sig]
 
That was suprisingly easy,thanks :) [sig][/sig]
 
I want to change the value of a field from say 0 to 1 in all records. What syntax can Use to make this universal change. This would be like doing a find and replace all in the table. I want to do this in a VBA setting. Can anyone help me? Thanks for your time. [sig][/sig]
 
The following code will alter the value in field 'fldb' withing table 'tbl' from the value '0' to the value '1'.


DoCmd.setwarnings=false
DoCmd.RunSQL &quot;UPDATE tbl SET tbl.fldb = 1 WHERE (((tbl.fldb)=0));&quot;
DoCmd.setwarnings=true

(the setwarnings just turn the warnings on/off)

Hope this is of help..... [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top