I would recommend very strongly against compacting the database onto
itself.
What I typically do is rename the existing backend, then compact the
renamed
backend to the proper backend name.
That way, I have a backup copy. If you really don't want it, you can
always
delete it once the compact is complete.
--
Doug Steele, Microsoft Access MVP
(no e-mails, please!)
Mota said:
Dear jamie;
Im using Access XP (and 2003 too),and mentioned this as my first choice.But
it compacts DB and saves a new instance of it on another place,not on
itself.I used the same address(source path) as Destination,but an error
occured.How to adjust this for compacting a DB on itself?
Thank you for your help.
I think the command you require is the following:
CompactDatabase(SrcName As String, DstName As String, [DstLocale],
[Options], [SrcLocale])
The first argument is the db you want to compact. Use some code to
pass
the path to that argument. I don't know which version of Access you're
using, but there is information on using this function in the Access 2000
Help.
I hope this is of some help.
Jamie
Hi;
I want to compact my BackEnd Database (containing just tables),from
the
FrontEnd program (Containing forms,modules,reports,queries) thru code.We
know some ways to compact the CurrentDB.But,is there any code to compact
a
foreighn DB,executing from inside the current database?
Thank you in advance for your help