Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

ACC2000: Database Doesn't Shrink Automatically When Object Is Deleted


View products that this article applies to.

This article was previously published under Q197591
Novice: Requires knowledge of the user interface on single-user computers.

↑ Back to the top


Symptoms

When you delete an object in Microsoft Access, the size of the database remains the same or gets larger after the deletion.

↑ Back to the top


Cause

Deleting objects from a database does not automatically cause the database to shrink in size. This is because, when an object is deleted, the space that it occupies is marked as available. However, the size of the database does not shrink.

↑ Back to the top


Resolution

If you are deleting objects from a database and you want the database to return to its previous size, you should compact the database.

One of the new features in Microsoft Access 2000 is compact on close. When you use this feature, Access automatically compacts the database each time that you close it. To use the compact on close feature, follow these steps:
  1. On the Tools menu, click Options.
  2. Click the General tab.
  3. Click to select the Compact On Close check box, and then click OK.

↑ Back to the top


More information

Steps to Reproduce Behavior

  1. Open a new database in Microsoft Access.
  2. Import the Orders table from the Northwind.mdb sample database.
  3. Close the database and note the size of the .mdb file.
  4. Reopen the database and delete the Orders table.
  5. Close the database, save the changes, and then note the size of the .mdb file. The size of the database has not decreased and, in some cases, may have increased.

↑ Back to the top


References

For more information about reducing the size of a database, click Microsoft Access Help on the Help menu, type compacting an access database or access project in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

For more information about compact on close, click Microsoft Access Help on the Help menu, type compact anaccess database or access project automatically every time you close it in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

↑ Back to the top


Keywords: KB197591, kbprb

↑ Back to the top

Article Info
Article ID : 197591
Revision : 2
Created on : 7/15/2004
Published on : 7/15/2004
Exists online : False
Views : 306