Send Compact&repair cmd to linked DB

L

Ladi

Hi guys,

I would like to compact my linked db every time I close the app used as the
Interface and Logic.
Is there the possibility to do this?

Thanks in a advance,
Ladi
 
D

Douglas J. Steele

As long as no links to the table are currently active (which you can tell by
whether or not the LDB file exists), you can use the CompactDatabase method
of the DAO DBEngine object:

The CompactDatabase method should be passed two names: the database to
compact and where to compact it to. I typically rename the backend
(replacing .MDB with date.BAK) and then compact the renamed database to the
"proper" name.
 

Ask a Question

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.

Ask a Question

Similar Threads


Top