View Full Version : Countif


profxavier27809
01-11-2006, 10:59 AM
Hey there,

Is there a quick expression to put in the control source area of a field on a report that says COUNTIF([Sample Text Field] = "NO")

I would like it to only count the occurrences of NO.

reclusivemonkey
01-12-2006, 02:18 AM
There is no COUNTIF in access, but you could put a field on your report which has


IIF([Sample Text Field]="NO",1,0)


make it invisible, then just use COUNT to get the number of occurences.

Rich
01-12-2006, 05:37 AM
=Sum(Iif([YourField]=No,1,0))