Compacting a database

D

Douglas J. Steele

If your application is split into a front-end (containing the queries,
forms, reports, macros and modules), linked to a back-end (containing the
tables and relations), you can use the CompactDatabase method of the
DBEngine object to compact the back-end from the front-end. Just make sure
that no open connections exist to the back-end (make sure the .LDB, or
locking file, doesn't exist)

You should never have to compact the current database. However, if you
insist, check http://www.mvps.org/access/general/gen0041.htm at "The Access
Web". (I seem to recall reading somewhere that that approach will not work
for Access 2007)
 
Top