Eliminate "Do You Want To Save..." Window

If you have an exit button on a form in edit mode, do not want to save any
changes and don't want the "Do you want to save this document window" to
appear, place the following code in the button.

I usually have two exit buttons on a form, one for read mode and one for edit
mode, with the appropriate hide when formulas. The read mode is labeled Exit
with just the FileCloseWindow command. The edit mode button is labeled Exit
without saving.
FIELD SaveOptions := "0";
@Command([FileCloseWindow])

This was first published in November 2000

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.