what is the function to countif in MS Access?

F

Frank

what is the function to countif in MS Access? To clarify I would like to
count grades and break them out like 4 ..5's or 3 ...2's etc
 
O

Ofer Cohen

You can use Sum with IIf that return 1 if a criteria is met

NewFieldName: Sum(IIf([Grade] = 4 , 1 , 0))

NewFieldName: Sum(IIf([Grade] In (4,5) , 1 , 0))

NewFieldName: Sum(IIf([Grade] Between 4 And 6 , 1 , 0))
 
Top