Saving Data when clicking the red dot

In a stand-alone database, in a form with text editors, if I am editing a field in a text editor, and I click the red dot while the field is still active, any changes that I have made are not saved.
I want to to make sure that that sort of change is saved. If I could trigger a closeactiveobject statement, that would save it.
I looked for a formCLOSE: option in Form Event Procedures, but I don’t see one in the documentation.
I have, in some databases, put a close button and trained users to use the close button not the red dot. I can do that again, but I wondered if there is another way to do this.

I think this is already fixed in the next release. Here’s what happens if I edit a field and click the close box (I have the System Preferences option enabled to display this dialog).

When I click Save, the changes are saved, and they are there when I re-open the database.

In my case, there are other windows open, so the DB is not being closed.


Just a thought that might help temporarily. In the Form Properties panel you can have this code:

 setwindowoptions "CLOSEABLE","NO"

On the form you can have a manual Close Form button with this code in the Procedure Pane:

setwindowoptions "CLOSEABLE","YES"

Now when the form opens the red close button is disabled and the form can only be closed by manually clicking the close button (unless you go into graphics mode which then reactivates the close button).