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

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.
 
J

John Spencer

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
 

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