I have a report with the following code (which works fine):
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Select Case Color
Case "In-Progress (WHITE)"
Me!Counter.BackColor = 16777215
Me!CC.BackColor = 16777215
Me!Number.ForeColor = 0
Me!CC.ForeColor = 0
Case "Non-FIR Complete (GRAY)"
Me!Counter.BackColor = 12632256
Me!CC.BackColor = 12632256
Me!Number.ForeColor = 0
Case "Possible Verification Issue (RED)"
Me!Counter.BackColor = 255
Me!Number.ForeColor = 16777215
Case "More Information/Clarification Needed (YELLOW)"
Me!Counter.BackColor = 65535
Me!CC.BackColor = 65535
Me!CC.ForeColor = 0
Me!Number.ForeColor = 0
Case "Verified, But Past Due Date (BLACK)"
Me!Counter.BackColor = 0
Me!Number.ForeColor = 16777215
Case "Verified Complete And On-Time (GREEN)"
Me!Counter.BackColor = 4227072
Me!CC.BackColor = 4227072
Me!Number.ForeColor = 16777215
Me!CC.ForeColor = 16777215
End Select
End Sub
I am trying to put similiar code into this report that will change the background and forground colors of a text box based on date. (If x field is this date then color field xx this color). I do not know how to do this as I keep getting error messages. I tried copying and pasting the above code and changing the "select case" and "CC"/"Counter" information to the new names. Is my problem that I'm having it look at a date as apossed to text?
As always, you're help is greatly appreciated.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Select Case Color
Case "In-Progress (WHITE)"
Me!Counter.BackColor = 16777215
Me!CC.BackColor = 16777215
Me!Number.ForeColor = 0
Me!CC.ForeColor = 0
Case "Non-FIR Complete (GRAY)"
Me!Counter.BackColor = 12632256
Me!CC.BackColor = 12632256
Me!Number.ForeColor = 0
Case "Possible Verification Issue (RED)"
Me!Counter.BackColor = 255
Me!Number.ForeColor = 16777215
Case "More Information/Clarification Needed (YELLOW)"
Me!Counter.BackColor = 65535
Me!CC.BackColor = 65535
Me!CC.ForeColor = 0
Me!Number.ForeColor = 0
Case "Verified, But Past Due Date (BLACK)"
Me!Counter.BackColor = 0
Me!Number.ForeColor = 16777215
Case "Verified Complete And On-Time (GREEN)"
Me!Counter.BackColor = 4227072
Me!CC.BackColor = 4227072
Me!Number.ForeColor = 16777215
Me!CC.ForeColor = 16777215
End Select
End Sub
I am trying to put similiar code into this report that will change the background and forground colors of a text box based on date. (If x field is this date then color field xx this color). I do not know how to do this as I keep getting error messages. I tried copying and pasting the above code and changing the "select case" and "CC"/"Counter" information to the new names. Is my problem that I'm having it look at a date as apossed to text?
As always, you're help is greatly appreciated.