GetBinder Method


Retrieves a reference to a Binder object based on the passed control.

Syntax

object.Getbinder(BinderControlReference As Object, Optional BindingControlReference As Object = Nothing) As cControlBinder_)

object A reference to a valid cCompositeControls class instance.

Returns a reference to a cControl_Binder object. If either of the passed parameters do not correlate to a Binder / Binding object, method returns Nothing.

Parameters

Name Required / Optional Data Type Description
BinderControlReference Required Object Valid reference to a control which a valid cControl_Binder object references.
BindingControlReference Optional Object Valid reference to a control which a valid cControlChild_Binding object references.


Remarks

It is typically unnecessary to specify a reference for BindingControlReference as Binders are unique to their controls. Doing so simply verifies that a particular binder object has a specific binding.

Example

This example demonstrates retrieving a Binder object based on one or two control references.

Dim binder as cControl_Binder

'retrieves the binder which has the form mySubform as a target.
Set binder = myCompositeControls.GetBinder( [Form_myForm].mySubform.Form )

'retrieves the binder which has the form mySubform as a target and possesses a binding to myComboBox.  If there is no such binding, GetBinder returns Nothing.
Set binder = myCompositeControls.GetBinder( [Form_myForm].mySubform.Form, [Form_myForm].myComboBox)

Last edited Dec 29, 2010 at 1:36 AM by vba_junkie, version 1

Comments

No comments yet.