How to Repair MDB Files in Access (2026 Guide)


MDB will not open or shows “Unrecognized database format”? Start with the safest fixes: work on a copy, get exclusive access, then run Compact and Repair. If that fails, the fastest recovery is usually importing objects into a new blank database, then recompiling and compacting again.

Quick Answer (Recommended)

  • Work on a copy in a local folder: avoid OneDrive or network paths.
  • Exclusive access + Compact and Repair: back up first and make sure no other users are connected.
  • Compact and Repair fails: create a blank database and import objects from the damaged file.
  • Code/VBA issues: run /decompile, then Compile, then Compact and Repair.
  • Still broken: try JetComp (legacy) or a repair tool.

Quick decision flow

  • Have a backup? Use Method 0.
  • File opens? Start with Method 1.
  • File will not open? Go to Method 2.
  • Forms/modules crash? Use Method 3.
  • Still broken? Try Method 4 or Method 5.

Fix MDB Problems by Symptom (Fastest Path)

Error / SymptomTry this firstThen
Unrecognized Database Format / inconsistent stateImport objects into a new blank databaseJetComp (legacy) or a repair tool
The Microsoft Jet database engine cannot open the fileCopy local and run Compact and RepairImport objects into a new blank database
Access prompts to repairChoose Yes, then check MSysCompactErrors for what failedImport only the good objects
Too many clients / could not lock fileGet exclusive access and work on a local copyRestart Access and retry repair
Disk or network error / network connection was lostCopy local and verify storage healthRestore backup or import objects
Cannot open any more databases / Too many databases openClose Access and restartOpen only the MDB you are repairing
Not a valid passwordVerify the correct database password and security settingsRestore a backup if the password is unknown
File already in use / lockedGet exclusive access; if the .ldb remains after everyone exits, restart the PC/server before deleting anythingCopy local and retry
Record(s) cannot be read; no read permissionCheck file/folder permissions and network share accessMove local and retry
Compact and Repair cancelled / OneDrive issuesMove the DB out of offline cached foldersRetry Compact and Repair
Random form/report/module errors/decompile, then Compile, then CompactImport objects into a new blank database

Before you start (do not skip)

  • Backup first: Access warns repair can truncate damaged data.
  • Work on a copy: use a local folder and avoid OneDrive or offline cache.
  • Exclusive access: no other users connected.
  • Check file size: MDB and ACCDB have a 2 GB limit. Near the limit increases corruption risk.

Avoid these mistakes

  • Do not repair the only copy of the file.
  • Do not repair on OneDrive or a network share.
  • When importing, do not choose Link. Use Import.
  • Do not run multiple Access instances during repair.

What is an MDB file?

MDB is the legacy Microsoft Access database format. It stores tables, queries, forms, reports, and relationships in a single file. Newer Access versions use ACCDB, but many legacy systems still run on MDB.

Why MDB files become corrupted

  • Unexpected power loss or Access crash during write operations.
  • Bad sectors or failing disks.
  • Network interruptions on shared files.
  • Improper shutdown or forced close of Access.
  • Concurrent edits without proper locking.

Common error messages when MDB is corrupted

  • Unrecognized Database Format: header or structure damage.
  • The database needs to be repaired or isn’t a database file: minor corruption or inconsistent objects.
  • Could not use; file already in use: locking or exclusive access issues.

If Access will not open the file at all

When Access cannot open the MDB, skip straight to import or JetComp. Make a copy, try Open and Repair once, then move to Method 2 or Method 4 if the file still will not open.

Method 0: Restore from backup (recommended)

This is the safest way to recover a healthy database.

  1. Restore the latest clean backup.
  2. Open the restored MDB and verify tables, queries, and relationships.

Method 1: Compact and Repair (built-in)

This built-in Access tool fixes minor corruption and reindexes tables. If Access prompts to repair, choose Yes and continue.

  1. Open Microsoft Access without opening the database.
  2. Go to File > Info > Compact and Repair Database.
  3. Select the corrupted MDB file.
  4. Save the repaired file to a new location.
  5. Open the repaired copy and verify data.

Alternate path: File > Open, select the MDB, click the arrow next to Open, then choose Open and Repair.

Tip: If Access only partially repairs, it logs objects it could not fix in the MSysCompactErrors table.

If MSysCompactErrors appears: note the failed objects and move to Method 2 to import only the good objects.

Success check: open a table and run a simple query. If errors remain, move to Method 2.

