I have been trying to get Access to do this for a couple of days now . I have a due date in a tracking system I am doing. I need the due date to be Red if it is with in 5 days of today in a form. Can someone please help me???
Thanks Debbie
I have been trying to get Access to do this for a couple of days now . I have a due date in a tracking system I am doing. I need the due date to be Red if it is with in 5 days of today in a form. Can someone please help me???
Thanks Debbie
Hatched850
[VBA] Private Sub Form_Current()
If Not IsNull(Me.dateDueDate) Then
Select Case LessThanFiveDaysOut(Me.dateDueDate)
Case True
Me.dateDueDate.ForeColor = 255
Case Else
Me.dateDueDate.ForeColor = 0
End Select
End If
End Sub
Function LessThanFiveDaysOut(dateDateToEvaluate As Date) As Boolean
If DateDiff("d", Now, dateDateToEvaluate) <= 5 Then
LessThanFiveDaysOut = True
Else
LessThanFiveDaysOut = False
End If
End Function
[/VBA]
You are GREAT!!! It worked beautifully!! Thank you so much you are a lifesaver.
Hatched850