Russell has attended:
Access VBA course
Excel VBA Intro Intermediate course
Excel VBA Advanced course
Vba code for access 2003 database 'compact and repair'
Can you please provide code for automating the compact and repair database procedure? The aim would be to link this to an on-click exit form button event:-
1) close form 2) compact and repair database 3) copy database to a date stamped archive directory 4) close application
RE: vba code for access 2003 database 'compact and repair'
Hi Russell,
Thank you for your question and welcome to the forum.
Try this piece of code:
CommandBars("Menu Bar"). _
Controls("Tools"). _
Controls("Database utilities"). _
Controls("Compact and repair database..."). _
accDoDefaultAction
This code should be the equivalent to using the Tools menu.
I hope this helps.
Regards
Simon