Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Application Exit

Status
Not open for further replies.

NattyP

MIS
Sep 1, 2001
45
JM
Can anybody please advise me of how to trap the quit event for a database.

I wish to trap the event and ask the user to confirm that he/she really wants to exit.

Regards
 
Create a form, leave it hidden but open all the time. In it's OnClose event do your dirty work.

"The Key, The Whole Key, and Nothing But The Key, So Help Me Codd!"
 
930driver......you are a gentle genius! Thank you very much
 
Actually, I made a mistake. Use the On Unload event because it is the one that can be cancelled.

If MsgBox("Exit",vbYesNo) = vbYes then
'exit
Else
Cancel = True
End If
"The Key, The Whole Key, and Nothing But The Key, So Help Me Codd!"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top