Hmmm tried that using the RunCode command in a macro but it didn't work.
DBEngine.CompactDatabase "C:\Documents and Settings\Import Parts.mdb",
"C:\Documents and Settings\Import Parts.mdb"
Got an error: can't find the name 'DBEngine'
"Arvin Meyer [MVP]" wrote:
> "DDogCap" <(E-Mail Removed)> wrote in message
> news:59D73FDA-F2CD-49A8-A1F7-(E-Mail Removed)...
> > Can it be done?
> > Access 2007 - thanks!
>
> I don't think that you can do it with a macro, but in VBA code, the syntax
> would be similar to:
>
> DBEngine.CompactDatabase "C:\FolderName\DBName.mdb",
> "C:\FolderName\DBName.mdb"
> --
> Arvin Meyer, MCP, MVP
> http://www.datastrat.com
> http://www.mvps.org/access
> http://www.accessmvp.com
>
>
>