Cumberlandbm
New member
- Local time
- Today, 04:04
- Joined
- Apr 26, 2010
- Messages
- 7
I'm trying to make a report where a certain field will have 5 different backgrounds depending on the situation in the field. I've looked up coding constantly getting the same thing. When I put my coding in and run it, the field turns blank and no color changes have also been made. Here's my coding, any help would be great. Priority is my textbox
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Select Case Priority
Case Is = "H"
Me.Priority.ForeColor = vbWhite
Me.Priority.BackColor = vbRed
Case Is = "M"
Me.Priority.ForeColor = vbBlack
Me.Priority.BackColor = vbYellow
Case Is = "L"
Me.Priority.ForeColor = vbWhite
Me.Priority.BackColor = vbGreen
Case Is = "E"
Me.Priority.ForeColor = vbWhite
Me.Priority.BackColor = vbBlue
End Select
End Sub
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Select Case Priority
Case Is = "H"
Me.Priority.ForeColor = vbWhite
Me.Priority.BackColor = vbRed
Case Is = "M"
Me.Priority.ForeColor = vbBlack
Me.Priority.BackColor = vbYellow
Case Is = "L"
Me.Priority.ForeColor = vbWhite
Me.Priority.BackColor = vbGreen
Case Is = "E"
Me.Priority.ForeColor = vbWhite
Me.Priority.BackColor = vbBlue
End Select
End Sub