* A custom method that's to be called when parent changes * Since parent is changing tableupdate should have occurred * thus SQL acts on committed data select sum(Credit), sum(Debit) ; from myChild ; where myChild.PKLink = myParent.PK ; into array aSums thisform.txtCredit.Value = nvl(iif(type("aSums[1,1]")="N",aSums[1,1],0),0) thisform.txtDebit.Value = nvl(iif(type("aSums[1,2]")="N",aSums[1,2],0),0) * txtCredit and txtDebit programmaticchange thisform.txtBalance.Value = thisform.txtCredit.Value - thisform.txtDebit.Value * txtCredit and txtDebit gotfocus this.tag = transform(this.value) && Tag is ready storage property * txtCredit lostfocus thisform.txtCredit.Value = ; thisform.txtCredit.Value - nvl(val(this.tag),0) + nvl(this.value,0) * Change the value with "delta" value, subtracting old, adding new * txtDebit lostfocus thisform.txtDebit.Value = ; thisform.txtDebit.Value - nvl(val(this.tag),0) + nvl(this.value,0)This has the advantage of doing sum only once per parent rec change and no movement of rec pointer for summing. Later "sum" is only changed by values contributing to it.