DBLookuPComboBox or.... lazarus / 16-Databases ---------------------------------------------------------------------- james · 2011-02-22 04:36 I'd like to use the subject to add the content of the listsource field to an edit box.  There is no datasource/datafield used. "Caption" isn't the answer.  DBLookuPComboBox.KeyField doesn't work.  All I get is a field name.  What does one use? ---------------------------------------------------------------------- sorinr · 2011-02-22 06:13 Hi James, Something like edit1.text:=dblookupcombobox1.ListSource.Name ? Regards ---------------------------------------------------------------------- james · 2011-02-22 06:53 Thanks for the answer, but that just displays the datasource name... ---------------------------------------------------------------------- sorinr · 2011-02-22 08:08 Do you need the selected value of the combo displayed in an editbox? If yes: edit.text:=combo.text; with the code on combo's 'on change' event. ---------------------------------------------------------------------- james · 2011-02-22 16:49 That displays the Listfield content.  That isn't what I want, but thanks for the answer. I think I need to clarify what I am trying to do. The combobox uses a ListField called prov_name and this is a lookup list of province and state names. The KeyField is called prov_code and is a lookup list of province and state abbreviations. So, if the province name is 'British Columbia', and I click on British Columbia, the edit box needs to contain 'BC'. Similarly, if the state is California, 'CA' needs to appear in the edit box. ---------------------------------------------------------------------- james · 2011-02-22 23:28 Problem solved. One query to populate the combobox and one more to populate the edit box using the combobox caption.  Painful compared to another Pascal offering.............