TDBComboBox question lazarus / 31-LCL ---------------------------------------------------------------------- xaver13 · 2017-11-27 21:11 Hello I have problem to get checked value from TDBComboBox I fill it Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   DBCmbTyp.Items.Add('n/a');  while not Query11.EOF do  begin    if Query11['col_3'] <> null then      DBCmbTyp.Items.Add(Query11['col_3']);      Query11.Next;  end; But how to get which value user selected ? I can compile something as Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i DBCmbTyp.Text I need to use it in a code Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Query1.SQL.Text := 'Select * From wallet where col_3 = ' + DBCmbTyp.Text;  but it works not. Please do you know simple and clever solution? Thank you very much for help. ---------------------------------------------------------------------- PatBayford · 2017-11-27 22:37 DBCmbTyp.Items holds the text values of the entries. DBCmbTyp.ItemIndex holds the index of the selected item in the list, assuming you do not allow multi-select. So, the selected entry from  the list is given by DBCmbTyp.Items[DBCmbTyp.ItemIndex] ---------------------------------------------------------------------- fpcoder · 2017-11-27 23:33 If your intention is to do master/detail (using one query or list to select a resultset with another query) then you may have a look at the tutorial below. There is no need to set the SQL.Text manually, it is automatic if you learn how to do it: http://wiki.freepascal.org/MasterDetail