Supressing Page Headers (1 Viewer)

Darrell

Registered User.
Local time
Today, 22:46
Joined
Feb 1, 2001
Messages
299
Hi guys,
I've got this report (well it's not actually mine but I'm helping...) where there is a graph in the report footer and so the user would like the page header and footer removed from the last page of the report.

Now I've had a bit of a look around and I found this which has mostly worked...

Private Sub Report_Page()
If Me.Page Mod 2 = 0 Then
Me.PageHeaderSection.Visible = False
Me.PageFooterSection.Visible = False
Else
Me.PageHeaderSection.Visible = True
Me.PageFooterSection.Visible = True
End If
End Sub

The only problem is that is has removed the header and footer from page 3 of the report as well as the last page, and unfortunately my knowledge of this stuff isn't up to working out why.

Is anyone able to shed some light on this?

Cheers :)

dh
 

Darrell

Registered User.
Local time
Today, 22:46
Joined
Feb 1, 2001
Messages
299
Ah..an update on this....

I've done some more digging and found that the Mod bit is simply telling this to work on every even numbered page (why it is doing this to every page after the first page is a bit of a mystery - and sort of beside the point.)

All I need now is the right IF something THEN bit...

dh
 
R

Rich

Guest
The option not to display headers/footers with the report footer is on the property sheet, you don't need code
 

Darrell

Registered User.
Local time
Today, 22:46
Joined
Feb 1, 2001
Messages
299
:eek: Um...Thanks. I've never had to use that before...

I'm just going to run off and hide now....

Thanks Rich.

dh
 

Users who are viewing this thread

Top Bottom