>local nStop,i,cBuff >use ? >nStop=afields(aList) >cBuff="select cAcctNo " >for i = 1 to nStop > if aList[i,2]="N" > cBuff = cBuff+",sum("+aList[i,1]+")" > endif >next >cBuff=cBuff+" from "+dbf() >
TOTAL TO SYS(2023)+'\TOTALS' ON .t. SELECT 0 USE SYS(2023)+'\TOTALS' BROWSE