98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Access VBA Training and help » Vba code for access 2003 database 'compact and repair'
Vba code for access 2003 database 'compact and repair'
Resolved · Low Priority · Version 2003
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
Thu 15 Dec 2011: Automatically marked as resolved.
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Access tip:Relationship mapsIt is important to create proper relationships between tables. You can use Access to help check your designs and evaluate them by printing them in graphical format to help with design purposes |