BindingCollection.Add Method (VB6) |
Named Arguments
Yes
Syntax
oBindingColl.Add Object, PropertyName, DataField[, _
DataFormat[, Key]]
oBindingColl
Use: Required
Data Type: BindingCollection object
An object reference that returns a BindingCollection object.
Object
Use: Required
Data Type: Object
The data consumer object. Either a form, control, or VB data bound class.
PropertyName
Use: Required
Data Type: String
The property of the consumer object to be bound to Datafield.
DataField
Use: Required
Data Type: String
The field of the recordset to be bound to PropertyName.
DataFormat
Use: Optional
Data Type: StdDataFormat object
An object reference to a stdDataFormat object; see the Data Format Objects entry for additional detail.
Key
Use: Optional
Data Type: String
A unique string value to allow direct access to the Binding object.
Description
You use the Add method to create the link between a field in the data provider object and a field in the data consumer object.
The Add method of the BindingCollection object is identical in concept to any other collection's Add method. The BindingCollection object uses the Add method to assign various properties and to create a new Binding object in the collection.
Rules at a Glance
Objectmust be a data consumer object. It can be any form, control, form object, or even a VB class.
Programming Tips and Gotchas
The data provider object is assigned to the BindingCollection by assigning an object reference to the DataSource property. Both ...
Get VB & VBA in a Nutshell: The Language now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.