Send Compact&repair cmd to linked DB

  • Thread starter Thread starter Ladi
  • Start date Start date
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
 
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.
 
Back
Top