Hi,
I wont to disallow user to close modified document by clicking on tab’s X.
Is there any way to intercept or disallow it?
Thanks in advance,
Zoran Fajka
Hi,
I wont to disallow user to close modified document by clicking on tab’s X.
Is there any way to intercept or disallow it?
Thanks in advance,
Zoran Fajka
Subject: How to disallow or intercept closing document by clicking on tab’s X
Just set the “Continue” variable in the queryclose to false if you don’t want the document to be closed. You might do all kinds of checks before that to ensure the user did not close the document the way you wanted.
HTH
Jens
Subject: RE: How to disallow or intercept closing document by clicking on tab’s X
Hi Jens,
Thanks.
Zoran
Subject: How to disallow or intercept closing document by clicking on tab’s X
Create a hidden Editable field on your form called “ExitCheck” with default value of “0”. Put this code in the Input Validation event:
@If(@IsDocBeingSaved & ExitCheck = “0”; @Failure(“Please use the ‘Save & Exit’ button.”); @Success)
In the PostModeChange event of the form put this code:
@SetField(“ExitCheck”; “0”)
Now add this code to the bottom of your Save & Exit button:
@SetField(“ExitCheck”; “1”);
@PostedCommand([FileSave]);
@PostedCommand([FileCloseWindow])
This will force the user to press the Save & Exit button if the document has been modified. There’s other ways to do it but this is one way I have done it in the past.
Subject: RE: How to disallow or intercept closing document by clicking on tab’s X
Thanks. I will try it.