Prompt to save changes on close - InfoPath Dev
in

InfoPath Dev

Prompt to save changes on close

Last post 10-27-2005 04:46 PM by franck. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-27-2005 02:08 PM

    Prompt to save changes on close

    Hi

    Is there an easy way of prompting the user on_form_close whether they have unsaved data on the form? If not, can i borrow someone's code to do this.

    Regards
  • 10-27-2005 04:46 PM In reply to

    Re: Prompt to save changes on close

    Hi,

    There is no On_Form_close event in InfoPath. Therefore, you can force your user to use a close button on your form. In there, you can check the thisApplication.ActiveWindow.XDocument.IsDirty flag to see if anything needs to be saved. Next, you can use System.Windows.Forms.DialogResult to display a customized message box. Based on the answer from your user, you can proceed and Save or Close the form without saving.

    Does it make sense?

    Regards,

    Franck Dauché
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.