Visual Basic: DataCombo/DataList Controls

BoundColumn Property

See Also   Example   Applies To

Returns or sets the name of the source field in a Recordset object that is used to supply a data value to another Recordset.

Syntax

object**.BoundColumn** [**=**value]

The BoundColumn property syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
value A string expression that specifies the name of a field in the Recordset created by the Data control specified by the RowSource property.

Remarks

Generally, when working with the DataList and DataCombo controls, you use two Data controls; one to fill the list as designated by the Listfield and RowSource properties and one to update a field in a database specified by the DataSource and DataField properties.

The ListField property designates the field used to fill the list. The second Data control, as designated by the DataSource property, manages a Recordset containing a field to be updated. Once the user chooses one of the items in the list, the field specified by the BoundColumn property is passed to the field in the second Data control, as designated by the DataSource and DataField properties. This way you can designate one field to fill the list, and another field (from the same Recordset) to pass as data to the Recordset designated by the DataSource and DataField properties when an item is selected.

If the field specified by the BoundColumn property can't be found in the Recordset, a trappable error occurs.

Data Type

String