I'm trying to count the number of records by Dept. that meets the select criteria. I guess this is possible. So far all I've been able to return is nothing for a count. the correct records are being selected and displayed on the page. i just need to put a count by them.
my code is
strSql = "SELECT tblEmployee_Answers.Emp_Dept, COUNT(*) as 'EXPR1' FROM tblEmployee_Answers"
strSql = strSql & " WHERE (tblEmployee_Answers.Emp_EOS_Date > '" & FromDate & "')"
strSql = strSQL & " AND tblEmployee_Answers.Emp_Opt_Out = '0'"
strSql = strSql & " AND (tblEmployee_Answers.Emp_EOS_Date < '" & ToDate & "')"
strSql = strSql & " AND (tblEmployee_Answers.Emp_Dept IS NOT NULL)"
strSql = strSql & " GROUP BY tblEmployee_Answers.Emp_Dept"
am i way off base here? is this even doable? help gladly accepted.
Edited by ctscott - 19 July 2007 at 7:49pm