Hide Page Footer except last page

Ziggy1

Registered User.
Local time
Today, 18:12
Joined
Feb 6, 2002
Messages
462
I'm using this right now in the format event...

me.txShpAcct.Visible = (Me.Page = Me.Pages)

but it still leaves a Blank space, where the Page footer controls would be. I've tried setting the controls to shrink/grow but it doesn't matter. I can manually set the footer to be invisible in the properties but

.PageFooter.visible= (Me.Page = Me.Pages) does Not work ( errors "Invalid Qualifier") How can I control this programically?

EDIT:

Ok I renamed the page footer to and put this in the new footer event...


me .PageFooter1.Visible = (Me.Page = Me.Pages)

It does hide it, but does not display it on the last page? And I don't want to use the Report footer because I need it right at the bottom of the last page as this is a signature page along with some legal mumbo jumbo...report footer will be messy as it ends anywhere.
 
Last edited:
I'm using this right now in the format event...

me.txShpAcct.Visible = (Me.Page = Me.Pages)

but it still leaves a Blank space, where the Page footer controls would be. I've tried setting the controls to shrink/grow but it doesn't matter. I can manually set the footer to be invisible in the properties but

.PageFooter.visible= (Me.Page = Me.Pages) does Not work ( errors "Invalid Qualifier") How can I control this programically?

EDIT:

Ok I renamed the page footer to and put this in the new footer event...


me .PageFooter1.Visible = (Me.Page = Me.Pages)

It does hide it, but does not display it on the last page? And I don't want to use the Report footer because I need it right at the bottom of the last page as this is a signature page along with some legal mumbo jumbo...report footer will be messy as it ends anywhere.

You have never really stated with section's On Format event you are using. This will probably need to someplace other the the pager footer's event.
I would try the page header's On Format event.
 
Last edited:
You have never really stated with section's On Format event you are using. This will probably need to someplace other the the pager footer's event. I would try the page header's On Format event.


you mean where I put the code..

Code:
Private Sub PageFooter1_Format(Cancel As Integer, FormatCount As Integer)

With Me
   .txShpAcct.Visible = (Me.Page = Me.Pages)
   .txtAgtCar.Visible = (Me.Page = Me.Pages)
   .txtCarAgt.Visible = (Me.Page = Me.Pages)
   .txtCarShp.Visible = (Me.Page = Me.Pages)
   .txtDLC.Visible = (Me.Page = Me.Pages)
   .txtShpAgt.Visible = (Me.Page = Me.Pages)
   .txtShpDate.Visible = (Me.Page = Me.Pages)
   .txtShpPer.Visible = (Me.Page = Me.Pages)
   .Text170.Visible = (Me.Page = Me.Pages)
   .Text172.Visible = (Me.Page = Me.Pages)
  
'.PageFooter1.Visible = False
 End With
End Sub
 
here is a screen shot of the design,,
 

Attachments

  • ScreenShot_ ziggy.stouten011.jpg
    ScreenShot_ ziggy.stouten011.jpg
    96.7 KB · Views: 790
why not just make it the report footer, not the page footer

a page footer prints on every page

a report footer prints at the end of the report
 
why not just make it the report footer, not the page footer

a page footer prints on every page

a report footer prints at the end of the report


It's not that easy, the report footer prints where the data ends, so if the detail record ends at the top of the second page the the Report footer will follow right behind it, if I try to extend the report footer then at some point it will be forced to a blank page on it's own....I understand that can happen anyways, but what I expect to see is the first page without the signoff section and allowing for more room....if there are not enough records for a second page then it should all fit on the first...hence the
.Text170.Visible = (Me.Page = Me.Pages) Portion
 
as far as i understand, it's better in a legally binding document (whether that's a contract or a sign-off or other) to have the signatures as close to the end of the presented data/text - this prevents people 'adding' anything after a signature is provided into the 'blank' space.

this would support having signatures in a report footer, ESPECIALLY because it adds the 'footer' immediately after the detail.

at the same time, legal documents i've signed have a place in the page footer to inital and date EVERY page - to prevent people 'adding' extra pages after a signature is provided. this also holds true for our lab books - we have to initial and date every page (and our supervisor too) so that the 'truthfullness' of the data/date is witnessed

