I can't seem to get the syntax right in VB. Still a newby. I'm simply trying to compare the date in a text box on a form with the current date and run an If Then statement to change the Font color property of the text box.
This is what I have now although I've tried many, many other variations.
Private Sub Form_Open(Cancel As Integer)
Dim Today
Dim Due
Today = DateValue(Now())
Due = DateValue(Me.AuditDue)
If Today > Due Then Me.AuditDue.ForeColor = 255
End Sub
This is what I have now although I've tried many, many other variations.
Private Sub Form_Open(Cancel As Integer)
Dim Today
Dim Due
Today = DateValue(Now())
Due = DateValue(Me.AuditDue)
If Today > Due Then Me.AuditDue.ForeColor = 255
End Sub