Access 2002 won't save changes

For the past two hours, my .mdb file does not save any changes I have made to its modules and form code. When I close down the database, it asks whether I want to save my changes and it goes through the motions when I say yes. However, when I open the database again, the changes have not been saved!

Incidentally, the decompile .bat does not do anything to this file either: it flashes open the C: prompt window and immediately closes it, apparently without doing anything...

Any ideas,

Many thanks.
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

Scott McDaniel (Microsoft Access MVP - EE MVE )Connect With a Mentor Infotrakker SoftwareCommented:
I'd bet a fair amount of dinkum that you've got a corrupt database, and most likely a corrupt VBA container. There's really not much in the way of fixes for this other than to move to a new database. In your case, I'd actually save the Modules as Text files (there's an option in the VBA EDitor to "export" them, which is the simplest way to do this), and then import them back into your new database.

You may also have a corrupt form/report. If so, then importing it into your new one could cause you to corrupt the new database. Generally you'll get an error when you try to import a corrupt object, and if you do then you'd import everything except that object and then either rebuild that object, or import it from a known good backup.
PeborghAuthor Commented:
Are there any tools to determine which bit of a database is corrupt?

Probably too much to expect!

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Nothing that I'm aware of. I believe some of the recovery services can determine this, but I'm not really sure about that..
The new generation of project management tools

With’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Jim P.Commented:
There is some software out there that can do it. For the cost I found it is easier to just import into a new blank database.
NerdsOfTechTechnology ScientistCommented:
Try repairing the database from access itself first. Then attempt the changes.

Tools > Database utilities > compact & repair database
thenelsonConnect With a Mentor Commented:
Steps (approximately in order) to use to fix a corrupted Access database. (Test after each step.)


2) Compact and repair

3) Use jetcomp.exe;en-us;Q273956

4) decompile: in run: msaccess "dbPathName.mdb" /decompile
   Compact/repair:  in run: msaccess "dbPathName.mdb" /compact
   compile: in VB editor: debug> compile

5) Use a backup (you have a lot of those -- yes?)

6) If you can identify one or a few forms or reports causing problems, copy the problem form/report from a backup.  Or create a new form/report and copy all the objects in the old form/report to the new one. Copy the code from the old form/report using the undocumented
    Application.SaveAsText acForm, FormName, "C:\" & FormName & ".txt"
then paste that from Notepad into the new form/report.  If a module, copy the code using SaveAsText, create a new module, paste the code into the new module.

7) Create a new database, use File> Get external data> Import to get all objects of the damaged database and set up the options again.

8) Try a recovery tool:

9) Hire a company to repair the database

Additional information:
How to Troubleshoot/Repair Damaged Jet 3.0 and Prior Databases

How to Troubleshoot Corruption in a Microsoft Access Database;en-us;306204

Corrupt Microsoft Access MDBs FAQ
PeborghAuthor Commented:
In the meantime I found Evrything Access and their revival service. Any comments about this outfit?

Sorry to muck you about...


PS thenelson, thanks fo rthe detailed post.
PeborghAuthor Commented:
Finally sorted after reverting to an old backup and getting the d/b cleaned up by EverythingAccess.

Many thanks to all involved.


You're welcome.  Glad to help and thank you very much for the points with the "A" grade!

Happy computing!

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
It would seem that my original post re: corruption would have also been included as well as Nelson's standard copy/paste reply. Was there some reason you failed to include my comment as well?
PeborghAuthor Commented:
as ever, compact and repair and decompile solved nothing but getting the d/b cleaned up by profesionals and reverting to some backups got me there.
All Courses

From novice to tech pro — start learning today.