?
Solved

Access 2010 report conditional formatting IIf statement

Posted on 2013-01-17
5
Medium Priority
?
1,659 Views
Last Modified: 2013-01-22
Hi just trying to apply conditional formatting to a certain section of my report.

I need to differentiate one set of values as a number rather than a percent. All are set as percent right now, but if the domain equals a certain value, I need it to format the fields in the section as a number (not a percent) and for all else, they need to stay percents.

IIf([domain]="auth_dispo_amtpmpm",FormatNumber([panel_%],[,2][,1][,1]),FormatPercent([panel_%[,2][,1][,1])

IIf([domain]="auth_dispo_amtpmpm",Format([panel_%], “Standard”),Format([panel_%], “Percent”))


Those examples have been what I am trying to do, but it won't work, please help.
0
Comment
Question by:IEHP1
[X]
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
  • 2
5 Comments
 

Author Comment

by:IEHP1
ID: 38789321
Oh, I got it working in the query instead of conditional formatting in the report (don't know why it didn't work in the report?)??

but I had to remove UCase([my table].[same field name as the field name used in IIf statement]).

I don't know why I had to remove it (was giving me an error message saying "You tried to execute ~~~~~~~~~~~~~~~~ not as part of an aggregate function" ?   Both of the fields were using Group By??

So I tried to use conditional formatting in the report to make the first letter of the field I want capitalized, but won't work?

Please let me know why? This is frustrating me?
0
 

Author Comment

by:IEHP1
ID: 38789864
If I provide a screenshot of the error message, would that help?
0
 
LVL 48

Accepted Solution

by:
Dale Fye earned 1500 total points
ID: 38792659
I would not do this in the report itself, but in the query, something like:

SELECT Field1, Format([Field2], iif([Field1] = 2, "0.0", "0.0%"))

However, using the Format function will cause the output to become text, so you will need to right align the output in your textbox.
0
 

Author Comment

by:IEHP1
ID: 38806058
yes, thank you for responding fyed,

I can get the IIf statement in the query for each of the pct columns, but I guess since the field called [domain] is in each of the IIf statements, my UCase function that was originally in the [domain] field gives an error message. So I had to take it out.

Is there any way I can get the [domain] field to be capitalized as well (the IIf statements work correctly in the query as of now).
0
 
LVL 48

Expert Comment

by:Dale Fye
ID: 38808276
Can you post the entire SQL and identify where the UCASE function call was that is now giving an error message?
0

Featured Post

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!

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

801 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