Method 2: Import objects into a new blank database

This method often works when Compact and Repair fails because it rebuilds the database from usable objects.

  1. Create a new blank Access database.
  2. Go to External Data > New Data Source > From Database > Access.
  3. Select the corrupted MDB and choose Import (do not choose Link).
  4. Import tables first (foundation), then queries, then forms/reports/modules.
  5. If an object fails, skip it and continue; note the failed object for manual rebuild.
  6. Compile VBA, then run Compact and Repair on the new database.

Real-world note: If the file is near 2 GB, import to a new database first. Compaction can fail due to size pressure.

Real-world note: If only some tables import, rebuild the missing ones manually and re-create relationships afterward.

Success check: open the new database and run a simple query. If key tables fail to import, go to Method 3 or Method 5.

Method 3: Decompile (fix compiled VBA corruption)

Use this when forms, reports, or modules trigger compile errors.

  1. Close Access.
  2. Run Access with the /decompile switch using the full path to MSACCESS.EXE.
"C:\Program Files\Microsoft Office\root\Office16\MSACCESS.EXE" "C:\Path\YourFile.mdb" /decompile

32-bit Office on 64-bit Windows:

"C:\Program Files (x86)\Microsoft Office\root\Office16\MSACCESS.EXE" "C:\Path\YourFile.mdb" /decompile

Tip: Office version folders can be Office16, Office15, or Office14 depending on your install.

  1. Open the database, then in the VBA editor choose Debug > Compile.
  2. Run Compact and Repair.

Success check: Compile completes without errors. If it fails, use Method 2 or Method 5.

Method 4: JetComp (legacy utility)

JetComp is an older Microsoft utility for MDB files. It is legacy and may not be actively supported, so always use a copy.

Note: JetComp is no longer prominently hosted by Microsoft. Only use a trusted archive or move to Method 5 if you cannot find it safely.

  1. Run JetComp and choose the Source (corrupted MDB).
  2. Select a Destination (new MDB) and start the compact operation.
  3. Open the new file in Access and verify objects.

Note: JetComp does not support ACCDB files.

Success check: open the destination file and verify key tables. If JetComp cannot create a usable file, move to Method 5.

Method 5: SysCurve Access Repair Tool

Why use this method? Compact and Repair can rewrite/compact the file and may reduce the chance of recovering deleted records later. If deleted-data recovery matters, run a recovery tool first on a copy.

  • When it helps: the file will not open, objects are missing, or import/JetComp fails.
  • When it will not: the file is 0 KB, has been overwritten, or is encrypted and the password is unknown.
  1. Install and open the Access Repair tool.
  2. Add the corrupted MDB file.
  3. Run the repair scan and preview objects.
  4. Save to a new file or export to other formats, then validate key tables.

Success check: open the repaired file and verify tables and relationships.

Prevent corruption after recovery

  • Store MDB files locally instead of unstable network shares.
  • If multiple users access it, split the database (front-end/back-end) and keep the back-end on a stable server share.
  • Use proper user locking and avoid concurrent writes.
  • Run Compact and Repair periodically.
  • Keep regular backups.

Sources / References

These steps follow Microsoft’s recommended repair paths (Compact and Repair, import rebuild, and size limits).

Frequently asked questions

Is Compact and Repair safe?

Yes for minor corruption, but always work on a copy first.

What is MSysCompactErrors?

It is a system table Access creates to log objects that could not be repaired during Compact and Repair.

Does JetComp work with ACCDB files?

No. JetComp supports MDB files only.

Can I repair an MDB on a network share?

Move it locally and make sure you have exclusive access.

Is there a free MDB repair tool?

Compact and Repair, import objects, and JetComp are free. Severe corruption may require a repair tool.

Can you repair an encrypted MDB without the password?

No. You need the correct database password to open or repair an encrypted MDB.

The final word

Start with a clean backup whenever possible. Use Compact and Repair for minor issues, import objects when the file will not open, and reserve JetComp or a repair tool for severe corruption.

The Author

Deepak Singh Bisht

Deepak Singh Bisht

Content Lead |

Deepak is a dedicated IT professional with over 11 years of experience and a key member at SysCurve Software for the last 6 years. His expertise lies in email migration and data recovery, with a focus on technologies like MS Outlook and Office 365. He also works with SQL Server backup and recovery workflows and DBCC diagnostics in Windows environments. Deepak, who also delves into front-end technology and software development, holds a Bachelor's degree in Computer Applications.

More from this author