Reports

  • Thread starter Thread starter equisbert
  • Start date Start date
E

equisbert

Hello,
I inherited a DB which has a report that displays a multitude of
fields. I've been asked to add three more fields, and the realstate
available is very limited.

The only solution I found is to abbreviate some of the field values and
standarized them for ease of use.

One of these fields is a text field called ORA, this field has very
large values (Passed First Time, Failed Needs Remediation, etc, etc.)

I've tried the function iif([ora]='Passed First Time', "P", "F")
But when running the report the ORA field displays a #error

do you see a problem with my function? or are there other options
available?

Thanks,
Q
 
Try using double quotes around the text you're checking for:

iif([ora]="Passed First Time", "P", "F")
 
Thanks for your input, I did try both single/double quotes and got the
same erro message. Although, I tried the same code with a numeric
field and it work perfectly. The issue seems to be happening with text
fields. Any other thoughts?

Try using double quotes around the text you're checking for:

iif([ora]="Passed First Time", "P", "F")

--
Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
(no e-mails, please!)



Hello,
I inherited a DB which has a report that displays a multitude of
fields. I've been asked to add three more fields, and the realstate
available is very limited.
The only solution I found is to abbreviate some of the field values and
standarized them for ease of use.
One of these fields is a text field called ORA, this field has very
large values (Passed First Time, Failed Needs Remediation, etc, etc.)
I've tried the function iif([ora]='Passed First Time', "P", "F")
But when running the report the ORA field displays a #error
do you see a problem with my function? or are there other options
available?
Thanks,
Q- Hide quoted text -- Show quoted text -
 
That's odd.

Access refused to process for me when I had single quotes, but worked fine
with double quotes.

Exactly where are you trying to use the IIf statement?

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


equisbert said:
Thanks for your input, I did try both single/double quotes and got the
same erro message. Although, I tried the same code with a numeric
field and it work perfectly. The issue seems to be happening with text
fields. Any other thoughts?

Try using double quotes around the text you're checking for:

iif([ora]="Passed First Time", "P", "F")

--
Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
(no e-mails, please!)

message

Hello,
I inherited a DB which has a report that displays a multitude of
fields. I've been asked to add three more fields, and the realstate
available is very limited.
The only solution I found is to abbreviate some of the field values and
standarized them for ease of use.
One of these fields is a text field called ORA, this field has very
large values (Passed First Time, Failed Needs Remediation, etc, etc.)
I've tried the function iif([ora]='Passed First Time', "P", "F")
But when running the report the ORA field displays a #error
do you see a problem with my function? or are there other options
available?
Thanks,
Q- Hide quoted text -- Show quoted text -
 

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

Back
Top