So, I found this piece of code online and want to use it in a Report:
The difference is that I would like to Highlight Division if it is selected from a Listbox (name?) on a form control. The form control provides a parameter for a query, and the query provides the data for the report. So, if the user selects "Division 1" on the form control, "Division 1" will be highlighted on the report.
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
'Set the backstyle to normal (default is usually transparent)
DIVISION.BackStyle = 1
If DIVISION = "1" Then
DIVISION.BackColor = vbRed
Else
DIVISION.BackColor = vbWhite
End If
End Sub
The difference is that I would like to Highlight Division if it is selected from a Listbox (name?) on a form control. The form control provides a parameter for a query, and the query provides the data for the report. So, if the user selects "Division 1" on the form control, "Division 1" will be highlighted on the report.