Compact and Repair in VBA code 2003 vs 2007.

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.
 
S

Swyvi

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
 

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