INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Group Header Won't Repeat on Next Page

Group Header Won't Repeat on Next Page

(OP)
Group Header Won't Repeat on Next Page even when Properties set to "RepeatSection" = "Yes".
Any help will be greatly appreciated!!

RE: Group Header Won't Repeat on Next Page

Is the group header in the main report or a subreport?

Are you using the Print Preview mode?

Duane
Hook'D on Access
MS Access MVP

RE: Group Header Won't Repeat on Next Page

(OP)
Thanks Duane! The group header is on the main report, and I am force to use Print Preview because the report needs to be exported to PDF.

RE: Group Header Won't Repeat on Next Page

(OP)
Yes; the code hidden you suggested on a previous post to conditionally hides the group if blank. (it works great hiding the section)

Private Sub GroupHeader2_Format(Cancel As Integer, FormatCount As Integer)
Cancel = (Me.TxtNumEnc < 1)

End Sub

RE: Group Header Won't Repeat on Next Page

Ok, is that code hiding the group header you are expected to see?

Duane
Hook'D on Access
MS Access MVP

RE: Group Header Won't Repeat on Next Page

(OP)
This is the code hiding the group header if specific field is blank.
Private Sub GroupHeader2_Format(Cancel As Integer, FormatCount As Integer)
Cancel = (Me.TxtNumEnc < 1)

When the cell is not blank; then, I am expecting this group header to be displayed and carry forward to the next page if group information moves to the next page.
Thanks for all your help!

RE: Group Header Won't Repeat on Next Page

Basic trouble-shooting would be to comment out the code to see if the group information displays on the next page.

Duane
Hook'D on Access
MS Access MVP

RE: Group Header Won't Repeat on Next Page

(OP)
Following your advice, I commented the code and the Group Header is performing as expected (Repeat on each page)
Do you have an idea how to create a event condition on VBA?

If condition_1 Then
result_1
ElseIf condition_2 Then
result_2

I am not sure if this is correct:
If (Me.TxtNumEnc < 1) Then
Cancel = (Me.TxtNumEnc < 1)
ElseIf (Me.TxtNumEnc >= 1) Then
GroupHeader2.Visible True
End If

Thanks!!!!

RE: Group Header Won't Repeat on Next Page

(OP)
I just tried the code below and these are the results:
- The code hides Group Header 2 when the count is less than 1 (great)
- Group Header 2 is not repeating on the next section. :(

Private Sub GroupHeader2_Format(Cancel As Integer, FormatCount As Integer)
If (Me.TxtNumEnc < 1) Then
GroupHeader2.Visible = False
ElseIf (Me.TxtNumEnc >= 1) Then
GroupHeader2.Visible = True

End If
End Sub

RE: Group Header Won't Repeat on Next Page

(OP)
Yes; the count formula is on the group header. Should I move it?

RE: Group Header Won't Repeat on Next Page

I would leave it in the group header. I don't have time to create a sample test and try various solutions at the moment. Maybe later tonight or someone else can chime in.

Duane
Hook'D on Access
MS Access MVP

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close