Code Changes Not Being Saved

J

JamesJ

Why is it at times when I make changes to code in the debug window
the changes aren't saved unless I explicitly do a File-Save.

James
 
A

Allen Browne

If you are able to close the whole database (not merely the code window)
without being prompted to save your code changes, then your database has
started to corrupt.

Decompile a copy of the database by entering something like this at the
command prompt while Access is not running. It is all one line, and include
the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

For suggestions on how to prevent the problem, see:
Preventing Corruption
at:
http://members.iinet.net.au/~allenbrowne/ser-25.html
I'm guessing that #5 is the cause of your particular issue (i.e. editing in
break mode).
 
J

JamesJ

It's happened before but 99% of the time the code gets "saved."
For instance a run-time error might occur and I'll click debug and make
changes but when I try to run it the code reverts back to what caused
the error and the error occurs again.

Thanks, I'll check the links.
James
 
A

Allen Browne

Yep: that's exactly the symptoms of the corruption when Access gets confused
between the 4 versions of the code (compiled and text versions of the actual
and temporary copies), triggered by editing in break mode.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top