Conditional Formatting?

sherlocked

Registered User.
Local time
Today, 01:29
Joined
Sep 22, 2014
Messages
125
Another conundrum...

I have a control on my report that I'd like to turn red if the value is before 6:00 AM or after 6:00PM.

I have tried several approaches to this but it isn't giving me what I need.

Any tips? Thanks! :):D
 
Right click the control and select conditional formatting. Select expression and assuming its a time field use <06:00 OR >18:00 as the expression and then choose your colour.
 
Thank you kindly, but this did not work. The field is a date/time field and I have it set to Medium Time (ie: 6:00 AM or 12:30 PM).

I need the field to recognize the time is before 6AM or after 6PM. My users are not likely to remember to enter times in 24 hour format so we need the AM/PM designation for them.

Thank you :)
 
it doesn't matter how you display it it will still be interpreted as a time, or in your case a date/time so we need accommodate that in the expression, something like

Format([YourFieldName],"Short Time") < #06:00# OR Format([YourFieldName],"Short Time") > #18:00#
 
Thank you again, but I'm afraid this isn't working. The report is applying the conditional formatting to the field no matter what time appears (for example, 7:00am or 12:30pm).

Any other ideas?:banghead:
 
While setting the conditional format for the control in question, try setting the values to Format only cells where the: Field Value Is not between #6:00:00 PM# and #6:00:00 AM#. I was able to get this to produce the results I believe you're looking for, highlighting only times between 6:00 p.m. and 6:00 a.m.
 
Hi all,

I'm afraid this didn't work either. The report is applying the formatting to every record regardless of the value. :banghead:
 

Users who are viewing this thread

Back
Top Bottom