>>lnGt=myentry.credit.value >>lnBalance=(mbal.balance) >>lnBalance=lnBalance+lnGt >>repl date with (myentry.date.value),balance with lnBalance>>has been replaced with one line, as far as I can see, my one line will do exactly the same job:
>>repl date with (myentry.date.value),balance with balance + myentry.credit.value>
select 0 use mbal order acno && Assuming that you have an index tag on acno lnAcno=thisform.acno.value if nKeycode=13 if seek(lnAcno) && thisform.. is much slower than a variable myentry.balance.value=balance + myentry.credit.value repl date with (myentry.date.value),balance with myentry.balance.value calc sum(balance) for type="balance" to lnTc myentry.tbalance.value=lnTc else MessageBox('No matching record found!') endif endif Use>>>
> myentry.balance.value=balance + myentry.credit.value >>>> calc sum(balance) for type="balance" to lnTc >>>> myentry.tbalance.value=lnTc >>>> else >>>> MessageBox('No matching record found!') >>>> endif >>>>endif >>>>Use >>>>* close all && Why do you close all???