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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prompt for Save on Form Close. Keep Open if Yes and Close if No.

Status
Not open for further replies.

sgupta76

Programmer
Nov 26, 2003
34
0
0
US
I have an unbound form with a save button. When a user clicks on the X button to close the form, I want to pop up a message box asking if they want to save the data or not. If yes, then I want the form to remain open so they can then click on the Save button and save data.
If they select No, then the form closes.

How do I prevent the form from closing when the user selects 'Yes'?

thanks.
 
Why not just have it save automatically if they click yes? Just copy paste what the save command does into the click yes code.
 
Thanks timekeeper. I found another thread that addressed my issue where I can change the controlbox property to No and then create a save button and put my code there.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top