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)
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.