Thank you for the help, unfortunately, when I attempted it, the program would only update the total filed if the CODE field was NOT 0. However, the total must go in total field associated with 0. I attempted to modify the code, but still would not calculate correctly. I even put a valid statement for those fields with a code > 0, but not avail. Any other suggestions? Thank you for your wonderful help!!
>>What I am trying to accomplish is when the user checks the subtotal field on the ASSET TOTAL line item, the system will calculate upwards until it hits Beginning of File (if first group) or until it hits the first 0 code line item (i.e ORDER #6 thru 5)
>LNTOTAL=0
>LNCURRECORD=RECNO()
>DO WHILE !BOF() AND CODE!=0
> LNTOTAL=LNTOTAL+CODE
> SKIP -1
>ENDDO
>GOTO LNCURRECORD
>>However, if the user only checks the GRANDTOT checkbox on line item 7, the system will calculate everything until the beginning of the file.
>
>CALCULATE SUM(CODE)