I have the following expression but want the criteria to include 2 fields:
IIf(IsNull([HR]),2,1)
If HR is null AND NARC is null I want a 2 otherwise a 1.
Thank you for your help.
Duane Hookom - 30 Sep 2009 21:03 GMT
Try
IIf(IsNull([HR]) AND IsNull([NARC]),2,1)

Signature
Duane Hookom
Microsoft Access MVP
> I have the following expression but want the criteria to include 2 fields:
>
[quoted text clipped - 3 lines]
>
> Thank you for your help.
Marshall Barton - 30 Sep 2009 21:03 GMT
>I have the following expression but want the criteria to include 2 fields:
>
>IIf(IsNull([HR]),2,1)
>
>If HR is null AND NARC is null I want a 2 otherwise a 1.
IIf(IsNull([HR]) And IsNull(NARC),2,1)
will do what you asked, but without any context I have no
way of knowing if that's the best way to do it or even if
that is what you need to do.

Signature
Marsh
MVP [MS Access]