Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compact current Database

Status
Not open for further replies.

Patricha

Programmer
Oct 19, 2000
9
US
Just something I finished

Compacting the Current database.

Several steps are needed to accomplish this.

Create a blank form
call it frmBlank
frmBlank.OnOpen (Event Procedure)
do any maintenece (empty tables..etc.)

frmBlank.OnTimer (Event Procedure)
' Compact database
SendKeys "%", False
SendKeys "(T)", False
SendKeys "(D)", False
SendKeys "(C)", False

If you Created a custom Menu you will need to change
the key strokes to match your menu.

Now when a user wants to compact or you want to compact through your program
YourFrm.OnClick (Event Procedure)
docmd.close acForm, "YourFrm"
docmd.OpenForm "frmBlank",,,,Hidden

Hope this will help someone, as I know it took me some time to figure a way of doing this.

**Cheers**
Andrew

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top