[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'DBCtrls' (#lcl)

# TDBLookupComboBox.KeyField

KeyField the name of the field containing the key data.

## Declaration

Source position: dbctrls.pp line 943

`published property TDBLookupComboBox.KeyField : string read GetKeyField write SetKeyField;`

## Description

KeyField is a String property which contains the name of the field in the lookup dataset which corresponds to the DataField in the linked dataset. Read and write access to the property value are redirected to the KeyField property in the internal TDBLookup instance used in the class. Setting a new value for the property causes the internal field data link to be refreshed, and potentially changes the value and the item index in the control.

Use ListSource to specify the component which provides access to the lookup dataset.

Use ListField to specify the field with values displayed in the drop-down for the combo-box control.

## See also

TDBLookUpComboBox.ListSource |  | ListSource the data source that contains the list.
TDBLookUpComboBox.ListField |  | ListField is the name of the field containing the list data displayed in the control.
TCustomDBComboBox.ItemIndex |  | The index of the currently selected item, or -1 if no item is selected.
TCustomDBComboBox.Text |  | The value in the edit box for the control.
TDBLookup.KeyField |  | The name of the KeyField used in the lookup search.
TFieldDataLink |  | Maintains an association between a control, an action, and a field in a linked dataset.