Change BackColor based on two Fields

D

david.isaacks

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.[Status] = "New" And Me.[Completed] > 8 Then
Me.Completed.BackColor = 255 'Red
Else
If Me.[Status] = "Normal" And Me.[Completed] > 4 Then
Me.Completed.BackColor = 255 'Red
Else
If Me.[Status] = "At Risk" And Me.[Completed] > 8 Then
Me.Completed.BackColor = 255 'Red
Else
Me.Completed.BackColor = vbWhite
End If
End Sub

I keep getting an error with this Event. I am trying to run a report
that highlights individuals if they meet the critiera.

The [Completed] field is a count field which is summing the total
number of LastNames in that Group Header. If any of these are greater
than the numbers I just want the field to be left White.

Thanks -
David
 
Top