. . . Database development featuring Microsoft Access

Call 503-309-6691

For Free Consultation

 

How To Fix a Corrupted Access Database

database repair services

A corrupted database is not simply annoying, it can bring down your entire business! If your Access database is loading very slowly, or the features that have worked in the past now appear to be broken, your database could be damaged. Try the following steps to fix your database. Often, a few minor procedures will repair your Access Database.

If you find that you can't repair you database, call us at 503-309-6691.

1. Find Microsoft Access Answers Online

Do a web search using Google, Bing or Yahoo! to locate answers. When performing your search, use "database corruption" or "corrupted Access database" to start your search. You can also use the exact error message returned by Access, if any, in your web search. Frequently there are articles that address very specific issues or database errors. If you cannot find a solution or simply don't have time to investigate your database problems, contact us to discuss your situation.

2.Stop All Database Usage

Make certain all Database users have closed the database, so no one is using it. Then review the folder(s) for the front end database and back end database, (if using a split database system. If you locate a .laccdb or .ldb file(s), double check to make certain all database usage is stopped.

3. Backup Your Database

As a safety precaution, backup your database by copying it to a different location; either a different folder, different drive or by creating a zip file. It's a good idea to forward a copy of the backup to yourself via email. If you have an external hard drive for storage, place a copy of the backup database to that drive. This procedures makes certain you have a copy of the file available if you need it later.

4. Turn Off Access AutoCorrect Feature

Autocorrect frequently causes complications in an Access database. We recommend turning AutoCorrect off permanently for your Access database. Use the directions below to locate Autocorrect.

  • Access 2010: File > Options > Current Database. You will need to scroll down to "Name AutoCorrect Options". Uncheck any options that are checked. Ignore greyed out options.
  • Access 2007: Click the Access logo in the top left-hand corner of Access > Access Options. Then scroll down and un-check Track Name Autocorrect Info.
  • Access 2000, 2002, and 2003: Click on Tools > Options > General tab. The Autocorect is located in the General Tab section.

5. Delete Access Temporary Files

Access automatically creates a temporary file for locking your database when it first opens. The file extension for the locking file is ".accdb" for Access version 2007 or Access 2010, or ".ldb" for all previous versions. Normally the Access temporary file is automatically deleted when you exit the MS Access program.

If the database becomes corrupted this temporay locking file could continue to exist.

Delete the .accdb file or the .ldb file. If you have difficulties deleting, you may have users continuing to use the database, so make certain all users have closed MS Access. If the temporary Access file continues to exist, you may be able to remove it by rebooting the computer.

6. Decompile Then Recompile The Access Program Code

Access occasionally confuses programming code entered into the program with the compiled code that Access has converted into machine code. Unfortunately, this issue is more common in MS Access 2007, however Microsoft has apparently addressed this MS Access 2010.

  • Copy these codes into a Notepad or other plain text editor for Access 2007: " C:\Program Files\Microsoft Office\Office12\MSAccess.exe " /decompile " C:\FolderPath\MyDatabase.mdb ".
    For Access 2010, the code should be: " C:\Program Files\Microsoft Office\Office14\MSAccess.exe " and " C:\FolderPath\MyDatabase.mdb ".
  • " C:\Program Files\Microsoft Office\Office12\MSAccess.exe " or " C:\Program Files\Microsoft Office\Office14\MSAccess.exe " is the file path to the MS Access program, unless you made changes for this path during the installation process.
  • The second line of code will direct you to your Access database location. You may need to edit this path; if for example, your database is located on the D: drive.
  • Copy the code onto the Clipboard.
  • Press the key combination of [Window] R (the window key is usually located betweenthe left-hand-side Control and Alt keys on your keyboard).
    • Windows key
  • Press and hold down the Shift Key, then click "OK". This will stop Access from using any startup program code.
  • When Access opens, press the key combination [CONTROL] G. to open the Access programmming code window.
  • Click on the Debug Window, then click Compile.
    • Debug and compile Access
  • Close the Access program code window
  • Important! . . . Go to Step #7.

7. Repair and Compact the database

  • Access 2010: Click on Compact and Repair Database located on the Tools Ribbon
  • Access 2007: Click on the Access Logo in the upper left corner of the Access screen > Manage > Compact and Repair Database
  • Earlier Versions: Click on Tools > Database Utilities > Compact and Repair Database

Finally . . .

These procedures should restore your Access database to complete functionality. If the Access repair tips listed here do not work, you might try restoring your backed up copy created previously. The next paragraph may help in solving the problem.

Please note: Your database may be damaged beyond repair. When this occurs, you should create a new database and, if possible (providing you can still open the damaged database), import all tables, forms, queries, and reports, macros, and modules to the new database. When performing this emergency migration, test the various elements as you import to ensure you are not adding damaged controls (like a broken form) to your new database.