'Data type mismatch in criteria expression' error in Count query

  • Thread starter Thread starter Al
  • Start date Start date
A

Al

Hi,
I'm new to Access so be gentle with me ;-) I'm currently doing a project
where I need to count the number of cities (in a 'City' field) which meet
particular city names. I've done a count query with the city name in the
criteria, but all I get is an error saying 'Data type mismatch in criteria
expression'. I'm not sure what I'm doing wrong as the City field is text and
I'm typing the city name correctly.
Any help would be appreciated.
Thanks
Al
 
AS a WILD GUESS, you are typing the City name under the field you are
counting. Counts are numbers, cities are strings.

Remove the criteria under the count
Add the City field to the query AGAIN
Change GROUP BY to WHERE
Enter the city criteria under this copy of the city field.

It would help if you posted the SQL statement that you are attempting to
use. To do so, switch from DESIGN view to SQL view (Menu: View: SQL)
and copy the SQL statement and post it to the forum.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
Thanks very much John. That was the answer I needed. I thought it would be
simple, it was just a matter of finding the answer.

Thanks to all who responded.
Cheers
Al

PS. sorry for the double post. I keep getting a 'Service Temporarily
Unavailable' error which caused it.
 
Back
Top