OneEyedBartender
Programmer
Hello!
I need help creating multiple conditional formats in Access. I found this great thread on this forum: but the code posted by ZmrAbdulla only works for the Font color, not the background fill color.
I've tried using "BackColor" but for whatever reason it won't work. As you can see below, I want to background/interior filled with the same color as the font.
Here is the code that I tried:
Thanks in advance for your help!
I need help creating multiple conditional formats in Access. I found this great thread on this forum: but the code posted by ZmrAbdulla only works for the Font color, not the background fill color.
I've tried using "BackColor" but for whatever reason it won't work. As you can see below, I want to background/interior filled with the same color as the font.
Here is the code that I tried:
Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Select Case Me.[Status].Value
Case Is = "Highest Priority"
Me.[Status].ForeColor = vbRed
Me.[Status].BackColor = vbRed
Case Is = "On Track"
Me.[Status].ForeColor = vbGreen
Me.[Status].BackColor = vbGreen
Case Is = "Need Attention"
Me.[Status].ForeColor = vbYellow
Me.[Status].BackColor = vbYellow
Case Else
Me.[Status].ForeColor = vbBlack
Me.[Status].BackColor = vbBlack
End Select
End Sub
Thanks in advance for your help!