I'm attempting to turn a border color to red based on certain criteria:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Me.UDF_PK_SWK_YESNO.Value = "Y" Then
ItemCode.BorderColor = vbRed
ItemCodeDesc.BorderColor = vbRed
End If
End Sub
When I use this in the On Format section of the Detail part of my report, it colors the borders of every line item for ItemCode and ItemCodeDesc red.
Can you tell me what I'm missing? I've tried all different kinds of combinations.
I added a picture. Only the ones circled should have borders.