Tupacmoche
Registered User.
- Local time
- Yesterday, 23:29
- Joined
- Apr 28, 2008
- Messages
- 291
Hi Report Masters,
I have a report that appropriately prints its headers and footers for the main report. But, I also have Page Breaks controls in this report with sub reports that I don't want to have the page header or footer of the main report printed on. To suppress the header/footers, I have added this code to the page Header/footer Sections - On Format event:
Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
If Me.SPH_MEDTrustee.Value = 1 Then
Forms!Report_Gift_Transmittal_Rpt.Section(acPageHeader).Visible = False
Else
End If
End Sub
I know that the above condition is correct since it is also the condition for the sub report being included and it is. Can anyone see what is wrong?
I have a report that appropriately prints its headers and footers for the main report. But, I also have Page Breaks controls in this report with sub reports that I don't want to have the page header or footer of the main report printed on. To suppress the header/footers, I have added this code to the page Header/footer Sections - On Format event:
Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
If Me.SPH_MEDTrustee.Value = 1 Then
Forms!Report_Gift_Transmittal_Rpt.Section(acPageHeader).Visible = False
Else
End If
End Sub
I know that the above condition is correct since it is also the condition for the sub report being included and it is. Can anyone see what is wrong?