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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count Function by VALUE 1

Status
Not open for further replies.

multipleintell

Technical User
Dec 7, 2001
72
US
Hello,

I'd like to take a count of the number of records that I have in the report. Then, I would also like to count the number of those records that have the value "A" but the Count() function does not seem to do that. What can I use to accomplish this task?

Melissa

PS- Thanks for all the help you can offer, it will be greatly appreciated.
 
Melissa,
I wrote an FAQ on how to use the DSUM function to return all kinds of record counts. Here is the link: faq703-3066

All you need to do is replace the DSUM with DCOUNT. HTH, [pc2]
Randy Smith
California Teachers Association
 
Randy's FAQ covers the issue very well but if you want to count them right in the report you can use this expression in a Group or Report Footer
=Sum(IIf([FieldName]="A",1,0))

Summing 1's and 0's is the same as counting.

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top