Report Will Continue Message

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to insert a "Continued on Next Page" message when there is more than
one page to a report. I'm using the following code and it isn't working.
Any suggestions?

Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As
Integer)

If Me.Section("PageHeaderSection").WillContinue = True Then
Me.pgcont.Visible = True
Else: Me.pgcont.Visible = False
End If

End Sub
 
DT said:
I want to insert a "Continued on Next Page" message when there is more than
one page to a report. I'm using the following code and it isn't working.
Any suggestions?

Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As
Integer)

If Me.Section("PageHeaderSection").WillContinue = True Then
Me.pgcont.Visible = True
Else: Me.pgcont.Visible = False
End If

End Sub


You are misinterpreting the meaning of the WillContinue
property. It only tells you if the section itself will
spill ove to the next page and the Page header/footer
sections will never do that.

If you only want to display teh continue message on all but
the last page of the report, then, first make sure you have
a text box that uses the Pages property (e.g.
="Page " & Page & " of " & Pages). Then the code you're
looking for would be:

Me.pgcont.Visible = (Me.Page < Me.Pages)
 
This is exactly what I needed...thank you!

Marshall Barton said:
You are misinterpreting the meaning of the WillContinue
property. It only tells you if the section itself will
spill ove to the next page and the Page header/footer
sections will never do that.

If you only want to display teh continue message on all but
the last page of the report, then, first make sure you have
a text box that uses the Pages property (e.g.
="Page " & Page & " of " & Pages). Then the code you're
looking for would be:

Me.pgcont.Visible = (Me.Page < Me.Pages)
 
Back
Top