Combo Box Control, List Box Control, Table Fields.
When you make a selection from a list box or combo box, the BoundColumn property tells Microsoft Access which columns values to use as the value of the control. If the control is bound to a field, the value in the column specified by the BoundColumn property is stored in the field named in the ControlSource property.
The BoundColumn property has the following settings.
Setting | Description |
0 | The ListIndex property value, rather than the column value, is stored in the current record. The ListIndex property value of the first row is 0, the second row is 1, and so on. Microsoft Access sets the ListIndex property when an item is selected from a list box or the list box portion of a combo box. Setting the BoundColumn property to 0 and using the ListIndex property value of the control might be useful if, for example, you are only interested in storing a sequence of numbers. |
1 or greater | (Default) If the setting is 1 or greater, then the corresponding column value becomes the controls value. If the control is bound to a field, then this value is stored in the current record. |
You can set the BoundColumn property in the objects property sheet, a macro, or Visual Basic.
For table fields, you can set this property in table Design view for fields with the DisplayControl property set to Combo Box or List Box.
Note Microsoft Access sets this property automatically when you select Lookup Wizard as the data type for a field in table Design view.
In Visual Basic, set the BoundColumn property using a number or a numeric expression equal to a value from 0 to the number set by the ColumnCount property.
The leftmost visible column in a combo box contains the data that appears in the text box part of the combo box in Form view or in a report. The BoundColumn property determines which column in the control will be stored when you make a selection. This allows you to display different data than you store as the value of the control.
Note If the bound column is not the same as the leftmost visible column in the control, the LimitToList property is set to Yes.
Microsoft Access uses zero-based numbers to refer to columns in the Column property. This means that if the BoundColumn property is set to 1, you could access the value stored in that column using the expression Column(0).
If the AutoExpand property is set to Yes, Microsoft Access automatically fills in a value that matches the data in the text box.
AutoExpand Property, Column Property, ColumnHeads Property, ColumnWidths Property, ControlSource Property, ListRows Property, ListWidth Property, MultiSelect Property, Selected Property, Value Property.