table1.first;
while not table1.eof do
begin
  combobox1.Items.add(table1.FieldByName('departname').AsString);
  table1.next;
end;

解决方案 »

  1.   

    combobox1.Items.Clear;//先清除
    table1.first;
    while not table1.eof do
    begin
      combobox1.Items.add(table1.FieldByName('departname').AsString);
      table1.next;
    end;
      

  2.   

    你用dblookupcombox,一切尽再掌握!
      

  3.   

    同意jixinfa(DELHPI程序员) 。
      

  4.   

    combox1.clear;
    with table1 do
      begin
        first;
        while not eof do
          begin
            combox1.items.add(fieldbyname('Department').asstring);
            next; 
          end;
       end;
      

  5.   

    用combox和dblookupcombox都比较可以,用combox则自己写代码,灵活性大一些,用dblookupcombox则设置属性及部分查询语句直观一点,根据需要看书选用就OK。
      

  6.   

    combobox1.Items.Clear
    table1.first;
    while not table1.eof do
    begin
      combobox1.Items.add(table1.FieldByName('departname').AsString);
      table1.next;
    end;