Thanks radzmar! Works like a charm.To clarify for everyone else, radzmar's script, when added to the click event after an xfa.host.messageBox, opens a second dialog box when the user clicks 'OK'. The second dialog box asks if the user wants to close the document and allows for 'OK' or 'Cancel' to ...