>scan
> val = val+value calculated by formula
>endscan
>
>replace myField with val (where myField is N(9,2))
>
>now I'm using
>
>scan
> if category = 1
> val1 = val1 + value calculated by formula
> endif
> if category = 2
> val2 = val2 + value calculated by formula
> endif
>endscan
>
>replace Val1Field with val1, ... where the fields are of currency type.
>
>Now, the sum of va1+val2+... should be equal val
>
>It doesn't work for me.
Naomi,
try
STORE 0 TO val
scan
val = val+ROUND(value calculated by formula,2)
endscan
STORE 0 to val1,Val2
scan
if category = 1
val1 = val1 + ROUND(value calculated by formula,2)
endif
if category = 2
val2 = val2 + ROUND(value calculated by formula,2)
endif
endscan
m.Val1 + m.val2 must by equal of m.val
HTH
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst