Query Count Question

  • Thread starter DB via AccessMonster.com
  • Start date
D

DB via AccessMonster.com

I am having a problem with a query and getting the result that I am looking
for. I have 2 fields (a part number and pass/fail combobox).What I want is to
have a query that counts the number of Part Number that have passed and that
have failed. I also want it to show a zero if there is no record of it
failing.

DB
 
K

KARL DEWEY

Try this --
SELECT [part number], Sum(IIF([pass/fail] = True,1,0)) As Pass,
Sum(IIF([pass/fail] = False,1,0)) As Fail
FROM YourTable
GROUP BY [part number];
 
Top