Compact Repair
Using the Compact/Repair Feature in Access
NEW: Compact with VBA Video
NEW: Access Compactor Template
In this tutorial you will learn how to use the CompactRepair Function.
Reasons to compact regularly: if you do a lot of Import/Export.
Access 2007+
Tools > Options
General and checking Compact on Close.
Access 2003
Options -> Current Database -> Compact on close.
VBA
Application.CompactRepair sourceFile, destinationFile
Application.SetOption "Auto compact", True
Rick's Thoughts:
I personally do NOT like automatically compacting.
I've seen databases get corrupted this way.
I like to make it a calendar item for myself once a week to (a) backup, and then (b) compact.
Tips
See Access Tips.
Search
You can find more about this by searching the website.
MS Articles
Macro
By: Alex Hedley
Click here to sign up for more FREE tips