* Summing code luParentPK = myParent.PKField select sum(debit), sum(credit) ; from myChild ; where myChild.KeyField = luParentPK ; into array aSums && At this point records are tableupdated with thisform .txtDebit.Value = iif(type("aSums[1]") = "N", aSums[1], 0) .txtCredit.Value = iif(type("aSums[1]") = "N", aSums[2], 0) endwith && No refresh needed * txtDebit and txtCredit controls' programmaticchange with thisform .txtBalance.Value = .txtDebit.Value - .txtCredit.Value * I don't know how really credit, debit is processed * it might be Credit - Debit endwith * txtDebit and txtCredit controls' gotfocus * Save current value - it's contributing to total this.tag = str(iif(isnull(this.value), 0, this.value)) && Tag is a ready storage * txtDebit and txtCredit controls' lostfocus with thisform.txtDebit && txtCredit for credit .Value = .Value - val(this.tag) + this.Value && Update total endwithThis logic is just as humans do it. No need to sum all again. Subtract the old, add new. Also no fear to think record pointer movement, alias change etc. Performance would be dramatic if child had tons of records for a particular parent :) Actually I used this technique on 286s where speed was really an issue.