Hi,
I have a report with a control called "Highlight" (which will be hidden eventually). Depending on which value I have selected on a form, one of the lines on my report will have the Highlight value set to "H" and the others will all be Null. I have verified that this is working. The H does appear.
I want to use this value to shade that line of the report yellow i.e. highlighting the line that matches the form selection. But it's not working. I get no error messages, but it just doesn't change the colour.
Is it a problem with the code itself, which is in the OnPrint event, or is there some other setting or property I need in order to activate this somehow?
Please see attached image of report.
I have a report with a control called "Highlight" (which will be hidden eventually). Depending on which value I have selected on a form, one of the lines on my report will have the Highlight value set to "H" and the others will all be Null. I have verified that this is working. The H does appear.
I want to use this value to shade that line of the report yellow i.e. highlighting the line that matches the form selection. But it's not working. I get no error messages, but it just doesn't change the colour.
Is it a problem with the code itself, which is in the OnPrint event, or is there some other setting or property I need in order to activate this somehow?
Code:
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If Me.Highlight.Value = "H" Then
Me.Detail.BackColor = RGB(255, 255, 204) 'pale yellow
Else
Me.Detail.BackColor = RGB(255, 255, 255) 'white
End If
End Sub
Please see attached image of report.