Not prompting for save after edit

Samoan

Registered User.
Local time
Today, 14:56
Joined
May 20, 2004
Messages
18
Whenever I make changes to objects in my Access 2000 database, I no longer receive the prompt to confirm changes (or deletions).

I have seen other threads addressing this issue and followed the advice posted. I do have macros that set warning off, but I always turn them on again at the end of the macro. Also, in my main form that gets loaded when
the database is opened, I have the following code in the form_load event:

DoCmd.SetWarnings (WarningsOn)

Also, in the Edit/Find tab under Tools, Options, the confirm boxes are all checked.

I must be missing something. On a related note, is it possible to display what the current Warnings setting is?

Thank you.
 
Go to Tools/Options to to make sure that the warnings are properly set.

There is only one thing I use a macro for in my databases and that is to set warnings off and then on again. I created two macros - the warnings off macro sets the hourglass on and the warnings on macro sets hourglass off. That way, I can tell if my code has in advertently left warnings off.
 
Thank you for the response.
It appears that the settings are correct in the Tools/Options menu.

In the Edit/Find tab, the 3 boxes in the confirm section are all checked.

I added a macro that simply turns warnings on and off. When I run this macro, warnings are back on again and all is well. Until I exit Access. When
I come back in, they are again turned off.

So in my main form's load event, I now have:
DoCmd.SetWarnings (WarningsOn)
DoCmd.RunMacro "mSetWarnings" --which should run my macro to set warnings off and on.

However, it is almost as if this code is never run when the form loads.

Strangely, if I add a 3rd line to my load event, a MsgBox, then everything is fine. My warnings are turned on. But if I don't run the MsgBox, no warnings.

I'd prefer not to have my users have to click on a meaningless message box every time they open the database. Is there perhaps a better places to put this code instead of the form load event? I've tried the open event as well.
 
Last edited:
If the warnings are being set off when this db opens, you need to find the code that does it. I think you missed the point of my macros. The point is to have a VISUAL clue when I turn the warnings off so that if the code that turns them back on isn't executing for some reason, I can SEE that I have a problem. I suggest that you create the two macros for yourself and search and replace your db. That way you'll SEE that your code is turing the warnings off.
 
I have done as you suggested. There are only a couple of places where I turn the warnings off, those are in macros. I added a line to each of those macros to turn the hourglass on when warnings are off. I also searched my modules to make sure I'm not turning them off in there (I am not).

When I open the database, the hourglass is not on. The macros that set the warnings off are only run if certain buttons are pressed. The warnings don't work when the database is opened, before any of those macros are run. Only if I manually run a macro to turn the warnings on will the warnings actually turn on. As I mentioned, trying to run the macro from the form's load event doesn't seem to work unless I include a MsgBox. Very strange.
 
I just had this problem...

I think I resolved it by going into the immediate window of the vbe and using the DoCmd.SetWarnings True command and then saving the database.

My conjecture is that it saves the last state - maybe by setting it in code or in the immediate window...?

The database now shows the warnings.
 

Users who are viewing this thread

Back
Top Bottom