Hello all,
Im having an issue with compacting an access 97 database. I am currently runing the following code which works fine ONCE! However, when I run the code a second time I get an error because the file i wish to create and compact already exists. Is there a way to delete the file before creating & compacting? a bit like......
' *** START
' *** desired code here
' delete Acces db "C:\compacted_db.mdb"
Application.DBEngine.CompactDatabase "C:\db_to_compact.mdb", "C:\compacted_db.mdb"
' *** END
if you coud also give any help on automatically zipping the compacted file "C:\compacted_db.mdb" (the desired result is to let a user email a set of files), then you truely would be a saint
Cheers, John