>I have a form with label name acno,credit and balance.
>In keypress event of credit=label2) I written the following code.
>
>close all
>select a
>use mbal
>lnBalance=0
>lnGt=0
>lnTc=0
>lnGt=myentry.credit.value
>if nKeycode=13
>select mbal
>index on acno to tt
>seek thisform.acno.value
> if found()
> lnBalance=(mbal.balance)
>
> lnBalance=lnBalance+lnGt
> select mbal
> repl date with (myentry.date.value),balance with lnBalance
> myentry.balance.value=(mbal.Balance)
> go top
> sum(balance) for type="balance" to lnTc
> myentry.tbalance.value=lnTc
>
>
> endif
>endif
> close all
>
>
>My intention is to replace the balance in balance(=label3).But the data
>is not replacing in the table.Ketevent is necessary to proceed further.
>Please help
if it does not replace then it might be only in case that seek did not find the record and record pointer is set to EOF()
just trace the code to see how the code is executed.
* Human is a question asked by birth and answered by death. Machine is another kind of question with another kind of answer