How to Fix a Corrupted Access Database

A corrupted Access database can prevent you from opening files, running queries, or saving changes. Before attempting any repair, make a copy of the .accdb or .mdb file so you always have the original to fall back on.

Method 1: Compact and Repair Database

This built-in tool fixes most minor corruption issues such as orphaned objects and index problems.

  1. Open Microsoft Access (without opening the corrupted file).
  2. Go to Database Tools → Compact and Repair Database.
  3. Browse to your database file and click Compact.
  4. Access creates a repaired copy in the same folder.

Method 2: Import Objects into a New Database

If Compact and Repair fails, create a blank database and import all objects from the corrupted file:

  1. Create a new blank database (File → New → Blank Database).
  2. Go to External Data → Import Access Database.
  3. Select 'Import tables, queries, forms, reports, macros, and modules'.
  4. Import each object group and test functionality.

Method 3: Restore from Backup

If you follow a regular backup schedule (see our backup and restore guide), restoring the most recent clean backup is often the fastest path to recovery. Compare the backup date with when corruption symptoms first appeared.

Method 4: Decompile VBA (For Code-Related Corruption)

Corruption sometimes stems from damaged VBA project data. Close Access, then run from the command prompt:

  • "C:\Program Files\Microsoft Office\root\Office16\MSACCESS.EXE" /decompile "C:\path\to\your\database.accdb"
  • Open the database, open any module, and press Debug → Compile VBAProject.
  • Run Compact and Repair again after compiling.

Prevention Tips

  • Split the database into front-end and back-end files for multi-user environments.
  • Close Access properly — avoid force-quitting during write operations.
  • Store the back-end on a stable network share with proper permissions.
  • Schedule weekly Compact and Repair during off-hours.

Have a question? Get a free quote