T
tpdttjr6
Guest
I have a form on which one of the fields returns a date, I want the background colour to change to red when the date is 7 older than the present date. I have tried the following code in the forms OnCurrent property but it doesnt seem to work.
Sub Form_Current ()
If LastOfLastOfDate.Value > Date - 7 Then
LastOfLastOfDate.BackColor = RGB(255, 0, 0)
LastOfLastOfDate.FontWeight = "700"
Else
LastOfLastOfDate.BackColor = RGB(255, 255, 255)
LastOfLastOfDate.FontWeight = "400"
End If
End Sub
Can any body see what I'm doing wrong
i'm Using Access 2.0
Sub Form_Current ()
If LastOfLastOfDate.Value > Date - 7 Then
LastOfLastOfDate.BackColor = RGB(255, 0, 0)
LastOfLastOfDate.FontWeight = "700"
Else
LastOfLastOfDate.BackColor = RGB(255, 255, 255)
LastOfLastOfDate.FontWeight = "400"
End If
End Sub
Can any body see what I'm doing wrong
i'm Using Access 2.0