Trouble referencing a group of textboxes from a report

MattK23

Registered User.
Local time
Today, 11:40
Joined
Mar 3, 2009
Messages
13
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?

Code:
Public Sub AssignToWeek()

Dim i As Integer
Dim ctlControl As Control

For i = 1 To 52
[B]ctlControl = Reports![Enrollment Manager Schedule]("txtAssignedWeek" & i)[/B]
....some code
Next i

End Sub
 
The question has to be why, but you're almost certainly using the wrong event, try the OnFormat or OnPrint events
 

Users who are viewing this thread

Back
Top Bottom