in Access2000 and newer, you can set a db to compact automatically when it
closes.
open the database window.
on the menu bar, click Tools, Options.
on the General tab, checkmark the box next to Compact on Close.
hth
Ken said:
Is there VBA code I can use when quiting my application that will compact