ON/OFF Query Prompts

AmyLynnHill

Registered User.
Local time
Today, 07:19
Joined
Dec 7, 2005
Messages
81
I have a DB that runs an update, delete and append queries and turned off the Confirm prompts under the edit options. The problem is this turns off the confirms for ALL Access applications. Does anyone know how to turn off the confirms only in one specific db rather than the entire access?
 
You can use Docmd.SetWarnings False to turn off the query warnings. But make sure to use Docmd.SetWarnings True to turn them back on. Anything options you change in Tools=> Options will effect every Access db you open.
 
And as I always stress when using DoCmd.SetWarnings, make sure you have an error handler in the code that uses it and make the very first thing in that error handler:

DoCmd.SetWarnings True

Otherwise, you may wind up with no error messages of any kind if the process fails before it gets to the code to re-enable them. This comes from personal experience with just that.
 

Users who are viewing this thread

Back
Top Bottom