Solved

IIf Expresion Builder

Posted on 2006-06-29
11
373 Views
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
0
Comment
Question by:tdunbar317
  • 3
  • 3
  • 2
  • +1
11 Comments
 
LVL 35

Accepted Solution

by:
Raynard7 earned 50 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])
0
 
LVL 84
ID: 17013808
What's the error you're getting?
0
 
LVL 84
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).
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 4

Expert Comment

by:Carl2002
ID: 17016124
Is progtype_desc part of the report ?
0
 

Author Comment

by:tdunbar317
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.
0
 

Author Comment

by:tdunbar317
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.
0
 
LVL 84
ID: 17019662
Yes, that's what Raynard7 suggested you do ...
0
 
LVL 35

Expert Comment

by:Raynard7
ID: 17021858
Is my Solution Working?
0
 

Author Comment

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

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Suggested Solutions

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

810 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