Sum with IIf doesn't pull the info all the time

  • Thread starter Thread starter Robbie Doo
  • Start date Start date
R

Robbie Doo

I have a field with the following code:

=IIf([NoDays]<=45 And [NoDays] Is Not Null,Sum(Abs(nz([NewCV_Cs]="Yes"))),0)

I compared the queries together from different offices and the answers seem
to be the same. However, for some offices it doesn't count the "Yes"-s and
for some it does. Would anyone know what could be the reason?

Any help is appreciated.
 
How about an expression like the following
= Sum(IIF(NoDay <=45 and NewCv_CS="Yes",1,0))

Also, If NewCv_Cs is a Yes/No field and not a text field then try using
NewCv_CS=True


John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Back
Top