I am trying to set the back color of a rectangle (called SignalBox) on a report. The color depends on the value of another field, ItemStatus, which will have a value of a,b, or c. Can someone look at this code and tell me why I get this error? The report is based on a query. ItemStatus is a conditional field if that makes a difference. I can view ItemStatus in the query with no problem.
Thanks,
Carly
Private Sub GroupHeader2_Format(Cancel As Integer, FormatCount As Integer)
If Me.ItemStatus = c And Me.DateComplete Is Null Then
Me.SignalBox.BackColor = 255
Else
Cancel
End If
If Me.ItemStatus = b And Me.DateComplete Is Null Then
Me.SignalBox.BackColor = 65535
Else
Cancel
End If
If Me.ItemStatus = a And Me.DateCompleted Is Null Then
Me.SignalBox.BackColor = 52377
Else
Cancel
End If
End Sub
Thanks,
Carly
Private Sub GroupHeader2_Format(Cancel As Integer, FormatCount As Integer)
If Me.ItemStatus = c And Me.DateComplete Is Null Then
Me.SignalBox.BackColor = 255
Else
Cancel
End If
If Me.ItemStatus = b And Me.DateComplete Is Null Then
Me.SignalBox.BackColor = 65535
Else
Cancel
End If
If Me.ItemStatus = a And Me.DateCompleted Is Null Then
Me.SignalBox.BackColor = 52377
Else
Cancel
End If
End Sub