Can I Change color of background based on the date

W

wojo

I have a form that enters the current date/time. I would like the
background color to change to red, IF the date is >Now()+7.

Additionally, can it also be based on another entry in the record? If
the user enters RDO or WRK in one field and the DATE field is more than
7 days from today, I would like the DATE background to turn RED or I
can have the RDO or WRK entry blink.

What I am trying to do is bring attention to the fact that this entry
(record) is more than 7 days in advance. Other entries into the
REQUEST field ( RDO WRK) are 'allowed' more than 7 days in advance,
however, when the REQUEST is RDO or WRK, they 'may' be restricted to
making the entry and it would be nice to bring this to the attention of
the user.

Any ideas?

Jo
 
A

Arvin Meyer [MVP]

Bold and Red would be enough. Having something blinking is annoying and will
cause your users to distrust anything you do.

Open the form in design view, select the control and go to the Menu item:
Format. Then choose Conditional Formatting and choose "Field Value Is" then
"Greater than" then type:

Now()+7

Click OK then save. You're done.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
W

wojo

I believe your solution will turn the cell RED. Will it return to it's
'normal' color once the date is within range?

Also, can something be done so that it will only turn color IF the
Request Field = Rdo or Wrk?

Jo
 
V

Van T. Dinh

Use the "Expression is ... " condition and you can combine 2 or more
criteria using the AND / OR Boolean operators.
 
W

wojo

I haven't been successful trying to use the Expression is.. suggestion.
How do I 'reference' the second field that is part of the expression?
The field name is REQUEST.

Can you give more detailed instructions? I know how to get to the
conditional formatting.

Jo
 
V

Van T. Dinh

([DateField] > Date() +7) AND
( ([REQUEST] = "RDO") OR ([REQUEST] = "Wrk") )

Type as 1 line in the Expression TextBox.
 

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