You are on page 1of 1

procedure Tdatos.

tmhistoriasAfterDelete(DataSet: TDataSet);
Var
Suma: Double;
Campo: TField;
begin
Suma:=0;
Try
With tmhistorias Do Begin
DisableControls;
Campo := FieldByName('precio');
First;
While Not EoF Do Begin
Suma := Suma + campo.AsFloat;
Next;
End;
End;
Finally
tmhistorias.EnableControls;
End;
FormOrden.totalorden:=Suma;
end;

You might also like