tdatasource
Posted: 25.10.2023, 15:50
Hi all,
I have a problem with the event manager of datasource.
I write :
procedure tfrmUserRec (Sender: TObject; Field: TField);
begin
if field =nil then statbar.text:=inttostr( recno)
else
begin
sum:=sum+field.curvalue; //calculated three times
showmessage(field.fieldname); //showed three times;
end;
end;
the record contains fields (NTIERS, DATE, NPIECE, AMOUNT )
FIRST TIME AMOUNT IS SHOWED THAT' S OK BECAUSE IT IS THE FIELD WE CHANGED
SECOND TIME NTIERS ?????????
THIRD TIME NTIERS ?????????
ANY IDEA ? ( THIS CONCERNS FREE PASCAL OR LAZARURUS );
I have a problem with the event manager of datasource.
I write :
procedure tfrmUserRec (Sender: TObject; Field: TField);
begin
if field =nil then statbar.text:=inttostr( recno)
else
begin
sum:=sum+field.curvalue; //calculated three times
showmessage(field.fieldname); //showed three times;
end;
end;
the record contains fields (NTIERS, DATE, NPIECE, AMOUNT )
FIRST TIME AMOUNT IS SHOWED THAT' S OK BECAUSE IT IS THE FIELD WE CHANGED
SECOND TIME NTIERS ?????????
THIRD TIME NTIERS ?????????
ANY IDEA ? ( THIS CONCERNS FREE PASCAL OR LAZARURUS );