how to make a date change colors

G

Guest

I am tring to build a expression. To changed a date color. I have a form with
a subform. The subform is a service record, which has a service date and next
service date due(1 year from Service date). The form also has a next service
date due.In the form next service date due I want to be green if not due and
red if due or past due.I also have current date on the form. I bin playing
around with the IIF function but can't seem to get it to work.
 
R

Rick B

Just use the built-in conditional formatting feature. While in design-view,
select the control you want to format, then click the "Conditional
Formatting..." link in the Format menu. You can then set the various
conditions and colors.
 
G

Guest

I put in condition 1 field value is > 365 red and condition 2 is < 365
green, but the date just stays red on any date I put in.
 
R

Rick B

A date can't equal 365? What type of field are you using here? If it is a
date field, then you have to compare it to some date. If your service due
is a date field and you want to locate any record where that date is coming
up in the next 30 days, for example, you'd put something like...
<Date()+30

If you want to find items that are between the current date and 30 days from
now, you'd use something like:
Between Date() and Date()+30

If you want to find past due items, you'd use something like:
<Date()

Hope that helps.
 

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