I am trying to apply conditional formatting to several subreports within a main report (Charlie) with code - because I have four conditions.
When the value of txt_SafetyFundingNumber is
1-5, red fill with white font;
6-9, yellow fill with black font;
10-14 blue fill with white font; and
15-20, green fill with white font.
The following is my attempt to apply a red fill with white font when the value of the textbox is <=5.
Expand|Select|Wrap|Line Numbers
- Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
- ' Set color coding of field based on value
- Dim intSafetyFundNum As Integer
- If Not IsNull(Me.txt_SafetyFundingNumber.Value) Then
- intSafetyFundNum = Me.txt_SafetyFundingNumber.Value
- Else
- Exit Sub
- End If
- If intSafetyFundNum <= 5 Then
- Me.txt_SafetyFundingNumber.Report.FillColor = 3
- Me.txt_SafetyFundingNumber.Report.ForeColor = 1
- End If
- End Sub
Thanks so much for any advice anyone cares to give!
:)