Count values

  • Thread starter Thread starter EllenM
  • Start date Start date
E

EllenM

Hello,
I have a field, [rot-ofas-html-june19-08]![KEEP/REMOVE] , that can have one
of four values, "keep", "remove", "redirect, or blank. I'd like a count of
each in a form.

Thanks,
Ellen
 
Add 4 columns in a query:

CountKeep: Sum(IIf([rot-ofas-html-june19-08]![KEEP/REMOVE]="keep",1,0))
CountRemove: Sum(IIf([rot-ofas-html-june19-08]![KEEP/REMOVE]="remove",1,0))
CountRedirect:
Sum(IIf([rot-ofas-html-june19-08]![KEEP/REMOVE]="redirect",1,0))
CountBlank: Sum(IIf([rot-ofas-html-june19-08]![KEEP/REMOVE]="",1,0))
 
Thanks so much, Arvin. Everything worked perfectly except count of the
blanks. Apparently this is quite challenging for Access 2003.

Ellen
 
The blanks may be nulls instead of empty strings. Try:

CountBlank: Sum(IIf(IsNull([rot-ofas-html-june19-08]![KEEP/REMOVE]),1,0))
 
One more question, Arvin. I have my blanks, keeps, removes, etc in three
tables and have prepared three queries as you described of each table. How
do I a grand total of the blanks, keeps, removes of all three tables?

Thanks,
Ellen
 
Hi Arvin,
I summed the values in another query for the grand total.

Everything's working. thanks!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top