IF m.plSqlServer cLifeExpFilter = " AND (PURCHASED IS NOT NULL AND LIFE_EXP IS NOT NULL AND LIFE_EXP > 0 AND ( " +; " ?m.dPassDate >= DATEADD( year, LIFE_EXP, PURCHASED)) ) " ELSE *-- VFP DB cLifeExpFilter = " AND (!EMPTY(PURCHASED) AND LIFE_EXP > 0 AND ?m.dPassDate >= GOMONTH(PURCHASED,LIFE_EXP*12))" ENDIF * this needs to be in scope where SQLExec is executed only. * until that SQL is simply a string dPassDate = date() && but could be a different date since user can change it from the current date to a future date SQLExec(m.handle, ...)"And in this case I am not concerned about Injection since user can only select/specify the date."