Nested IIf statements

G

Guest

Trying to display the results of a numberic field which can have either a 1,
2, 3 entered from option group. Value can also be null. I have tried the
statement:

=IIf([BM1G2Attained]=1,"Yes",IIf([BM1G1Attained]=2,"No",IIf([BM1G1Attained]=3,"In Progress","Not Entered")))

But it will not evaluate 3 correctly - it passes to the false part of the
IIf, displaying "Not entered".

How can I write a statement for text box on a report changing a fields value
of 1, 2, or 3 into text?
 
D

Duane Hookom

Try:
=Choose(Nz(BM1G2Attained,4), "Yes","No","In Progress","Not Entered")

Actually, I would probably create a small lookup table for these values and
include the table in the report's record source.
 

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