Errors.DeleteAll Method

InfoPath Developer Reference

Deletes all of the Error objects contained in the Errors collection.

Version Information
 Version Added:  InfoPath 2003

Syntax

expression.DeleteAll

expression   An expression that returns a Errors object.

Return Value
Nothing

Remarks

To delete a specific Error object from the Errors collection, use the Delete method.

Bb229759.vs_note(en-us,office.12).gif  Note
Unlike the Delete method that will only delete errors that were created using the Add method of the Errors collection, the DeleteAll method will delete all errors in the Errors collection, regardless of how they were created.

Security Level 2: Can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

Example

In the following example, the DeleteAll method of the Errors collection is used to delete all the errors that it contains:

JScript
  XDocument.Errors.DeleteAll();

See Also