Can it be done? Access 2007 - thanks!
A Arvin Meyer [MVP] Jul 31, 2008 #2 DDogCap said: Can it be done? Access 2007 - thanks! Click to expand... 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"
DDogCap said: Can it be done? Access 2007 - thanks! Click to expand... 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"
D DDogCap Aug 1, 2008 #3 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'
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'
A Arvin Meyer [MVP] Aug 3, 2008 #4 Make sure that you have a reference set to DAO 3.6. From any code window: Tools >>> References >>> Microsoft DAO3.6 Object Library -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com
Make sure that you have a reference set to DAO 3.6. From any code window: Tools >>> References >>> Microsoft DAO3.6 Object Library -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com