title: Datatype mismatch error in access using group by
body: <p>I have a database with a table that looks something like this:   </p>
  
  <p>[ID], [Date Filed], [Open/Closed], [Investigator Name]  </p>
  
  <p>I want a query that gives me the number of open and closed cases for each of the investigators. I was trying to use this query:  </p>
  
  <p>SELECT [Investigator Name], Count(*) AS Total<br>
  FROM [main table]<br>
  WHERE [Date Filed] Between "start_date" And "end_date" and [Open/Closed]=-1<br>
  GROUP BY [Investigator Name];  </p>
  
  <p>But I am getting an error that says: "Datatype mismatch in criteria". I was thinking it was because of the null values in the column "Investigator Name", I tried using Nz, but then the query does not consider the column name to be in the group by expression. I've tried playing around here but nothing worked.  </p>
  
  <p>PS: I have only written the query for open values, if there is a way to get both open and closed values, that would be awesome.</p>