Topic: [Script] Calculating on the form
Calculating on the form (frmZakaz)
Let's say there are text fields that contain the product price (edCost) and amount (edQ), you must calculate the Total (edTotal).
procedure CalculateTotal;
begin
frmZakaz.edTotal.Value := frmZakaz.edCost.Value * frmZakaz.edQ.Value; // calculate
end;
procedure frmZakaz_edQ_OnChange (Sender: string);
begin
CalculateTotal;
end;
procedure frmZakaz_edCost_OnChange (Sender: string);
begin
CalculateTotal;
end;
begin
end.
Download project:
http://myvisualdatabase.com/forum/misc. … download=1
Dmitry.