DBLookUpComboBox KeyValue lazarus / 16-Databases ---------------------------------------------------------------------- 99Percent · 2010-08-24 23:53 the current LCL's TDBLookUpComboBox does not have KeyValue property. This is very unfortunate and I think very badly needed. I am considering taking the time to implement it myself, but before I would like to know if there are any (open source) third party components which have a more advanced DBLookUpComboBox Another deficiency is no way to limit to the lookup items. A user can fill the text box with useless characters that don't specify any record of the listsource. ---------------------------------------------------------------------- paolopeg · 2010-08-26 20:08 You're searching 4 DBLookupComboBox1.Field.Value In fact the key_field value is the real datafield associated to the component! So you need only to look at the current value in the query/table. If u want the listfield just look at DBLookupComboBox1.Caption Bye ---------------------------------------------------------------------- 99Percent · 2010-08-27 19:08 Thanks. I forgot to mention that I want to use the DBLookUpCombo Box without a datasource, using the listsource only. ---------------------------------------------------------------------- juanparati · 2010-11-07 19:01 You can get the index field (or other field) directly from the source table. Example: Code: [Select]myTable.RecNo := myDBCombo.ItemIndex + 1; indexvalue := myTable.FieldByName(myDBCombo.KeyField).Value; ---------------------------------------------------------------------- 99Percent · 2010-11-08 02:34 Thanks but DBLookUpComboBox.KeyValue seems to be implemented in the lastest SVN versions. I will try it soon. ---------------------------------------------------------------------- danilo666 · 2010-11-10 10:53 How I update the version of lazarus with dblookupcombobox.keyvalue when have. ---------------------------------------------------------------------- danilo666 · 2010-11-11 10:01 Thank's Juan Parati, I tested your code and worked perfect