Code changes not saved in A2K

G

Guest

Has anyone else experienced problems with code changes not being saved?

I have a form module open and a standalone module open. I have made changes
to both modules, however I am only using the standalone module as somewhere
to write a quick test sub. I am making major changes to my form module. When
I click the save button, I am presented with a dialog box asking if I want to
save changes. Both the modules are listed and by default both are selected.
Because I don't want to save changes to the standalone module, I deselect
this and then click the 'Yes' button. I then find that the form module that I
thought I had saved has reverted to its original state.

I can find no way to consistently reproduce this problem, and as a result
have only recently managed to verify that there is a problem (not just me
hitting the wrong button or selecting/deselecting the wrong objects when
saving changes).
 
A

Allen Browne

If you deselect the modules where you don't want the change saved, at that
point you are retaining both the last-saved version, and also the
currently-edited-and-unsaved version.

If you want to lose the edits to the module, close the database, and open it
again.
 
G

Guest

OK, that's confused me!

"...at that point you are retaining both the last-saved version, and also
the currently-edited-and-unsaved version."

Question: both versions of what? The modules that are left selected or the
modules that I've deselected. I assume you mean the ones deselected. This is
not the problem. The problem is that I am losing changes to the modules that
I have selected to save, and these are reverting to their previously saved
version. N.B. this does not happen consistently. Having got myself into this
situation yesterday, I repeated the operation several times and it continued
to happen. Today I can not reproduce the problem.

Jon.
 
A

Allen Browne

If you are asking to save them, but Access is losing them, it sounds like a
corruption.

1. Make sure the Name AutoCorrect boxes are unchecked under:
Tools | Options | General
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Then compact the database to get rid of the junk:
Tools | Database Utilities | Compact

3. Close Access. Make a backup copy of the file. Decompile 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"

4. Open Access, and compact again.
 
G

Guest

Thanks for that. I'll give it a try (although I won't know if it's worked
until it never goes wrong again!).

Regards,

Jon.
 

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