Access 2007 Compact & Repair

K

Kirk P.

I've got a database that stores data imported from 500 or so text files.
Each month, new text files are created, therefore I've got code to run a
delete query to remove the previous month's records from the target table in
preparation for import of the new month's data.

I'm dealing with 1.5 to 2.0 million records, so the database size is
substantial. I need to import the new month's data into a compacted database
(otherwise I go over the 2 GB limit). I'm looking for VBA code to run
immediately after the delete query. I've always used this with prior
versions...

CommandBars("Menu Bar").Controls("Tools").Controls("Database
utilities").Controls("Compact and repair database...").accDoDefaultAction

But in Access 2007 this doesn't work anymore. Is there other code I can use
that will work with Access '07?
 

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