Here is the code to add to VB.
Private Sub CompactDB_Click()
On Error GoTo Err_CompactDB_Click
CommandBars("Menu Bar"). _
Controls("Tools"). _
Controls("Database utilities"). _
Controls("Compact and repair database..."). _
accDoDefaultAction
Exit_CompactDB_Click:
Exit Sub
Err_CompactDB_Click:
MsgBox Err.Description
Resume Exit_CompactDB_Click
End Sub
-Steve
>-----Original Message-----
>Hi!
>
>Does anyone know how to programmatically compact and
repair the database on the fly? I have a database where
I'm creating and deleting tables and its size swells
quickly until I compact and repair manually.
>
>Thanks a lot for any help!
>
>Dan
>.
>
|