IIf statements using AND

J

John Barnes

Is it possible to use an immediate if statement in a
report footer to calculate whether two conditions are
true? I am trying to use:

=Sum(IIf([Age]=1 And [Gender]=2,1,0))

To return a total of records that meet both criteria. I
either get all zeros or "this expression is typed
incorrectly or is too complex . . ." error message. Is
there a better way to count a record which tests records
for two fields?
 
D

Duane Hookom

You can try:
=Abs( Sum([Age]=1 And [Gender]=2) )
I'm not sure why your expression failed.
 

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