HOWTO: Reset Page Header for Each Group

D

Dan Johnson

Earlier this week I had a problem getting a page header to NOT print on the
first page of a group. Marshall's response was to add the following code:

Private Sub GroupFooter1_Format(Cancel As Integer, FormatCount As Integer)
Me.Section(3).Visible = False
End Sub

Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
Page = 1
Me.Section(3).Visible = True
End Sub

This works fine as far as viewing the report on the screen, but I was still
getting the page header section on Print, so I added the following:

Private Sub GroupFooter1_Print(Cancel As Integer, PrintCount As Integer)
Me.Section(3).Visible = False
End Sub

Private Sub GroupHeader0_Print(Cancel As Integer, PrintCount As Integer)
Page = 1
Me.Section(3).Visible = True
End Sub

I had also set the group header section's ForceNewPage property is set to
BeforeSection earlier.

Can anyone see why this works for viewing onscreen, but not for printing?

Thanks!

Dan
 
F

fredg

Earlier this week I had a problem getting a page header to NOT print on the
first page of a group. Marshall's response was to add the following code:

Private Sub GroupFooter1_Format(Cancel As Integer, FormatCount As Integer)
Me.Section(3).Visible = False
End Sub

Private Sub GroupHeader0_Format(Cancel As Integer, FormatCount As Integer)
Page = 1
Me.Section(3).Visible = True
End Sub

This works fine as far as viewing the report on the screen, but I was still
getting the page header section on Print, so I added the following:

Private Sub GroupFooter1_Print(Cancel As Integer, PrintCount As Integer)
Me.Section(3).Visible = False
End Sub

Private Sub GroupHeader0_Print(Cancel As Integer, PrintCount As Integer)
Page = 1
Me.Section(3).Visible = True
End Sub

I had also set the group header section's ForceNewPage property is set to
BeforeSection earlier.

Can anyone see why this works for viewing onscreen, but not for printing?

Thanks!

Dan

Please do not multi-post. If you feel you must post the same question
to more than one newsgroup (and it's seldom necessary), cross-post by
adding each additional newsgroup in the To Newsgroups: box, separated
by a comma.
This way an answer in one newsgroup will be seen in each of the
others. More readers will see the response and learn, and less time
will be spent on duplicate answers.

See Netiquette at http://www.mvps.org/access

It's a great site to visit anyway.
 
D

Dan Johnson

Sorry, I had posted once, then noticed it wasn't where I thought it should
be, so reposted. In fact, it was listed under a different thread. Ooops!
 

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