I think all he wants is
replace fld3 with fld1+fld2 ALL
>>Dear Sir,
>>
>>Your codes still not work
>>
>>It replies the sum of fld1+fld2 and there is no runing total
>>
>>Please modify codes again
>
>Yes, it works according to what you asked for, I guess you did not explain well enough. Try this, and see for yourself
>Create Cursor tariq (fld1 n(5), fld2 n(5), fld3 n(5))
>Insert into tariq (fld1, fld2) values (1,2)
>Insert into tariq (fld1, fld2) values (6,8)
>Insert into tariq (fld1, fld2) values (3,7)
>Insert into tariq (fld1, fld2) values (0,3)
>lnTotal = 0
>Scan
> Replace fld3 with lnTotal + fld1 + fld2
> lnTotal = fld3
>EndScan
>browse
If it's not broken, fix it until it is.
My Blog