Compact and Repair Database

yhgtbfk

Registered User.
Local time
Today, 22:27
Joined
Aug 30, 2004
Messages
123
My database is going to be limited, and practically has no menus.

How can I do the following with the help of visual basic?

When you click on a text button it compacts and repairs the database. (I had a look in the help file but the help page describing this was missing !)

Thank you
 
I found this by searching the forum:

This piece of code will execute Compact & Repair...

Code:
SendKeys "%(TDC)", False

Remember that anytime you compact & repair, Access closes all objects and goes back to startup so you can't successfully do this in the middle of an application.
 
You can also select compact on close in the startup options, that way the database is compacted and repaired everytime you shut it down.
 

Users who are viewing this thread

Back
Top Bottom