Compact And Repair

F

FP1

DS said:
Is there a way to compact and repair your database from a form and have
Access reopen it's self?
Thanks
DS

I think application.CompactRepair will do it.
 
D

DS

Is there a way to compact and repair your database from a form and have
Access reopen it's self?
Thanks
DS
 
D

Dirk Goldgar

In
FP1 said:
I think application.CompactRepair will do it.

No, I'm afraid not. As the help entry for that method notes:

<quote>
The source file must not be the current database or be open by any other
user, since calling this method will open the file exclusively.
</quote>

Also, that method always compacts the source file into another file.
The "Compact and Repair" menu item takes care of closing the current
database, compacting it into an output file, deleting the original file,
and renaming the output file to the original name. At least, I think it
does it that way, rather than copying the compacted output file over the
original and then deleting it.
 

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

Top