|InfoPath Developer Reference|
Version Added: InfoPath 2003
expression An expression that returns a Errors object.
|varNode||Required||Variant||The XML Document Object Model (DOM) node associated with the error.|
|bstrConditionName||Required||String||The name of the error.|
The Delete method deletes all the Error objects in the Errors collection that are associated with the specified XML node and that have the same name. To delete all of the Error objects contained in the Errors collection, use the DeleteAll method.
|The Delete method will only delete errors that were created using the Add method of the Errors collection. It cannot be used to delete errors that occur because of schema or data validation constraints, or errors that were created using the ReportError method of the DataDOMEvent object.|
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.
In the following example, the Delete method of the Errors collection is used to delete all the errors based on their associated XML node and name: