IIf statement

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
 
S

Stan

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


.
.
 

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