ListData Properties

See Also    Examples    Applies To

ListDataSource and ListDataMember together determine the recordset that their control uses to define the drop-down list.

Property ListDataSource As DataSource

cbo.DataSource

Returns the DataSource object that the cbo control uses.

Set cbo.DataSource = con

Sets the DataSource object that the cbo control uses.

An empty (Nothing) ListDataSource property indicates binding to an atb control. In this case it is recommended to use the Bindings property page to specify a ListDataMember (see below).

Property ListDataMember As DataMember

cbo.DataMember [=strName]

Returns/sets the command in DataSource that the cbo control uses or will be using by the command's name.

When the ListDataSource property is Nothing, binding to an atb control is indicated. In this case an empty ListDataMember property indicates binding to the parent atb (assuming the control is hosted by an atb control). Setting the ListDataMember property to the name of an atb control of the same form binds to that control. Setting the ListDataMember property to a value of the type "formname.atbname" binds to the atb control named "atbname" of the form named "formname". See Connecting Forms to Active Tables.

Property BoundColumn As String

cbo.BoundColumn [=strFieldName]

Returns/sets the field that is used together with the DataField property to connect the ListDataMember record to the DataMember record.

If binding to an atb control is used (see above), the BoundColumn can be set to the name of a column of the connected atb control. An empty BoundColumn property forces binding to the column designated by the ForeignFieldName property of the column that this control is bound to (see DataMember property).

Property ListField As String

cbo.ListField [=strFieldName]

Returns/sets the field that is used for the display by the field's name.

If binding to an atb control is used (see above), the ListField can be set to the name of a column of the connected atb control. An empty ListField property forces binding to the column designated by the ForeignDisplayFieldName property of the column that this control is bound to (see DataMember property).