Using TwwDBLookupComboDlg to Display One Field Value & Store Another


2003-12-24 01:41:57 PM
delphi151
[Delphi 4 C/S] My app uses an EMPLOYEE table and a TIMECARD table. Each
employee record contains an ID# field [primary key] and a corresponding name
field. On the TimeCard form, I use a DBLookupCombo to display a list of
Employee ID#s and names. The ID# is the value stored in the Time Card
record. Users want the option to search/sort the dropdown list by NAME
instead of ID#. I can set the component to do this, but it tries to store
the NAME value instead of the ID#. Is there any way to configure the
DBLookupCombo to search/sort by NAME, but pull the ID# field value into the
Time Card record?
Thanks very much for any assistance!
- Chuck Burton