How to Fix Microsoft Access Warning Messages Not Working

Fix Microsoft Access Warning Messages Not Working

Yesterday, while I was working on monthly reports in Microsoft Access, I noticed that the standard warning messages weren’t appearing. Here’s how I fixed the problem, with an easy solution. And it’s not one of the 2 suggestions that you’ll see in most places!

Warning Message in Access

In Microsoft Access, when I delete a table record, a message like the one shown below appears.

The warning message shows a yellow alert triangle, and the text says:

  • You are about to delete 1 record(s).
  • If you click Yes, you won’t be able to undo this Delete operation. Are you sure you want to delete these records?

There are Yes and No buttons at the bottom of the message.

Those buttons give me a chance to change my mind, if I’ve accidentally deleted something.

Warning message: You are about to delete 1 record(s).
Warning message: You are about to delete 1 record(s).

Two Common Reasons

If you look for help with this problem, most forums suggest a couple of common reasons why Microsoft Access warnings might stop appearing.

  1. Problem with macro code
  2. Option settings for the Access database

I’ve put the steps below, if you want to try those solutions. .

But, maybe you’ve already tried those fixes, and the warning messages still don’t appear!

Try the Easy Fix First

Every couple of years, I run into this problem with the Access warning messages.

I’ve been using this Access database for over 20 years, and nobody else touches it. So, unless I recently changed the code, or the option settings, I don’t expect those fixes to work.

Instead, here’s the easy solution that I usually try first, to see if it fixes the problem.

  • First, I close the Access database
  • Next, I press the keyboard shortcut, Ctrl + Alt + Delete, to open the Task Manager
  • Then, on the Processes tab, I scroll through the list of Background Processes, to look for Microsoft Access.

Seeing a Ghost

Yesterday, about halfway down the list, I found an instance of Microsoft Access running.

  • It was probably a “ghost” from another database that I’d opened and closed earlier in the day.
  • That instance of Microsoft Access could interfere with the monthly reports database.

So, I followed these steps to get rid of that ghost:

  • In the Background Processes list, click on the instance of Microsoft Access, to select it
  • Next, click the End Task button, at the bottom right corner of the Task Manager window.
  • Finally, close the Task Manager window.
Background Processes list in Task Manager
Background Processes list in Task Manager

Test the Fix

To see if that fixed the problem, I did a quick test:

  • First, I opened the database again.
  • Next, I opened a small table, and added a fake record at the end.
  • Then, I deleted that record, to see what would happen.

Hooray! The standard warning message appeared, asking me to confirm the deletion.

I hope that easy fix worked for your Access database too!

However, if that easy fix did NOT fix the missing warnings problem in your database, keep reading.

There are a couple of other things you can try.

Check Database Options

If other people use the database, maybe someone change a database option, without realizing its impact.

To see if the warnings have been turned off in the database option settings, follow these steps.

  • First, at the top left of the Access window, click the File tab
  • In the list at the left, scroll to the bottom, and click on Options
  • When the Access Options window opens, click on Client Settings, in the list at the left
  • Then, scroll down a bit, until you see the Confirm section, in the settings on the right side of the window.
  • Make sure there are check marks for at least these 2 items:
    • Record changes
    • Action queries
  • Then, click the OK button, to apply the changes, and to close the Options window.
Client settings confirm options
Client settings confirm options

Test the Option Settings

If a check mark was missing, and you replaced it, do a quick test to see if that fixed the problem.

For example:

  • Open a small table, and add a fake record at the end.
  • Then, delete that record, to see if the standard warning appears.

However, the settings were already turned on, or if the change didn’t fix the missing warnings problem in your database, there is one more thing that you can try.

Did Macros Turn Off Warnings?

I’ve written many macros in my Access database, to automate the monthly report process.

Some of those macros turn warnings off, at the start of the macro.

  • DoCmd.SetWarnings False

Later, the code turns warnings back on, at the end of the macro.

  • DoCmd.SetWarnings True

For example, a simple macro could look like this:

Sub RunMyQuery()
  DoCmd.SetWarnings False
  DoCmd.OpenQuery "qryMonthSalesTotals"
  DoCmd.SetWarnings True
End Sub

Check the VBA Code

If you have similar code in your Access database, maybe you, or someone else, changed one of the macros recently.

When your editing complex macros, it’s easy to removed a line that turns the macros back on, or put it in the wrong location.

To find out if that’s the problem, you can check all the macros.

  • First, use the keyboard shortcut Ctrl + F, to open the Find dialog box
  • In the Find What box, type: SetWarnings
  • Then, in the Search settings, click the option for Current Project
  • Next, click the Find Next button to find the first instance of that command
  • Scroll down a bit, to be sure that every “False” line is paired with a line to turn warnings back on (True).
  • If a True line is missing, add it to the macro.
Client settings confirm options
Client settings confirm options

Check the Code Location

Most of my macros are more complicated than that simple example, so I carefully checked where that “True” line of code was located in each macro.

For some macros, I’ve got error handling, and an Exit handler too.

I made sure that the warnings were turned on in the Exit handler, like the example shown below..

That way, the warnings are turned back on, even if there was a problem while running the code.

warnings turned on in the Exit handler
warnings turned on in the Exit handler

___________________

How to Fix Microsoft Access Warning Messages Not Working

How to Fix Microsoft Access Warning Messages Not Working___________________

2 thoughts on “How to Fix Microsoft Access Warning Messages Not Working”

  1. Thank you so much for supplying your solution. Your problem described mine, and your solution using Task Manager fixed the problem.

    1. You’re welcome, Michael, and thanks for letting me know that the Task Manager solution worked for you too!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.