Conditional Formatting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello.
I have a subform with the following fields:
User
ScheduleDate
ActualLoginTime
ActualLogoutTime

We use this db to track when folks are using a specific application.
Currently I have conditional formatting on the User field to turn it Blue
when:

Time()>=[ActualLoginTime] And Time()<=[ActualLogoutTime]

This works fine except I need one more additional functionality:

If the "ActualLogoutTime" field is blank I need the conditional formatting
to change the user field blue.

Something like Time()>=[ActualLoginTime] And Time()<=[ActualLogoutTime] or
null

Could you please help?

Thanks.
Iram/mcp
 
You could use something like:
Time() Between [ActualLoginTime] And Nz(ActualLogoutTime, Time())

Nz function will return the second parameter value if the first one is null
 
There's no need to complicate things here. Select the User field control and
go back into Conditional Formatting. You should see the CF you've already
entered. At the bottom of the box click on Add. Under Contion2 select
Expression Is. Now in the box to the right type in

IsNull([ActualLogoutTime])

Now set the background to Blue.
 
Back
Top