I am generating a report and having to assign the values to the report programmatically. The report is bound on dates and it has a list of dates from the same table that my recordset is based on. I have included the beginning of my code to give you an idea. However, when the report loads the first value that was assigned to the text box is displayed in all of the text boxes for the "No Response" category. How can I either advance to the next text box within the report? Is this something that is feasible? I have included screen shot of report for reference as well. Thanks in advance for your help.
Code:
Private Sub Report_Load()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim varDiv, varDate, varResponse, varCount
Set db = CurrentDb
Set rs = db.OpenRecordset("qryDivBreakdown", dbOpenDynaset)
rs.MoveFirst
Do While Not rs.EOF
'******************
'This loop will look up each value in "qryDivBreakdown
'and assign the value to the appropriate box within rptDivBreakdown
'******************
varDiv = rs("DIVISION")
varDate = rs("BegWk")
varCount = rs("CountID")
varResponse = rs("Response")
If varDiv = 10 Then
If varResponse = "No Response" Then
txtDiv1_7.Value = varCount
End If
End If
rs.MoveNext
Loop
End Sub