IIf returns an error

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

Guest

I'm using Access 97. On option group on the data entry form offers 3 choices,
stored in the table as 1, 2 or 3. I want the resulting report to display "A"
if 1, "B" if 2, nothing if 3. The calculated control on the report shows the
Control Source as:
=IIf([PriorityLevel]=1,"A",IIf([PriorityLevel]=2,"B",""))

The report returns #E for all values in that field. What have I done wrong,
and how can I fix it?
 
Is the name of the control also 'PriorityLevel'? Is so, renaming it should
solve the problem.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
Back
Top