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 / Symptom | Try this first | Then |
|---|---|---|
| Unrecognized Database Format / inconsistent state | Import objects into a new blank database | JetComp (legacy) or a repair tool |
| The Microsoft Jet database engine cannot open the file | Copy local and run Compact and Repair | Import objects into a new blank database |
| Access prompts to repair | Choose Yes, then check MSysCompactErrors for what failed | Import only the good objects |
| Too many clients / could not lock file | Get exclusive access and work on a local copy | Restart Access and retry repair |
| Disk or network error / network connection was lost | Copy local and verify storage health | Restore backup or import objects |
| Cannot open any more databases / Too many databases open | Close Access and restart | Open only the MDB you are repairing |
| Not a valid password | Verify the correct database password and security settings | Restore a backup if the password is unknown |
| File already in use / locked | Get exclusive access; if the .ldb remains after everyone exits, restart the PC/server before deleting anything | Copy local and retry |
| Record(s) cannot be read; no read permission | Check file/folder permissions and network share access | Move local and retry |
| Compact and Repair cancelled / OneDrive issues | Move the DB out of offline cached folders | Retry Compact and Repair |
| Random form/report/module errors | /decompile, then Compile, then Compact | Import 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.
- Restore the latest clean backup.
- 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.
- Open Microsoft Access without opening the database.
- Go to File > Info > Compact and Repair Database.
- Select the corrupted MDB file.
- Save the repaired file to a new location.
- 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.
- Create a new blank Access database.
- Go to External Data > New Data Source > From Database > Access.
- Select the corrupted MDB and choose Import (do not choose Link).
- Import tables first (foundation), then queries, then forms/reports/modules.
- If an object fails, skip it and continue; note the failed object for manual rebuild.
- 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.
- Close Access.
- 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.
- Open the database, then in the VBA editor choose Debug > Compile.
- 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.
- Run JetComp and choose the Source (corrupted MDB).
- Select a Destination (new MDB) and start the compact operation.
- 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.
- Install and open the Access Repair tool.
- Add the corrupted MDB file.
- Run the repair scan and preview objects.
- 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).
- Compact and repair a database (Microsoft Support)
- Import from another Access database (Microsoft Support)
- Access specifications and limits (Microsoft Support)
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.
