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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disabling Alerts

Status
Not open for further replies.

NewYorkFashionToGo

Programmer
Oct 20, 2006
44
US
Does anyone know if there is a control to disable the alerts when you append or run an update query? Similar to the one in Excel Application.DisplayAlerts = False
It is probably worded differently. It doesnt show that?
 
Docmd.SetWarnings False

Don't forget to immediately set it back to True -- if you leave it false, one slip of the finger on the delete key and you could delete tables or other objects permanently without knowing.
--Jim
 
So If I have that in a userform behind a command key to trigger a bunch of delete, append and update queries, It will apply to all (every single one) applications in access?Meaning other applications?
 
If all you need it for Action queries you can also use

Code:
Application.Setoption("Confirm Action Queries")= true

With this method you don't have to worry about deleteing tables ,forms with warnings
 
Thanks for the tips, I have a whole bunch of action queries to build a daily report . It prompts me to click okay soooo mahy times,Its Rather annoying. But I definetly fdont want to delete a table by accident...
 
I recently had a similar problem (though on what is probably a smaller scale) and I set a macro to run all the action queries with each query a macro that contained "Set Warnings: No" before Opening the query and then "Set Warnings: Yes" immediately after it. I then simply added a msg box at the beginning and the end (optional) in case anyone else was to run it. Simple, and effective, though I'd not argue it was necessarily the most efficient!

Simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top