i.e., if joe bloggs says he discovered a cure for something, and so did i (ha! yeah, wishfull thinking, but this IS just an example!) then both lab's books can be checked for dates/signatures/results to see who truly discovered it first.... anyway.

e.g., also, if a legal document is made and signed, then some corrupt lawyer decides to throw in an extra page of clauses - they can't b/c that one page won't have been signed.
 
Apparently you can you hide the Page Footer section in its entirety in 1997 allow I have not yet checked Access 2007. So in my case I want the Invoices Totals at the only at the bottom of the Page (customised stationery) so:

Report Page Header On Format
Set every control on the Page Footer to be invisible

Invoice Footer On Format
Now set every control on the Page Footer visible as the Invoice has ended!

You can't put the Invisibility on the Invoice Header in case of continuous pages.

I did read that in later versions of Access you could manipulate the Section X and Y co-ordinates so having established the height of the Footer you could physically re-position the Report Header.

Well that is the theory but it still bugs me that reports often have to fit customised stationery and wouldn't it be easy to just say:

.Section(Page Footer).visible = False

There is probably some-one about that has a more eloquent solution.

Simon
 
thanks wiklendt, it's not an issue in that respect because the documents are signed and then copied, if there is "Additions to one document that are not in another then I would assume they would not count...seems only logical? Any ways the idea is to situated at the bottom of the page ( last page) as it looks sloppy to be at varying positions.


Simon

Thanks... you see I can hide the entire footer, but it won't reappear when I set visible to true

me.PageFooter1.Visible = False It could be that I am not calling them at the right time from the right section.... I will look at what you said, but I swear I tried that.
 
Maybe you could post your database. I can't see why your proposals won't work.
Chris
 
here is a stripped down sample, the way you see the code is not the only way I tried. I've commented out the hiding of the controls and tried just hiding the section but still no luck.

I can hide the controls and make them show on the last page, but please note that it leaves a gap on the first pages if you do.
 

Attachments

So now I am trying a different approach, but still seem to have the same issue. I set all the controls and the Page footer to ZERO for the Dim and positions in the group header, and then in the footer ( I tried them all) I set them back to their original values ( only testing with one control), but it won't show ugh

Ziggy
 
perhaps another way to do this is to make the page footer not visible normally, and visible only after you have printed a report footer

so in the reportfooter, just set some boolean to true

and in the page fototer set it to visible iff the footer boolean is true

That might work

but to do this requires you use a technique to pre-scan the report and determine how many pages there are
 
I don't believe that you can set the PageFooter to be invisible. The correct reference maybe:

.Section(4).visible False

Simon
 
i hadn't checked, but there IS a yes/no visible setting for the page footer.

it was just another idea i thought might work


[edited - i've just tried, and it doesnt work like that - but you can use the visble property in this way

the way to do it is to check the page count in the page HEADER
there are properties of a report called [page] and [pages], and you can use them

so first set the pagefooter to visible = no , in the property tab

then this does the trick (i did it in the page header format section - i tried various things but it didnt work in the page footer itself)


Code:
'put this in the page HEADER format
     If [Pages] > 0 Then
            PageFooterSection.Visible = ([Page] = [Pages] )
     End If[/B]
 
Last edited:
Gemma,

Thats what I thought, but it didn't work, seems so simple but at the time impossible for Access 1997.

Simon
 
I didnt read all the posts, but you can try something like this.

Code:
Private Sub PageFooter1_Format(Cancel As Integer, FormatCount As Integer)
 
if me.page=me.pages then
.PageFooter1.Visible = true
else
.pagefooter1.visible=false
End Sub

I dont know why you have the "." in ".pagefooter", but I left it there. Maybe it should be Pagefooter1, or me.pagefooter1.
 
ok - this works in A97

Me.Section("PageFooter").Visible = [Page] = [Pages]
 
Gemma wait...where did you put that? I can hide the footer, but can't show it on the last page?
 
Last edited:

Users who are viewing this thread

Back
Top Bottom