Windows Management Part II: How to stop the user from accidentally closing the last window in a FileMaker database


Here is a demo file containing the “On Close” script. The script is self contained and can be pasted into any FileMaker database.

How to stop the user from accidentally closing the last window in a FileMaker database

media_1321819672784.png

Add a script called “On Close”

In the Script, prompt them when they try to close the last window.

media_1321819683810.png

Add the Script “On Close” to the File Options

media_1321819702375.png

Under the File Menu select “File Options”

When closing this file – Perform Script “On Close”

media_1321819716878.png

Attach the “On Close” script when closing the file.

Now try and close the last window

media_1321819921633.png

The user will see the dialog box asking them if they really want to close the last window. If they click ‘Cancel’, the script halts the action of closing the window. You could swap the order of the buttons and have Cancel be the default.

Related Articles:
Windows Management Part I: Cleaning up Windows in FileMaker
Changing Window Names based on User Input

Trackbacks/Pingbacks

  1. Changing Window Names based on User Input | HomeBase Software - July 13, 2012

    […] Related Articles: Windows Management Part I: Cleaning up Windows in FileMaker Windows Management Part II: How to stop the user from accidentally closing the last window in a File… […]

  2. Windows Management Part I: Cleaning up Windows in FileMaker | HomeBase Software - July 13, 2012

    […] Articles: Windows Management Part II: How to stop the user from accidentally closing the last window in a File… Changing Window Names based on […]

%d bloggers like this: