Conditional Formatting

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
 
G

Guest

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
 
M

missinglinq via AccessMonster.com

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top