Hola
Aparte de lo que dice mi amigo yo lo haria asi:
Código Delphi
[-]
procedure TDEPRECIACIONES.Button3Click(Sender: TObject);
begin
if combobox4.Text<>'' then
begin
with dm1.Q_activos do
begin
active:=false;
sql.Text:= ' select * from Activos_fijos '+
' where id_activof = :combo4';
Parameters[0].Value:= combobox4.Text;
active:=true;
if recordcount=0 then
messagedlg('No se encontro el Activo Fijo, intente de nuevo',mtinformation,[mbok],0);
begin
label16.Caption:=fieldbyname('costo').asstring;
label18.Caption:=fieldbyname('fecha').asstring;
end;
end;
end;
end;
No me gusta el add.
Saludos