J
Jason
I am stumped on this one!!
I am trying to format data on a report, so that if the end date for the
record, is less than the current date, then the entire record will be red.
Hee is the code I am using:
Private Sub Report_Page()
Dim lngRed As Long, lngYellow As Long, lngWhite As Long
lngRed = RGB(255, 0, 0)
lngBlack = RGB(0, 0, 0)
lngYellow = RGB(255, 255, 0)
lngWhite = RGB(255, 255, 255)
If Format([TXT_ENDDATE], "\#dd\/mm\/yyyy\#") <= Format(Now()dd\/mm\/yyyy\#")
Then
[TXT_ENDDATE].ForeColor = lngRed
Else
[TXT_ENDDATE].ForeColor = lngBlack
End If
End Sub
It simply will not format the text. Yes, conditional formatting is an
option, but this is limited to just one text box, and not all fields in the
record.
FYI.... The [TXT_ENDDATE] is a date field, with formatting set to dd/mm/yyyy
Any ideas ?
I am trying to format data on a report, so that if the end date for the
record, is less than the current date, then the entire record will be red.
Hee is the code I am using:
Private Sub Report_Page()
Dim lngRed As Long, lngYellow As Long, lngWhite As Long
lngRed = RGB(255, 0, 0)
lngBlack = RGB(0, 0, 0)
lngYellow = RGB(255, 255, 0)
lngWhite = RGB(255, 255, 255)
If Format([TXT_ENDDATE], "\#dd\/mm\/yyyy\#") <= Format(Now()dd\/mm\/yyyy\#")
Then
[TXT_ENDDATE].ForeColor = lngRed
Else
[TXT_ENDDATE].ForeColor = lngBlack
End If
End Sub
It simply will not format the text. Yes, conditional formatting is an
option, but this is limited to just one text box, and not all fields in the
record.
FYI.... The [TXT_ENDDATE] is a date field, with formatting set to dd/mm/yyyy
Any ideas ?