SELECT dn.fullrsn, COUNT(*) AS ttlallrsn; FROM csrdens dn ; JOIN denreas ON dn.fullrsn = denreas.desc ; GROUP BY dn.fullrsn1 ; INTO CURSOR crsTotDesc SELECT dn.fullrsn, dn.vendr AS vendorname, ; SUM(IIF(clmtype = "P", 1, 0)) AS ttlprof, ; SUM(IIF(clmtype = "I", 1, 0)) AS ttlinst, ; SUM(IIF(INLIST(clmtype, "P", "I"), 1, 0)) AS ttlrsn, ; td.ttlallvends ; FROM csrdens dn ; JOIN crsTotDesc td ON td.fullrsn = dn.fullrsn ; GROUP BY dn.fullrsn1, vendorname, td.ttlallvends ; INTO CURSOR crsResult SELECT drillsumm APPEND FROM ( DBF("crsResult") )>No, no indexes, but the statement that bombs is inside of a scan that is looping through that cursor, does that make a difference? I don't know why it would - that happens all the time, but here's the code leading up to where the problem is...