So I have a stored procedure in my database which I run from MS access using pass through query which returns a table. I access the table using a recordset "rs". I want to loop through recordset and for each row I want to create an instance of the report and populate textboxes.
For example I want a report for each student that will have name, age, sex, etc. So it should be done by looping through recordset and creating a report for each student and filling in textboxes. I wrote this code to test for one textbox but have a strong feeling that I'm missing a lot. Any help would be very much appreciated
Dim i As Integer
i = 0
Do While Not rs.EOF
Dim rtp(i) As Report_DecemberProject
Set rpt(i) = New Report_DecemberProject
rpt(i).Text55.Value = rs.Fields(3)
rpt(i).Visible = True
i = i + 1
Loop
rs
as data source of your report. Then you can set the control source of textboxes to the required fields. You can insert a page break or group by some field and insert group headers and footers. In the group header set "Force New Page" to "Before Section". – Olivier Jacot-Descombes