title: Listbox add items from database and sort + delete duplicates
body: <p>I'd need some help since I don't see any solution after doing some search...</p>
  
  <p>I have a database Database.mdb, which have a few tables, I'm reading specific table Fixtures, which have fields ID, ChNo, Default and Manufacturer;</p>
  
  <p>I then have a form on which I'd like a user to be able to choose from each fixture, but would like to sort it by manufacturer firstly.
  So, I added ListBox component on a form, and started to populate it using the code provided:</p>
  
  <pre><code>    procedure TPatchNew1.FormShow(Sender: TObject);
  var No, No2: integer;
  begin
  No2:=0;
  AdoQuerySearchFixtures.SQL.Text:='SELECT Manufacturer FROM Fixtures';
  AdoQuerySearchFixtures.Open;
  ManuNo:=AdoQuerySearchFixtures.RecordCount;
  While No2 &lt; No do
    begin
    ManufacturerListbox.Items.Add;
    AdoQuerySearchFixtures.Close;
    AdoQuerySearchFixtures.SQL.Clear;
    AdoQuerySearchFixtures.SQL.Text:='SELECT Manufacturer FROM Fixtures WHERE ID='+IntToStr(No2+1);
    AdoQuerySearchFixtures.Open;
    ManufacturerListbox.Items[No2].Caption:=AdoQuerySearchFixtures.Fields[0].AsString;
    No2:=No2+1;
    end;
  
  end;
  </code></pre>
  
  <p>This does the trick, but I'd like it to first: merge all duplicates, so that the fixtures with the same Manufacturer field value are all shown only after the Listbox item is clicked (I believe I'll be able to do that changing SQL text to "WHERE Manufacturer=something"), but there are not 100 items in listbox, if I have 90 fixtures from same manufacturer;
  At last, before the listbox is populated, I'd like it to be sorted alphabetically, from A to Z.
  Should I firstly read all manufacturers to sort of a record or array, then find duplicates and delete them, and later sort it, lastly filling in to listbox items, or is there any other way?
  It that's the way, how to do it? I give up after this whole day.. :(</p>
  
  <p>Thanks.</p>
  
  <p>Cheers </p>