Hola
Te diré como hice el codigo y me dá un error en la clausula Select
ADOQuery2.Close;
ADOQuery2.SQL.Clear;
ADOQuery2.SQL.Text := 'SELECT * FROM Pagos ORDER BY Beneficiario';
ADOQuery2.SQL.Add('Where CBanca = '+QuotedStr(Form1.ComboBox1.Items[Form1.ComboBox1.ItemIndex]));
ADOQuery2.Active := True;
While not ADOQuery2.Eof do
begin
if not(ADOQuery2.Fields[0].Text='')then begin
with Form5.ComboBox7.Items do if IndexOf(AdoQuery2.Fields[0].Text) = - 1 then Add(AdoQuery2.Fields[0].Text);
with Form5.ComboBox9.Items do if IndexOf(AdoQuery2.Fields[0].Text) = - 1 then Add(AdoQuery2.Fields[0].Text);
end;
AdoQuery2.Next;
end;
Gracias por adelantado
|