DO CASE CASE lcInvType = "WP" SELECT in_stock, in_code, in_des, ROUND(in_onhand,2) as in_onhand, in_stdcst, ROUND(in_onhand*in_stdcst,2) as inv_dollars from cdiinmas WHERE in_code = "WP" AND in_stkloc = "CORE" INTO CURSOR inventory readwrite INDEX ON in_stock TAG instock SELECT inhistock, MONTH(inhidate) as month, sum(inhiqty) as quantity FROM cdiinhis ; WHERE inhistkloc = "CORE" AND ; (INLIST(SUBSTR(INHIDOC,1,1),"P","1","4") OR INLIST(SUBSTR(INHIDOC,1,2),"01","04","05")) AND ; (inhisource = "IN" OR inhisource = "OE") AND ; (inhitype = 1 OR inhitype = 0) AND ; inhidate >= lnStartDate1 AND ; inhidate <= lnEndDate6 ; INTO CURSOR qtysummary READWRITE GROUP BY inhistock, month <pre> I have no idea how to build this exclusionary statement. I really think I'm just suffering from a case of weapons grade stupid. >You plugged it into the form's code? Or into the command window? > >All of the lines below are the SELECT statement. Did you paste this entire section into your command window? After pasting into command window, you hit enter at the end of the command. Also, make sure you database is open. I don't see any sort of syntax error in the statement... > >>Almost there, I plugged it in and It gave me "Unrecognized command verb", any changes to syntax you can recommend? >> >> ><pre> >select * from finalInventory ; > where left(in_stock,2)<>"LP" ; > and iutotal<>0 ; > order by in_stock ; > into cursor finalInventoryCursor >