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