Hi Everyone,
Hopefully this is a simple question for all you gurus out there...
1. The code below populates a report, but nothing except the last record is displayed. So at the moment I have a report 12 pages long displaying only one record. How do I make sure the other records are also displayed?
2. I can't really tell if it works yet becuase all the records in the report are the same, but have I used the "PageBreak" property correctly?
Do While Not rst.EOF
Me.sec_role1.Caption = rst.Fields(4)
Me.sec_role2.Caption = rst.Fields(5)
Me.UserID.Caption = rst.Fields(6)
Me.UserName.Caption = rst.Fields(7)
rst.MoveNext
If Not rst.EOF Then
If rst.Fields(1) = "Y" Then
'Me.Detail.ForceNewPage
'Me.PageFooterSection.ForceNewPage = aftersection
Me.PageBreak1.Visible = True
End If
End If
Loop
Thanks!
Hopefully this is a simple question for all you gurus out there...
1. The code below populates a report, but nothing except the last record is displayed. So at the moment I have a report 12 pages long displaying only one record. How do I make sure the other records are also displayed?
2. I can't really tell if it works yet becuase all the records in the report are the same, but have I used the "PageBreak" property correctly?
Do While Not rst.EOF
Me.sec_role1.Caption = rst.Fields(4)
Me.sec_role2.Caption = rst.Fields(5)
Me.UserID.Caption = rst.Fields(6)
Me.UserName.Caption = rst.Fields(7)
rst.MoveNext
If Not rst.EOF Then
If rst.Fields(1) = "Y" Then
'Me.Detail.ForceNewPage
'Me.PageFooterSection.ForceNewPage = aftersection
Me.PageBreak1.Visible = True
End If
End If
Loop
Thanks!