12 min read
Compacting and Repairing a Database
Compact & Repair reclaims wasted file space and fixes small structural issues — worth running periodically, especially after deleting a large number of records.
You will learn: when and why to run Compact & Repair. You will do: run File → Info → Compact & Repair on RiversideLibrary.accdb.
When and Why
After weeks of work, RiversideLibrary.accdb holds tables, relationships, queries, forms, and reports. Adding and deleting objects can leave empty space inside the file.
Compact and Repair shrinks wasted space and tries to fix minor file problems. It is maintenance — not a substitute for backups.
File → Info → Compact & Repair
Goal
Compact and repair the open database.
Access closes and reopens the file when finished.
Open the database
Do this
Verification
Check your work
You are correct if all of these are true:
- Same tables, queries, forms, and reports. File size on disk may drop slightly.
If something looks wrong
Fix
Close all other Access windows using this file. Close any program that may lock the file. If damage is severe, restore from a backup copy.New
Choose Blank database on the right. Type Library as the file name. Click the folder icon to pick DocumentsLibrary. Then click Create. Access writes Library.accdb.
Blank database panel (right side)
File name: Library · Folder: DocumentsLibrary · Button: Create
What It Does Not Do
- Not a backup — copy RiversideLibrary.accdb to a safe folder before risky work.
- Not undo — compact does not bring back deleted records.
- Not design fix — missing relationships and bad table design stay bad after compact.
After the Riverside Public Library capstone, run Compact & Repair, then copy the file to an archive folder.
Practice
Swipe or use the arrows to move between questions.
1 / 2
Field Notes: Routine Housekeeping
Goal
Reclaim wasted file space and fix small structural issues in a database.
As a database is used over time — records and objects added, edited, and deleted — the underlying file can grow larger than necessary and develop minor internal inefficiencies.
Open File info
Do this
More lessons in Microsoft Access · Next: Multi-User Access: Splitting a Database · Previous: The Table Analyzer and Database Documenter
