How to Stop Microsoft Access Warnings from Turning On or Off via VBA
Question details
The user needs to stop Microsoft Access system warnings from automatically disabling or enabling due to hidden VBA commands or macros.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Developing, troubleshooting, or running a Microsoft Access database where confirmation messages behave unpredictably.
- Observed behavior
- System confirmation warnings are disabled or acting unpredictably, even when default confirmation options are enabled in Access settings, likely due to DoCmd.SetWarnings False calls.
Before modifying VBA code or macros, make sure to create a backup copy of your Access database (.accdb or .mdb) to prevent accidental data loss or code corruption.
Search and Modify VBA Modules for SetWarnings Commands
Use the VBA editor to locate and remove unintended commands that turn off system warnings globally.
In many cases, an automated process or developer turns off warnings to prevent pop-ups during action queries, but fails to turn them back on. Finding and removing these commands restores normal behavior.
Press Alt + F11 or Ctrl + G while your Access database is open to launch the Microsoft Visual Basic for Applications window.
Press Ctrl + F to open the Find dialog. Type 'SetWarnings' into the 'Find What' box, and select 'Current Project' under the Search options to search across all modules.
Look for lines of code containing DoCmd.SetWarnings False, Off, or 0. Comment them out by adding a single quote (') at the beginning of the line, or delete them entirely.
Save your VBA code changes, close the editor, and reopen the Access database to verify if normal warning behavior has returned.

Inspect AutoExec Macros and Startup Form Events
Warnings might be disabled immediately upon opening the database if a macro or startup form contains the command.
Looking for a Free Alternative to Microsoft Office?
While WPS Office does not include a database management tool like Access, it serves as a powerful, free alternative for Word, Excel, and PowerPoint. If you are struggling with complex Office setups, try WPS Office for a lightweight and highly compatible experience.
- 1. Visit the WPS Office Website: Navigate to the official WPS Office website to access the latest free version.
- 2. Download the Installer: Click the 'Free Download' button and save the installation file to your computer.
- 3. Install and Launch: Run the installer, follow the on-screen prompts, and start opening your Office documents instantly.

Frequently Asked Questions
Why do developers turn warnings off in Access?
Developers often turn off warnings temporarily using DoCmd.SetWarnings False to prevent pop-up confirmation messages from interrupting the user when running automated action queries, such as append, update, or delete queries.
I deleted all SetWarnings commands, but warnings are still off. What should I do?
You can manually restore warnings by opening the Immediate Window in the VBA Editor (Ctrl + G), typing DoCmd.SetWarnings True, and pressing Enter. Also, check your Access Options under 'Client Settings' to ensure the 'Confirm' checkboxes for Record changes, Document deletions, and Action queries are ticked.
Does DoCmd.SetWarnings True override Access Client Settings?
No, running DoCmd.SetWarnings True only reinstates the system confirmation alerts that are already enabled in your Access Client Settings. It will not force warnings to appear if they are manually unchecked in your application options.




