Conditional Formatting on report in Access
I have a report that pulls data from a table and has the values of Red, Green, Blue, White, Yellow, Purple, Gold. I want the background behind each of those colors to be that color. So if the report shows Blue, then the text is Black in color but the background behind it is blue.
Here is my code thus far:
Select Case Me.PreviousStatus.Value
Case "Blue"
Me.PreviousStatus.BackColor = 16711680
Case "Green"
Me.PreviousStatus.BackColor = RGB(0, 255, 0)
Case "Red"
Me.PreviousStatus.BackColor = RGB(255, 0, 0)
Case Else
Me.PreviousStatus.BackColor = vbWhite
End Select
|