- database in access
- ADO is in use
- Datareport is designed.
- I have 40 records in Recordset.
- I want create one page per record in recordset.
It just create one page report for only first record
Private Sub Command1_Click()
Dim cnString As String
Set rs = New ADODB.Recordset
cnString = "Select * from Main"
rs.Open cnString, cn, adOpenStatic, adLockOptimistic
Set DataReport1.DataSource = rs
If Not rs.EOF Then
DataReport1.Sections(4).ForcePageBreak = rptPageBreakAfter
DataReport1.Show
rs.MoveNext
End If
End Sub