Conditional Count in Access report

G

Gandalf the Grey

Does anyone know if I set up a conditional count (a bit like CountIf in
Excel) in an access report. eg I can count all values over 5 on each page of
a report. Thanks in advance for any help
 
J

John Vinson

Does anyone know if I set up a conditional count (a bit like CountIf in
Excel) in an access report. eg I can count all values over 5 on each page of
a report. Thanks in advance for any help

One handy way is to put a calculated field in the Query upon which the
report is based:

CondCount: IIF([Field] > 5, 1, 0)

and Sum this value in the report's section footer.

John W. Vinson[MVP]
 
G

Gandalf the Grey

Many thanks John

John Vinson said:
Does anyone know if I set up a conditional count (a bit like CountIf in
Excel) in an access report. eg I can count all values over 5 on each page of
a report. Thanks in advance for any help

One handy way is to put a calculated field in the Query upon which the
report is based:

CondCount: IIF([Field] > 5, 1, 0)

and Sum this value in the report's section footer.

John W. Vinson[MVP]
 
W

wal50

Solved it for me too. What a site!
Thanks
wal50

John Vinson said:
Does anyone know if I set up a conditional count (a bit like CountIf in
Excel) in an access report. eg I can count all values over 5 on each page of
a report. Thanks in advance for any help

One handy way is to put a calculated field in the Query upon which the
report is based:

CondCount: IIF([Field] > 5, 1, 0)

and Sum this value in the report's section footer.

John W. Vinson[MVP]
 
Top