Topic: in combobox the last record first choise

Hi , is it possible in a combobox to have the last record in the  first choise ? how can i do that?

Re: in combobox the last record first choise

v_pozidis wrote:

Hi , is it possible in a combobox to have the last record in the  first choise ? how can i do that?

Hello,

You can do it only using script. You should populate ComboBox using SQL query, where you can use any kind of sorting, example:

procedure Form1_OnShow (Sender: string; Action: string);
begin
   Form1.ComboBox1.dbSQLExecute ('SELECT fieldname, id FROM tablename ORDER BY id DESC');
end;
Dmitry.

Re: in combobox the last record first choise

DriveSoft wrote:
v_pozidis wrote:

Hi , is it possible in a combobox to have the last record in the  first choise ? how can i do that?

Hello,

You can do it only using script. You should populate ComboBox using SQL query, where you can use any kind of sorting, example:

procedure Form1_OnShow (Sender: string; Action: string);
begin
   Form1.ComboBox1.dbSQLExecute ('SELECT fieldname, id FROM tablename ORDER BY id DESC');
end;

Thank you it works.
* When do we have a new version ?