Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Counting records based on field value

Status
Not open for further replies.

KimmieB

Programmer
Apr 1, 2005
20
US
I'm trying to write a query that counts the number of records in the table based on the value of specific column. I've tried using Count with the criteria set to "IIF([FieldA] = "apple",1,0) but it's not working. I don't want to just group by FIELDA because I want to explictly create a result field for categories that may not exist in the table (in which case the result is 0).
 
Where are the categories coming from ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top