Counts on report footer?

N

N

I'm trying to add four total counts on the footer of my report but cannot
get it to function. The query used by the report currently generates 32
rows.

I want to know how many items in the report were completed early, how many
were completed on time, how many were under a week late and how many were a
week or more late...

For the four fields in my report footer I've used the following Control
Source:

=Count((DateDiff("d",[ScheduledDate],[RealDate])<0))
=Count((DateDiff("d",[ScheduledDate],[RealDate])=0))
=Count((DateDiff("d",[ScheduledDate],[RealDate])-6>0))
=Count((DateDiff("d",[ScheduledDate],[RealDate])>0) AND
(DateDiff("d",[Scheduled Date],[EquipInstall])<7)

For some reason I always get "32", the total number of rows, regardless of
the values in the fields.

Help???
 
D

Duane Hookom

Count will count both true and false values. Replace Count() with Sum() to
count the True expressions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top