depawl
03-19-2008, 05:12 PM
I have a report that is pulling data from a query. The query counts the number of clients that have accomplished a task. For example, let's say I have 10 clients, and 8 of them have accomplished the task in a certain time period. In the report, I have calculated [# of clients that have accomplished the task]/[total number of clients] = 80%.
Now, the program goal is to have 75% of the clients accomplish this task. So I need a field on the report that indicates "Yes" if the goal has been met, or "No" if it has not.
In this example, the 2 report fields would be like so:
Percent of clients accomplishing the task: 80%
Program Goal Met? Yes
I guess I'm not sure how to accomplish this.
Thank you.
Dennis
pbaldy
03-19-2008, 06:00 PM
Try
=IIf(PercentField >= .75, "Yes", "No")
depawl
03-19-2008, 07:08 PM
Thanks. I can't believe it was that easy.
WayneRyan
03-19-2008, 07:26 PM
depawl,
You can also use Conditional Formatting to highlight the field when the condition is met.
Wayne
MrRundog
03-25-2008, 12:29 PM
Hi - I have something similar to this one though with text
What I want is to check a field for text - if there is some make the textbox visible - if not then don't...
So in my sql in the report I have
="Third Party " & [tblClaims!thirdPartyFname] & " " & [tblClaims!thirdPartyLname]
If no third party then set display to hidden..
Any Easy way of doing this...
Cheers
Andy
pbaldy
03-25-2008, 12:48 PM
You could use code, but the simplest would be to use Conditional Formatting (set the font to white if no value).
MrRundog
03-26-2008, 02:34 AM
Wonderfull - thanks, Just for those searching - Add this in the Conditional Formatting > Expression IS
[FieldName] Is Not Null
Set your control color Black - and in the report set it white - If text exists in the field it will show (obviously this is only any use if you have text within an expression attached to the control source of the textBox...
="Third Party " & [tblTest!FieldName1] & " " & [tblTest!FieldName2]
Which brings me to my next question...
Is it possible to format the above "Third Party " to be bold without having the resulting fields also bold
EG
Third Party Mr Someguy
MrRundog
03-26-2008, 03:13 AM
Just came across this thread - Here's hoping it's not true
http://www.access-programmers.co.uk/forums/showthread.php?t=138257&highlight=Bold+expression
MrRundog
03-26-2008, 03:40 AM
my somewhat oversized solution was to make a table of common Texts (tblCommonText) add it to the list for the report query and use the fields from that with the same expression minus the (expression) wording
=[tblTest!FieldName1] & " " & [tblTest!FieldName2]
thus getting my -
Third Party Mr Someguy
If anyone has a better solution please feel free to chip in
Andy