There is a property in the Report Properties box that says
PageHeader and you selection is All Pages, Not with Report Header, not with Report Footer, not with Report Header/Footer. You might look at that. If you don't find anything, you can try this. In the Format Event for the PageHeader put
If Me.Page > 1 Then
Me.PageHeaderSection.Visible = True
Else
Me.PageHeaderSection.Visible = False
End If
Thx for this, i tried the PageHeader properties set to not with report header, until i remembered that the reprt header may spill over onto two pages, and i need the page header & footers on every page other than the first.
So then i tried the code only to get an 'invalid qualifier' error and the '.PageHeaderSection' section highligheted.
I changed my page header & footer sections' names to PageHeaderSection and PageFooterSection respectivly as i assumed the code refers to the sections by name. if at first you don't succeed, get a 10lb lump hammer
Ok, so i found that i replace 'Me.PageHeaderSection.Visible' with 'Me.Section("<<NAME OF SECTION>>".Visible' then it should work.
Only it doesn't.
The only thing i can think of it that once you change a section's property that you need to 'refresh' the current page...
Or am i completely barking?? if at first you don't succeed, get a 10lb lump hammer
Well, when I wrote the code, I wasn't entire sure how to name the section so I used the . (dot) method and Access gave me the name (actually it was the same name as my page header). When you type in Me. you should get a dropdown menu with the different Report properties and in that list I had "PageHeaderSection" which was also the name on the Name line in the properties box for the Page Header. Both methods that you outline should work. I did check the code out an it seems to work fine for me. I will double check everything this morning when I have time.
Firstly, I am using Access97 in case that makes a difference to reports.
Secondly, could it be something to do with the fact i'm using a page break in the report header?? if at first you don't succeed, get a 10lb lump hammer
Ok, i've been prodding and poking and found for some reason, that a page header, but not footer is being displayed on the 2nd page.
So, the fisrt page has neither - which is brilliant, but the second page has only a header, all the rest have both... if at first you don't succeed, get a 10lb lump hammer
Private Sub PageHeader_Format(Cancel As Integer, FormatCount As Integer)
Me.Section(3).Visible = Me.Page - 1
Me.Section(4).Visible = Me.Page - 1
End Sub
Paul, i did just copy the code into the format event of the footer, and alter it for the footer of cause
There must be something wrong with my report because using Dan's code displays the header when it should and hides it when it should, but always displays the footer...
I'm going to create a completly new database and try a report in there just in case it isn't just this db that's somehow become screwed...
Thx for the persistance peeps.. if at first you don't succeed, get a 10lb lump hammer
TJones, add a text box in the page footer:
=[Page] & " of " & [Pages]
If you don't need it, make it invisible.
As I said, it works peachy here...
ftp://ftp.artrom.ro/RptHdFt.mdb
(it's Access 97, but you can convert it to whatever access version)
Download it and open the report
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.