>>When running the code below the amount returned for paytest is double the amount just entered
>>into the pytendered and not the actual total. But when I run the SUM command as is in the
>>Command Window and ?print the result it is fine.
>>
>
>Public NQUAN,NNOW,LWAIT,CRAMOUNT,CTHIS,paytest,NTICK
>>paytest=0
>>LWAIT=.T.
>>CTHIS=This.Value
>>NTICK=INVOICE.NTICKET
>>SET CONSOLE OFF
>>Sum PAYRECEIVED.namount For PAYRECEIVED.NTICKET = NTICK To CRPAY
>
>Do you have a relation set at this time that might be causing the payreceived records to appear doubled?
Not that I am aware of. The only place the table is used, so far, is right here.