sub ProcessEvent(App) ST_ClRef = App.Doc.FieldAsInteger("ARP_LOGICALREF") ST_CHRRef = CStr(ST_ClRef) BAKIYE = App.UQUERY_GETFLD(60,"SUM(DEBIT)-SUM(CREDIT)",24,6,FALSE, "CARDREF ="+ST_CHRRef+" AND TOTTYP = 1" ) App.Doc.ModifyData "NOTES5",Replace(("CARİ SON BAKİYE :"+" "+BAKIYE+" TL"),"¦","") App.Doc.SaveData end sub