iif and statement

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

It's been a long time since I have used access and I can't remember if I can
do this, but I figured someone out there would know. I have multiple
conditions that need to be checked to come to a result. For example ...

iif said:

I'm not sure about running an iif and statement in access. If anyone could
provide help or suggestions for doing it differently I'd appreciate it.
 
It's been a long time since I have used access and I can't remember if I can
do this, but I figured someone out there would know. I have multiple
conditions that need to be checked to come to a result. For example ...



I'm not sure about running an iif and statement in access. If anyone could
provide help or suggestions for doing it differently I'd appreciate it.

It's not really clear from your example above what criteria goes with
what, so I'll give a stab at what I think you may mean.

1) How can [Text12] be <0 AND [Text12] <-1?
The same with [Text14]. You have 2 different sets of criteria.
It should, I think, be an OR statement, not AND between the 2 sets.

2) You need to place the IIf statement itself within Parenthesis.
=IIf(Statement here)

3) If you have multiple criteria, place the ones that go together
within their own set of parenthesis.

(Text 12] said:

4) Try it this way.
= IIf((Text 12] < 0 and [Text 14] > 0,3) OR ([Text 12] < -1 and [Text
14] >6,2), "Do the True stuff here", "Do the False stuff here")
 
Back
Top