N
Neil
I have the following code on a button which saves and closes the DB:-
Private Sub QuitApplication_Click()
On Error GoTo Err_QuitApplication_Click
If MsgBox("Are you sure you want to exit PROMAS?", vbYesNo + vbQuestion,
"Quit Application?") = vbYes Then
DoCmd.Quit acQuitSaveAll
End If
Exit_QuitApplication_Click:
Exit Sub
Err_QuitApplication_Click:
MsgBox Err.Description
Resume Exit_QuitApplication_Click
End Sub
Now, in addition to this, I'd like for the database to actually be compacted
when closed. Could anybody please edit my code so that the DB also compacts?
Thanks in advance
Private Sub QuitApplication_Click()
On Error GoTo Err_QuitApplication_Click
If MsgBox("Are you sure you want to exit PROMAS?", vbYesNo + vbQuestion,
"Quit Application?") = vbYes Then
DoCmd.Quit acQuitSaveAll
End If
Exit_QuitApplication_Click:
Exit Sub
Err_QuitApplication_Click:
MsgBox Err.Description
Resume Exit_QuitApplication_Click
End Sub
Now, in addition to this, I'd like for the database to actually be compacted
when closed. Could anybody please edit my code so that the DB also compacts?
Thanks in advance