compress the database everytime when I quit the database ,

  • Thread starter Thread starter Martin
  • Start date Start date
M

Martin

I want to make this:

everytime I quit my database, it will automatically compress itself.

How to make it possible?

Thanks!

Martin
 
can you set this on vb to cause it to overide if this option is not set?

sam
 
In your Startup Forms , say "MainMenu", in OnOpen Event in this form:

Application.SetOption "Auto Compact", True

"SAm" 來函:
 
i got an error after inserting the following code on my startup form:

Private Sub Form_Open()
On Error GoTo Err_Form_Open

Application.SetOption "Compact on Close", True


Exit_Form_Open:
Exit Sub

Err_Form_Open:
MsgBox Err.Description
Resume Exit_Form_Open
End Sub
 
sorry, on this one too:

Private Sub Form_Open()
On Error GoTo Err_Form_Open

Application.SetOption "auto compact", True


Exit_Form_Open:
Exit Sub

Err_Form_Open:
MsgBox Err.Description
Resume Exit_Form_Open
End Sub
 
The option name may be case-sensitive.

Try:

Application.SetOption "Auto Compact", True

(tested OK in A2002 & A2003)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top