What is function name when DB close?

s1police

Registered User.
Local time
Today, 10:44
Joined
Aug 1, 2007
Messages
50
I would like to ask,

The functionName for database close?

For example, when user click close button on top right hand corner or the close button that I created. I would like VBA to do some procedures before close.

If user uses the button that I create to close the database, then I can insert some sub function after button, what if user click close button on top right hand corner?

Is there any function name for it?!
 
Hum... DoCmd.Quit?

I usually put it in something like:

Code:
If MsgBox("Exit Application?", vbYesNo + vbQuestion, "Application...") = vbYes Then
        DoCmd.Quit
End If

:)
ken
 
I would like the access to export a text file after the database close by user.
For example, export some system log that I created, then delete the records inside.
So, the size is not too large for Access.

That's why I ask what is the Function Name of closing database.

DoCmd.Quit is used to close the database. I suppose there is a function like this,

Sub DBClose()
.....<I can add some function here....>
DoCmd.Quit
End Sub

The DBClose() should be perform after user click close button or close button at top right hand corner before Database close.

Thanks for your help first, Anyone idea on this?!
 
If you have a form that is always open, then you can use it's UNLOAD event to do something before the database closes (if they click the X to close the database).
 

Users who are viewing this thread

Back
Top Bottom