Calculated Fields Question for the pros


[ Related Articles and Replies ] [ DelphiLand Discussion Forum ]

Posted by Peterson on January 28, 2003 at 21:08:51:

I have a small problem;

I have two databases (paradox)

Currency fields in one and a number fields in the other.

I am creating a Calculated field based on currency and percentage.


What I have so far:

procedure TForm1.Table1CalcFields(DataSet: TDataSet);
begin
  Table1AgentGrossComm.Value := (Table1Coy_Gross_Commision.Value * Table2Split_Level.Value);
End;

Result is I get all $0.00 in the Calculated field.

If I put in “ 0.65 “ in place of Table2Split_Level.Value (without the quotes of course) the calculation works perfectly.

In Table1 the field is defined as : Table1Coy_Gross_Commision: TCurrencyField;

In Table2 the field is defined as : Table2Split_Level: TFloatField;

I hope this is clear you, Would you be able to explain what I am doing wrong?

Thank you all in advance!


Related Articles and Replies:


[ DelphiLand Discussion Forum ]