I am trying to reference 52 textboxes on a report. I am calling the sub AssignToWeek from the open event of the report.
Below is a partial listing of the sub AssignToWeek. I am getting an "Object variable or With block variable not set" error for the line of code in bold. Can someone please help me with the proper syntax?
Below is a partial listing of the sub AssignToWeek. I am getting an "Object variable or With block variable not set" error for the line of code in bold. Can someone please help me with the proper syntax?
Code:
Public Sub AssignToWeek()
Dim i As Integer
Dim ctlControl As Control
For i = 1 To 52
[B]ctlControl = Reports[/B]
....some code
Next i
End Sub