Microsoft KB Archive/922211

= A Submit event in a hosted InfoPath 2007 form always occurs first in the InfoPath form and then in the host =

Article ID: 922211

Article Last Modified on 2/7/2007

-

APPLIES TO


 * Microsoft Office InfoPath 2007
 * Microsoft Office Forms Server 2007

-





SYMPTOMS
If you create a hosted Microsoft Office InfoPath 2007 form that uses the Submit event handler, the Submit event always occurs first in the InfoPath form and then in the host. If the code in the Submit event in InfoPath 2007 cancels the event because an error occurs, the Submit event in the host will not occur, and you may receive an error message that resembles the following:

The form cannot be submitted.



CAUSE
This behavior occurs because the Submit event in the InfoPath form is canceled when the CancelableArgs.Cancel property of the SubmitEventArgs( .CancelableArgs.Cancel) class is set to true.

Note  is a parameter of the SubmitEventArgs class.

Keywords: kbtshoot kbinfo KB922211

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.