Never tried this. Biggest access file I ever worked on was 350MB, and that was tooooooo big. Suggestion: move it somewhere else.
However, as to your question:
Note In Microsoft Access, you can compact a database while it is open, as long as the database has been opened exclusively.
http://support.microsoft.com/kb/288631
code:
Dim db As New DAO.DBEngine()
'CompactDatabase has two parameters, creates a copy of compact DB at the Destination path
db.CompactDatabase(File_Path, compact_file)
dunno what's going to happen if the File_Path and the compact_file is the same, whilst you're still "open" .. but you can always give it a shot (after backing up first)
Good luck.
Joe
Enter your message below
Sign in or Join us (it's free).