Count Expression

  • Thread starter Thread starter Tru Dixon
  • Start date Start date
T

Tru Dixon

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
number of different neighborhoods in a field called
AppNeighborhood. I tried using this expression:
=Count(IIf([AppNeighborhood] = 'Allegheny County')). Why
doesn't this work?
 
Some things you may want to try:

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.
 
Back
Top