I am trying to match the labels in two reports that I have. I have a report that opens, once this is open a piece of code in that report is run. This will look at another report that is already open, compare the captions of the two reports labels, and if they match set the two backcolors to match. However, this does not seem to be working. I get no errors, but it is not working? My code I have tried to use is attached.
For Each ctl In Me.Controls
If ctl.ControlType = acLabel Then
For i = 11 To 20
If ctl.Caption = Reports!rpt_ViewResults!("Label" & i).Caption Then
ctl.BackColor = Reports!rpt_ViewResults!("Label" & i).BackColor