Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group Header Won't Repeat on Next Page

Status
Not open for further replies.

MochaLatte

Technical User
Jan 11, 2011
39
US
Group Header Won't Repeat on Next Page even when Properties set to "RepeatSection" = "Yes".
Any help will be greatly appreciated!!
 
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.
 
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
 
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!
 
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!!!!
 
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
 
Yes; the count formula is on the group header. Should I move it?
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top