Visual Basic Reference

DataMember Property (ActiveX Controls)

See Also Example Applies To

Returns or sets a specified data member****from among several offered by the data provider.


object.DataMember [= string]

Part Description
object Required. An object expression that evaluates to an object in the Applies To list.
string The name of a data member.


A data provider can have multiple sets of data that a data consumer can choose to bind to. Each set of data is called a "data member," and is identified by a unique string.

For example, when using a Data Environment that contains several Command objects as a DataSource, the DataMember specifies which Command object to use.

When using a class module or a user control as a data source, program the GetDataMember to return an appropriate data member. The event's DataMember argument contains the value of the DataMember property. By querying the argument, you can determine what data member is requested, and pass back the appropriate data through the Data argument.