bowieknife
Technical User
Is there an easy way to create more than 3 conditions using conditional formatting on an Access report?
If not, is there a good work-around?
Thanks.
If not, is there a good work-around?
Thanks.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
If [Veh Code] = 32, 33, 82, 83, 94, or 95
Then [Veh Code] and [Veh Type] and [Sched Date] = vbgreen
Else
If [Veh Code] = 14 or 67
Then [Veh Code] and [Veh Type] and [Sched Date] = vbred
Else
If [Veh Code] = 01
Then [Veh Code] and [Veh Type] and [Sched Date] = vbblue
Else
If [Veh Code] = whatever Then
[Veh Code] and [Veh Type] = "the color you desire"
End If
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Select Case Me.[Veh Code].Value
Case Is = 32, 33, 82, 83, 94 Or 95
Me.[Veh Code].ForeColor = vbGreen
Me.[Veh Type].ForeColor = vbGreen
Me.[Sched Date].ForeColor = vbGreen
Case Is = 14 Or 67
Me.[Veh Code].ForeColor = vbRed
Me.[Veh Type].ForeColor = vbRed
Me.[Sched Date].ForeColor = vbRed
Case Is = 1
Me.[Veh Code].ForeColor = vbBlue
Me.[Veh Type].ForeColor = vbBlue
Me.[Sched Date].ForeColor = vbBlue
Case Else
Me.[Veh Code].ForeColor = vbBlack
Me.[Veh Type].ForeColor = vbBlack
Me.[Sched Date].ForeColor = vbBlack
End Select
End Sub
I only count 3 expressions. Are there more? If not, then in the conditional format dialog box, select "Expression is" and enter:If [Veh Code] = 32, 33, 82, 83, 94, or 95 Then [Veh Code] and [Veh Type] and [Sched Date] = vbgreen
If [Veh Code] = 14 or 67 Then [Veh Code] and [Veh Type] and [Sched Date] = vbred
If [Veh Code] = 01 Then [Veh Code] and [Veh Type] and [Sched Date] = vbblue