Subject Re: [IBO] TIB_Query's OnCalculateEvent
Author Jason Wharton
This doesn't sound right.
For now, call the CalculateFields method of the dataset in the OnExit event
of the control.
If you have time, please send me a quick and easy sample of the problem.

Regards,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: "Hie Joen" <hiejoen@...>
To: <ibobjects@yahoogroups.com>
Sent: Wednesday, December 05, 2001 2:55 AM
Subject: [IBO] TIB_Query's OnCalculateEvent


> Dear List,
>
> I have a calculated field in one of my TIB_Query and put needed statement
in the OnCalculateField event:
>
> procedure TfrmSalesOrder.qrSOCalculateField(Sender: TIB_Statement;
> ARow: TIB_Row; AField: TIB_Column);
> begin
> inherited;
>
> with AField do
> if FieldName = 'SO_CREDIT' then
> AsCurrency := ARow.ByName('SO_TOTAL_AMT').AsCurrency -
> ARow.ByName('SO_BOOKING_FEE').AsCurrency;
> end;
>
>
> I have two TIB_Edit control for SO_TOTAL_AMT and SO_BOOKING_FEE.
>
> OnCalculateField event is fire when I enter and start typing into the
TIB_Edit control but not when I exit the control and the value is changed.
Is this correct behaviour or I miss something ?
>
> I already read IBO help and IBO online FAQ but didn't find the solution.
I'm using Delphi 5 + IBO 4.2Fm + Firebird Beta2.
>
>
> TIA
> HJ