ConnectComplete and Disconnect events (ADO)

Applies to: Access 2013, Office 2013

The ConnectComplete event is called after a connection starts. The Disconnect event is called after a connection ends.

Syntax

ConnectCompletepError, adStatus, pConnection

DisconnectadStatus, pConnection

Parameters

Parameter Description
pError An Error object. It describes the error that occurred if the value of adStatus is adStatusErrorsOccurred; otherwise it is not set.
adStatus EventStatusEnum. When ConnectComplete is called, this parameter is set to adStatusCancel if a WillConnect event has requested cancellation of the pending connection.

Before either event returns, set this parameter to adStatusUnwantedEvent to prevent subsequent notifications. However, closing and reopening the Connection causes these events to occur again.
pConnection The Connection object for which this event applies.