IIf statement

  • Thread starter Thread starter Stan
  • Start date Start date
S

Stan

I am trying to use an "Or" in an IIF statement.

The field value ID can be 1 thru 10, but if the value is 2
then I want both the associated value in 2 and for example
4.

The statement i am using is:

IIf([id]=2 or 4,[AINSURED],NULL)

When I use this statement it only evaluates the 2 and not
the 3. I have tried a few different statements but cannot
come up with the correct statement.

If the value is 2 or 4 I want whatever is stated in
Ainsured.

Can you use an "or" statement in with Iff
 
thanks, that was one I did not think of.
-----Original Message-----
Try:

IIf([id]=2 or [id]=4,[AINSURED],NULL)

Rgds,
Glenn
-----Original Message-----
I am trying to use an "Or" in an IIF statement.

The field value ID can be 1 thru 10, but if the value is 2
then I want both the associated value in 2 and for example
4.

The statement i am using is:

IIf([id]=2 or 4,[AINSURED],NULL)

When I use this statement it only evaluates the 2 and not
the 3. I have tried a few different statements but cannot
come up with the correct statement.

If the value is 2 or 4 I want whatever is stated in
Ainsured.

Can you use an "or" statement in with Iff


.
.
 
Back
Top