count

G

Gerry

ppey,

I am a newbie to Access. I have a report where i am trying to get a count of
the number of times "0" appears in a column. The name of the column is
NumberOfResult.

Thnaks

Gerry
 
O

Ofer Cohen

In the control source of the text box that you want to display the count

=Sum(IIf([NumberOfResult]=0,1,0))

So it will sum all the 1 when NumberOfResult = 1.
 
A

Al Campagna

Gerry,
You could add a calculated field to the report query such as...
IsZero : IIF(NumberOfResult = 0,1,0)
Then just =Sum(IsZero) in any footer.

Or, in any footer...
=Sum(IIF(NumberOfResult = 0,1,0))
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
Top