Multiple IIf Statements

G

Guest

I am trying to provide a verbal discription for different values that are
found in my report and I am only able to make this control work for the first
three IIF statements afterthat I get errors. I would like to put the
following into the control box to evalute the number of [CCATVERB]. Is there
a way I can do this???

=IIf([CCATVerb]>=128,"Very High",IIf([CCATVerb]<=127 And
[CCATVerb]>=112,"Above Average",IIf([CCATVerb]<=111 And [CCATVerb]>=104,"High
Average",IIf([CCATVerb]<=103 And
IIf[CCATVerb]>=96,"Average",IIf([CCATVerb]<=95 And IIf[CCATVerb]>=88,"Low
Average",IIf([CCATVerb]<=87 And IIf[CCATVerb]>=72, "Below
Average",IIf([CCATVerb]<=71,"Very Low")))))))
 
D

Duane Hookom

Create a small lookup table with your min and max values and a title. You
can add this table to your report's record source and set the criteria under
the CCATVerb column to
Between VerbMin And VerbMax
Make sure your min and max values don't overlap.
Add the "title" field to your report's field list to use in the report.

The lookup table solution requires editing records when your ranges change.

You could also create a small user-defined function that would need to be
maintained when your ranges change.
I prefer to maintain data rather than code or expressions in queries or
reports.
 

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