About compacting an Access database or Access project

About compacting an Access database or Access project

Starting with this version, Microsoft Access now combines compacting and repairing Microsoft Access databases into a single process. However, Access only compacts Microsoft Access projects; Access doesn't repair Access projects.

Compacting an Access database or an Access project   If you delete data or objects in an Access database, or if you delete objects in an Access project, the Access database or Access project can become fragmented and use disk space inefficiently. Compacting the Access database or Access project makes a copy of the file and rearranges how the file is stored on your disk.

Compacting optimizes the performance of both Access databases and Access projects. However, in an Access project, compacting does not affect database objects — such as tables or views — that reside in the Microsoft SQL Server database instead of in the Access project itself. Also, compacting has no effect on autonumbering in an Access project. However, in an Access database, if you have deleted records from the end of a table that has an AutoNumber field, compacting the database resets the AutoNumber value; the AutoNumber value of the next record you add will be one greater than the AutoNumber value of the last undeleted record in the table.

Repairing an Access database   In most cases, Microsoft Access detects that an Access database is damaged when you try to open it and gives you the option to compact it at that time. In some situations, Microsoft Access may not detect that an Access database is damaged. If an Access database behaves unpredictably, compact it.

Compacting a previous-version Access database won't convert it to Access 2000 format. Learn more about converting a previous-version Access database.

If you are compacting a multiuser (shared) database that is located on a server or shared folder, make sure that no one else has it open. You must have Open/Run and Open Exclusive permissions for an Access database in order to compact it. Learn more about assigning permissions.

Return to Compact an Access database or Access project