Add a reference to the DAO object library and use this code:
DBEngine.CompactDatabase "c:\source.mdb", "c:\destination.mdb"
DBEngine.RepairDatabase "c:\source.mdb"
These two features will compact and repair your database. Unfortunately, since this is DAO technology, it only work on Access 97 databases.
You could look into using the Access object and use automation to work with a 2000 database:
Dim objAccess As Access.Application
objAccess.RunCommand acCmdCompactDatabase
But I don't know the details of the Access.Application object.
HTH,
Adam