combobox1.Items.Clear;//先清除 table1.first; while not table1.eof do begin combobox1.Items.add(table1.FieldByName('departname').AsString); table1.next; end;
你用dblookupcombox,一切尽再掌握!
同意jixinfa(DELHPI程序员) 。
combox1.clear; with table1 do begin first; while not eof do begin combox1.items.add(fieldbyname('Department').asstring); next; end; end;
table1.first;
while not table1.eof do
begin
combobox1.Items.add(table1.FieldByName('departname').AsString);
table1.next;
end;
with table1 do
begin
first;
while not eof do
begin
combox1.items.add(fieldbyname('Department').asstring);
next;
end;
end;
table1.first;
while not table1.eof do
begin
combobox1.Items.add(table1.FieldByName('departname').AsString);
table1.next;
end;