Sergey --
To me, at least, your's looked equivalent to Fabio's. As always, an expert's gonna come up with a more complete solution.
Thanks for your exposition of the difference between the two solutions.
>Not realy. My works regardless of how many fields you have to sum w/o any additional code changes. It also references a field to SUM only once.
>
>>Thanks, Sergey, yours looks equivalent to Fabio's. (I used his since I read it first)
>>
>>>Try
>>>SKIP
>>>lnRecno = RECNO()
>>>LOCATE
>>>CALC SUM(someField) WHILE RECNO() <> lnRecno
>>>
>>>>When I have a indexed table, how do I do
Calc sum(somefield)
for all records up to and including the currently selected record?
Jim Nelson
Newbury Park, CA