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!

Creating a Pop-Up Prompt on exit

Status
Not open for further replies.

clickster

MIS
Feb 19, 2002
89
US
I have a problem with users closing a form with SOME information entered into fields, so I put the following code in to remove any record currently being written:
On Error GoTo Err_Command38_Click


DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70

The problem is that it pops up a box asking if I really want to delete the record. I'm afraid this might confuse the users who don't realize that the incomplete information they have entered is a record (since they didn't hit the button I made to insert the current record). Is there some code that I could put in to make it automatically select YES on the pop-up (so that it doesn't come up at all)?
 
Another quick point. If they haven't entered any information and they close the form, they get an error stating that the UNDO command is unavailable (since there is no information to undo).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top