Select Case MyTextBox.Value
Case 0 to 12
MyTextBox.BackColor=65535 'Yellow
Case 12.1 to 24
MyTextBox.Font.Color=255 'Red
Case Else
MyTextBox.Font.Color=16777215 'White
End Select
Norie said:Janika
Does a text box have any events in a report?
Is it not just the headers. footers detail and report that have events?
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim DateType
Dim LSD As Date
Dim RSD As Date
LSD = Me.[LATE SHIP Date].Value
If Not IsNull(Me.[Revised SN]) Then
RSD = Me.[Revised SN].Value
End If
Select Case DateType
Case DateType = Not IsNull(Me.[Revised SN])
If Me.SAILING - RSD > 0 Then
Me.ORDER.BackColor = vbRed
Me.ORDER.ForeColor = vbWhite
Else
Me.ORDER.BackColor = vbWhite
Me.ORDER.ForeColor = vbBlack
End If
Case Else
If Me.SAILING - LSD > 0 Then
Me.ORDER.BackColor = vbRed
Me.ORDER.ForeColor = vbWhite
Else
Me.ORDER.BackColor = vbWhite
Me.ORDER.ForeColor = vbBlack
End If
End Select
End Sub
Select Case [Epxr2].Value
Case "Pending"
[Expr2].BackColor=16711680 'Blue
Case "Confirmed"
[Expr2].BackColor=255 'Red
Case Else
[Expr2].BackColor=16777215 'White
End Select