Link to home
Avatar of baytowel
baytowelFlag for United States of America

asked on

How do you turn off autosave in Access during design?

While designing in Microsoft Access the object is saved automatically without prompting.  This happens whether the object is a query, a form, etc.  If you exit without saving and then reopen the db, the changes have been saved and your original is lost.  This is particularly frustrating during 'what if' designing.  Is there a way to turn this autosave off during design?
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Open the VBA editor and bring up the Immediate Window.

Type in:

DoCmd.SetWarnings False

and hit Enter

See if the issue is resolved.

mx
Avatar of baytowel

ASKER

Nope - same thing.  I can open a form, query, or report and change somehing and when I close it, it just closes with no prompting to save (but it does save it).  This happens with one specific database and not any others.

I have done 'compact and repair', and also created a new database and imported all the objects from the old one into the new one - it still does this, but just on this one database (our most important production database of course....)
Have to ask ... have you rebooted since this started (seriously) ?

There is no autosave feature in Access per se.

The usual culprit is executing a DoCmd.Setwarnings False ... and the corresponding DoCmd.Setwarnings True does NOT get executed.

mx
Yes - have rebooted - this is an ongoing problem with this database (5 years +)

Does setwarnings 'reset' itself when the database is closed down and restarted, or does it remember its last state?  I do use setwarnings off and on in some macros....

And in either case - if I want it to warn me about saving design changes, wouldn't the test be "docmd.setwarnings true" instead of false like the first post?

"Does setwarnings 'reset' itself when the database is closed down and restarted, "
Yes ... it does reset.

Are you *Positive* that in this db, for EVERY SetWarnings False ... you have the corresponding SetWarnings True  ?






ASKER CERTIFIED SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Looks like this is probably the issue - so points all around!  I can not guarantee that for every false there is a true, and there may be a place or two in the logic that allows an escape/exit before the true in certain circumstances.  

I'll try your posted code in a few spots to see if that helps the issue.

Thanks for the help.

T.