IIf Expresion Builder

Posted on 2006-06-29
Medium Priority
Last Modified: 2012-06-22
I get an error in my report using the following expression:

=IIf([progtype_desc]="Kick-Off Program","Kick-Off Programs",[progtype_desc])

I am trying to do it make the value 'Kick-Off Program' plural in my report.

Thanks for your time
Question by:tdunbar317
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +1
LVL 35

Accepted Solution

Raynard7 earned 200 total points
ID: 17013807
It should work if you copy and paste the value into the source query for the report;  And then reference the value;

ie progtype_desc_2: IIf([progtype_desc]="Kick-Off Program","Kick-Off Programs",[progtype_desc])
LVL 85
ID: 17013808
What's the error you're getting?
LVL 85
ID: 17013823
Also, since this is a report, I'm betting you must have the [progtype_desc] field on your report somewhere ... not merely in the report's REcordsource, but actually on the report (you can set it .Visible=False if you don't want to see it).
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Expert Comment

ID: 17016124
Is progtype_desc part of the report ?

Author Comment

ID: 17019027
Yes, the progtype_desc is a field in the report. The query is used by many reports but I have one report in particular where I need to make the result plural.

Author Comment

ID: 17019203
I see what my problem is; I need to do the IIF in the query, rather than in the report field. Since that field is used in many reports I created another field in the query with the IIF to use in the report.
LVL 85
ID: 17019662
Yes, that's what Raynard7 suggested you do ...
LVL 35

Expert Comment

ID: 17021858
Is my Solution Working?

Author Comment

ID: 17031231
Yes, the tip the Raynard7 provided worked for me. Thanks for the help!

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question