Select * From deposits Where ! Empty(sif_no) And ; Between (dep_date,ldbegindate,ldenddate) ; AND LEFT(ALLTRIM(inv_no),2) <> "WO" AND ; ! inlist(Left(Alltrim(inv_no),3),"RTN","COL","REF"); Order By dep_no Into cursor deposit_extractIf inv_no is blank it doesn't get included. I am looking to exclude only those four type of invoice number entries in the code.