>If there's an index on IdField, the following may be faster >
>local SumPayment, IdToDo
>SumPayment = 0
>IdToDo = 2134
>
>&& set order to the index on IdField
>&& best set talk Off
>
>if( seek(m.IdToDo, 'AliasName') )
> sumPaymentrestwhile (IdField == m.IdToDo) to SumPayment
>endif
>
>