Suppressing Alerts in Access

aervin5

Registered User.
Local time
Yesterday, 19:11
Joined
Nov 14, 2006
Messages
11
Does anyone know how to suppress alerts in Access?

I know the code in Excel is:

Application.Displayalerts = False

However, this does not work in Access.

Thanks!
 
DoCmd.SetWarnings False to turn them off. I believe this is what you want.
 
DoCmd.SetWarnings False
 
The code is
Code:
DoCmd.SetWarnings False

DoCmd.SetWarnings True

but, make sure you always reset to true right after your items you need to have it turned off for. Otherwise, it won't warn you EVER for anything and if you modify code, forms, etc. it won't warn you if you make changes and then forget to save. It will just close without saving.

I always put the set true part in the error handling for any event I've disabled the warnings as it prevents problems where something glitches in the code between the set warnings and will reset them after an error, otherwise you may find yourself without any warnings at all.
 

Users who are viewing this thread

Back
Top Bottom