Occurs for every page in a form when the Cancel button is clicked.
Use this event to write code that performs any desired action when the user clicks the Cancel button in a form. This event is also sent to the Form object after it has been sent to all Page objects. You can prevent the form from automatically closing after the user clicks the Cancel button by handling the Page object's OnQueryCancel event. You must handle the OnQueryCancel event for every page in the form if you want to handle it at all. This event also occurs when the form is closed via the Form object's Close method (if the OK argument is set to False).