I'm having trouble passing some form option values to my sproc. My tests in Query Analyzer work fine.<BR><BR>I have a form option field. The first option value works...the second gives an error "Invalid column name 'Employee'. <BR><select "EmpFilter"<BR><option Value=' AND h.Salary <= 1000 '> Emp Salary $0 - $1,000 <BR><option Value=' AND e.Employee = EmpName '> Emp Name<BR></EmpFilter><BR><BR>Part of my sproc looks something like this...<BR>SET @SQL = 'SELECT h.Salary, e.EmpName '<BR>'FROM tblEmployees e ' +<BR>'JOIN tblSalaries h ' +<BR> 'ON e.EmpID = h.EmpID ' +<BR>WHERE cast(@EmpFilter as varchar(30))<BR><BR>So I'm trying to use the variable EmpFilter to dymanically pass in part of the query criteria. I tried different combinations of apostrophes and chr(39) but nothing is working.<BR><BR>This does work ok in Query Ananlyzer.