Report Will Continue Message

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
 
M

Marshall Barton

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)
 
G

Guest

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top