Expiration Date

H

Haiku

I searched in the forum to find an answer for my question before posting, but
couldn't find a good answer. I have a form which have details of personnels
who signed for various equipments from our office. The form has a column for
date when the persons signed for the equipments. I need to change the color
of the font of the date when the date is equal and over a year.

All the assistance in this matter is highly appreciated. Thanks in advance.
 
K

Keith Wilby

Haiku said:
I searched in the forum to find an answer for my question before posting,
but
couldn't find a good answer. I have a form which have details of
personnels
who signed for various equipments from our office. The form has a column
for
date when the persons signed for the equipments. I need to change the
color
of the font of the date when the date is equal and over a year.

All the assistance in this matter is highly appreciated. Thanks in
advance.

Try something like this in the form's current event:

If Date - Me.txtMyTextBox >365 Then
Me.txtMyTextBox.FontColor = nnn
Else
Me.txtMyTextBox.FontColor = xxx
End If

Assuming 365 days is close enough in a leap year.

HTH - Keith.
www.keithwilby.com
 
A

Arvin Meyer [MVP]

If you have a continuous form or datasheet, you must use an expression in
Conditional Formatting. On single form view it is a choice. In design view,
select the control that you wish to change color. On the Format menu, choose
Conditional Formatting. Use the wizard to help with your expression.
 
Top