Topic: about the combox

hi,I have a question about combox
I creat a combox,then use the script to get the field of combox

frmmain.ComboBox1.dbSQLExecute('select item from table where id<=10');

so i can get 10 field of combox1.When I dropdown the combox1,the combox1 can show 10 field text, but i select one of field ,i cann't select the field  . plesase help me. thank you.

Re: about the combox

I suggest that remove script... configure combobox with mvd and set filter in combobox properties...
Filter id< 10.

3 (edited by sparrow 2022-02-02 17:41:24)

Re: about the combox

Field "id", the component could know what records in the database belongs to the selected item.
Allowed SQL query and without the presence of the field "id", but in this case it would be impossible to know what the record ID has selected in ComboBox


select id, item ...

frmmain.ComboBox1.dbSQLExecute('select id, item from table where id<=10');

Re: about the combox

Thanks ,the question has been solved