Occurs when an error halts an operation.
Syntax
Private Sub object_Error(JobType As AsyncTypeConstants, Cookie As Long, ErrObj As RptError, ShowError As Boolean)
The Error event syntax has these parts:
Part | Description |
object | Required. An object expression that evaluates to an object in the Applies To list. |
JobType | Returns the type of operation, as shown in Settings. |
Cookie | Returns the ID of the operation. The ID is set when an asynchronous method such as ExportReport or PrintReport is invoked. |
ErrObj | Returns the number of the error. |
ShowError | Sets a value that specifies if the error dialog displays. |
Settings
The JobType settings are:
Constant | Value | Description |
rptAsyncPreview | 0 | The report is processing a Preview operation. |
rptAsyncPrint | 1 | The report is processing a Print operation. |
rptAsyncReport | 2 | The report is processing an ExportReport operation. |