WillAssociate Event

       

Occurs before a new connection is associated with the object.

Private Sub object.WillAssociate(Connection as rdoConnection, Cancel as Boolean)

The WillAssociate event syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
Connection An object expression that evaluates to the rdoConnection object that is to be associated.
Cancel A Boolean expression indicating if RDO should prohibit the association.

The settings for Cancel are:

Setting Description
True RDO will prohibit the association.
False (Default) RDO will not prohibit the association.

Remarks

This event is raised after you set the ActiveConnection property to a valid rdoConnection object, but before the actual associate is made.

The Connection argument is a reference to the rdoConnection object that you are attempting to associate with the rdoResultset object. When the WillAssociate event is raised, the ActiveConnection property remains set to the value before the attempted association. You can use this property to determine the current rdoResultset connection association.

You can prohibit the association by setting the Cancel argument to True, causing RDO to not associate the result set with the new connection and produce a runtime error. If you do not prohibit the association using the Cancel argument, the ActiveConnection property is set to the reference contained in the Connection parameter after this event procedure completes.