Count Expression

message from Tru Dixon on 5 May 2004
I am having a difficult time trying to create a
calculated control on a report to Count a specific text
value in a field for example I am trying to Count the
=Count(IIf([AppNeighborhood] = 'Allegheny County')). Why
doesn't this work?
 
Wayne Morgan replied to Tru Dixon on 5 May 2004
1) Look up the DCount function in the help file. This can be used to count
items in a table or query (such as the one feeding the report).

2) Try setting the control source to
=Abs([AppNeighborhood]="Allegheny County")
then set the Running Sum property of the textbox to OverAll or OverGroup, as
desired. The expression will return True (-1) or False (0). The Abs will
change -1 to 1 and the Running Sum poperty will then add up the ones.
 

Archived message: Count Expression (MS Access)