RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TField.KeyFields Property

Identifies the field or fields in the dataset that must be matched in a lookup dataset when doing a lookup.

Pascal
property KeyFields: WideString;
C++
__property BSTR KeyFields;

Set KeyFields only on lookup fields (fields where FieldKind is fkLookup and Lookup is true). KeyFields specifies the field or fields to match when a lookup occurs. To use more than one field, separate each field name with a semicolon. The specified fields must be of the same types as the corresponding fields in LookupKeyFields, or the lookup fails. 

The values of the KeyFields in the DataSet are matched with the values of the LookupKeyFields in the LookupDataSet to determine a particular record of the lookup table. The value of the LookupResultField on that record becomes the Value property for the field component. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!