02-11-2009, 08:56 PM
كود :
procedure fillcombo(List : TStringlist ;q:tibquery ; tbl,fld:string);
begin
q.SQL.Clear;
q.SQL.Add('select * from "'+tbl+'"');
q.Open;
if q.RecordCount<>0 then
begin
List.Items.Clear;
Cmb.Text:='';
q.First;
while not q.Eof do
begin
List.Items.Add(trim(q[fld]));
q.Next;
end;
end;
end;
