Calculate count based on date and option group

L

lbanglin

I am trying to calculate a count of records on my report that have a
specific RoleID and were enrolled by a specific date. I am able to
count the records with a specific RoleID with the following in a text
box:
=Sum(Abs([RoleID]=4))
or
=Sum(IIf([RoleID]=4,1,0))
I need to add to that [DateEnrolled]<=6/21/2004, but I am lacking the
proper syntax because I have not been able to make it work.

Thank you for your help,

Laura
 
M

Marshall Barton

lbanglin said:
I am trying to calculate a count of records on my report that have a
specific RoleID and were enrolled by a specific date. I am able to
count the records with a specific RoleID with the following in a text
box:
=Sum(Abs([RoleID]=4))
or
=Sum(IIf([RoleID]=4,1,0))
I need to add to that [DateEnrolled]<=6/21/2004, but I am lacking the
proper syntax because I have not been able to make it work.


=Sum(IIf([RoleID]=4 AND [DateEnrolled]<=#6/21/2004#,1,0))
 
Top