Clear

ACCPAC Common Controls

AccpacErrors.Clear

Clears all errors in the collection.

Sub Clear()

Remarks

Clears the error stack.

Example

The following example clears the Errors collection after the program displays each error.
 

Dim Errors As AccpacErrors

Dim nCnt As Long

Set Errors = Session.Errors

nCnt = Errors.Count

If nCnt = 0 Then

    MsgBox Err.Description

Else

    Dim idx As Long

    For idx = 0 To (nCnt - 1)

        MsgBox Errors(idx)

    Next idx

    Errors.Clear

End If