Conditional Format Question (1 Viewer)

CanadianAccessUser

Registered User.
Local time
Today, 00:58
Joined
Feb 7, 2014
Messages
114
Hi,

My database tracks statistics for Agents in a call center.
I have reports that show the agent stats.
The report I have a question about shows the difference in stats from last month to this month. I've conditionally formatted the report so that if the number is negative it is red, positive is green. (works as expected)

Question:
How do I say that:
If the value contains a "-" do not include the "-" sign....

The colours stand out way better than the "-" and I don't want to confuse the users with them.

Any advise would be great. :)

Thanks,
Canadian
 

BlueIshDan

☠
Local time
Today, 00:58
Joined
May 15, 2014
Messages
1,122
You could load the report based on a query that has an extra field in it that you determine the condition on.

Example

Code:
SELECT field1, field2, field3, (InStr(1, field3, "-") > 0) As [NewFieldName], Remove(field3, "-") As [NewFieldName2]
FROM [table/query]

And depending on which version of access you have, I can write you a Remove function.
 

CanadianAccessUser

Registered User.
Local time
Today, 00:58
Joined
Feb 7, 2014
Messages
114
Would that solution remove the "-" or make it not visible?
I would prefer to make it not visible.
 

BlueIshDan

☠
Local time
Today, 00:58
Joined
May 15, 2014
Messages
1,122
Well what would happen is you will generate a new field with the removed character and another new field(boolean) stating wether or not there was a character removed.

You only display the field with the removed "-" character while conditioning it against the boolean field you've created.

This can all be done through a query, and depending on your version of access A custom Remove(str, remove) As String function. Thus leaving the structure of your table the same.
 

BlueIshDan

☠
Local time
Today, 00:58
Joined
May 15, 2014
Messages
1,122
Show me your table structure and I will be glad to write you the function and query :)
 

pbaldy

Wino Moderator
Staff member
Local time
, 20:58
Joined
Aug 30, 2003
Messages
36,139
If it's a numeric value you'd probably want Abs() rather than looking for the "-", but I'd just use the Format property of the textbox. You can specify the format for negative numbers and not include the -.
 

pbaldy

Wino Moderator
Staff member
Local time
, 20:58
Joined
Aug 30, 2003
Messages
36,139
I'm lazy, so I look for simple solutions. :p
 

BlueIshDan

☠
Local time
Today, 00:58
Joined
May 15, 2014
Messages
1,122


String Condition



Number Condition
 

Attachments

  • Field_ValuesPNG.PNG
    Field_ValuesPNG.PNG
    2.1 KB · Views: 142
  • NumberCondition.PNG
    NumberCondition.PNG
    15.4 KB · Views: 133
  • String Condition.PNG
    String Condition.PNG
    15.1 KB · Views: 199

CanadianAccessUser

Registered User.
Local time
Today, 00:58
Joined
Feb 7, 2014
Messages
114
I'm already working from a query that has queried queries... lol
it is called: qryMetricsDifference-1Month
The fields are:
Coach - Text
Agent - Text
Calls
AHT - formatted as hh:mm:ss (at the report level)
ACW - formatted as hh:mm:ss (at the report level)
Hold - formatted as hh:mm:ss (at the report level)
TransferRate - %
BreakAux - %
PSU
S2S - %
Samples
Quality - %
RecommendRate - %
Surveys
NPS - %
LTR
CSAT
FCR - %
Presentment - %

Is that helpful?

I appreciate your help. This sounds like something way over my head. ;)
 

BlueIshDan

☠
Local time
Today, 00:58
Joined
May 15, 2014
Messages
1,122
see the above post, I figured it out and posted pictures for you.
 

CanadianAccessUser

Registered User.
Local time
Today, 00:58
Joined
Feb 7, 2014
Messages
114
If it's a numeric value you'd probably want Abs() rather than looking for the "-", but I'd just use the Format property of the textbox. You can specify the format for negative numbers and not include the -.

Thanks Paul!

but how do I do that? I don't see anything that refers to negatives...
 

Users who are viewing this thread

Top Bottom