Compact and Repair a Database

Your Access databases require some routine maintenance to keep them running at top performance. This lesson covers the two Access utilities:

  • Compact Database: When you delete a database object or record, it leaves behind an empty hole that the object previously occupied. This isn't a big deal unless, over time, you have deleted lots of database objects and records. Compacting a database rearranges how the database is stored and reduces its file size.
  • Repair Database: Over time, normal wear and tear causes errors to appear in your database, thus affecting its performance. Usually these errors are very minor and can easily be fixed by repairing the database.

Manually Compact and Repair

If your database seems buggy or you're getting error messages, it would be a good idea to run the Compact and Repair Database command.

  1. Click the Database Tools tab.
  2. Click the Compact and Repair Database button.

    Before using the Compact and Repair Database command, it's a good idea to back up your database. To do this, click the File tab, click Save & Publish, click Save Database As, and select Back Up Database under Advanced.

    Manually Compact and Repair

Access compacts the database and repairs any errors it finds.

Automatically Compact and Repair

When you set up Access to automatically compact and repair a database, only the database that's currently open is affected. To set up others, you need to set up each database individually.

  1. Click the File tab.
    Automatically Compact and Repair
  2. Select Options.
    Automatically Compact and Repair
  3. Click the Current Database tab.
  4. Select the Compact on Close option.
    Automatically Compact and Repair

Now Access will automatically compact and repair the database each time you close the database.

FREE Quick Reference

Click to Download

Free to distribute with our compliments; we hope you will consider our paid training.