BoundText Property

       

Returns or sets the value of the field specified by the BoundColumn property.

Syntax

object.BoundText [= value]

The BoundText 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 a data value.

Remarks

After a user makes a selection with a DataList or DataCombo control, the BoundText property contains the field value of the BoundColumn property. When an item in the list is selected, the item becomes available to the Data control specified by the DataSource property. The selection also appears in the text box portion of the DataCombo control where it can be edited. If the user enters a value in the text box portion, the list portion attempts to position to a matching item. If a match is found, the BoundText property value is set, based on the field value of the BoundColumn property. If no match is found, the BoundText property is set to Null.

You can use the BoundText property value to create a query that can then be used to find specific records:

Dim strQ As String
StrQ = "Select * From Products Where SupplierID = " & DataList1.BoundText
' Use the new query with an ADO Data Control to return a new recordset.
Adodc1.RecordSource = strQ

Positioning the Data control, specified by the DataSource property, to a new record sets the BoundText property to the value specified by DataField. The DataList or DataCombo control then searches the records in the list to see if the BoundText value matches the value of the field in the BoundColumn property. If a match is found, the record is highlighted in the list or placed in the text box portion of the DataCombo control.

Data Type

String