Compact and Repair in VBA code 2003 vs 2007.

  • Thread starter Thread starter Seán
  • Start date Start date
S

Seán

I have a 2003 database which uses the following code to do a compact and
repair (which is part of a larger process of closing the day down).

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

It's worked great until now. Some users are now opening the database using
2007 while (myself included) are sticking with 2003.

Can anyone tell me how to recode this to get it to work from both?
Or if there is a way to determine the version and run the above for 2003 and
a different sub for 2007 (if it can be coded for in VBA for 2007)?

Thanks in advance.
Seán.
 
Hi Seán,

Did you managed to solve this problem?
I actually have the exact same problem but until now did not discover any
viable solution.

Thanks
 
Back
Top