A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Footer only to appear once!



 
 
Thread Tools Display Modes
  #1  
Old September 17th, 2008, 12:45 AM posted to microsoft.public.access.reports
Bob Vance
external usenet poster
 
Posts: 726
Default Footer only to appear once!


I have a report with a footer , Information about my company, but my report
has a Sub/Report that mat stretch to 4 or 5 pages is it possible for footer
only to appear on the last page at the Bottom
--
Thanks in advance for any help with this......Bob
WindowsXP..MS Access 2007


  #2  
Old September 17th, 2008, 06:28 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Footer only to appear once!

Bob Vance wrote:
I have a report with a footer , Information about my company, but my report
has a Sub/Report that mat stretch to 4 or 5 pages is it possible for footer
only to appear on the last page at the Bottom



I presume the footer you are talking about is the report's
Page Footer section.

You can make the page footer section visible/invisible by
using code in the page *header* section's Format (or Print)
event:

Me.Section(4).Visible = (Me.Page = Me.Pages)

This requires that you have a text box (somewhere) that uses
the report's Pages property.

--
Marsh
MVP [MS Access]
  #3  
Old September 18th, 2008, 03:26 AM posted to microsoft.public.access.reports
Bob Vance
external usenet poster
 
Posts: 726
Default Footer only to appear once!

Marshall I made a text box that in my header that shows me how many pages
[txtMaxpage]
If Me.Pages = 0 Then
Me.txtMaxpage = Me.Page
Me.Section(4).Visible = (Me.txtMaxpage = Me.Pages)
and have another text box showing :
="Page " & [Page] & " of " & [Pages]
It is taking away the footer from the first pages but the last page is not
showing my Reports/Footer
Thanks for the help....Bob

"Marshall Barton" wrote in message
...
Bob Vance wrote:
I have a report with a footer , Information about my company, but my
report
has a Sub/Report that mat stretch to 4 or 5 pages is it possible for
footer
only to appear on the last page at the Bottom



I presume the footer you are talking about is the report's
Page Footer section.

You can make the page footer section visible/invisible by
using code in the page *header* section's Format (or Print)
event:

Me.Section(4).Visible = (Me.Page = Me.Pages)

This requires that you have a text box (somewhere) that uses
the report's Pages property.

--
Marsh
MVP [MS Access]



  #4  
Old September 18th, 2008, 06:37 AM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Footer only to appear once!

When you post code, please use Copy/Paste so we don't have
to deal with typing mistakes or omissions.

Why are you using all that to calculate the last page
number? It seems to me that it should make the page footer
visible on every page. There may be a valid reason for
calculating txtMaxPage, but you need to compare it to
Me.Page, not to Me.Pages

What are you referring to when you say "Reports/Footer"?
There can be a Report footer and/or a Page footer, but only
the Page footer appears at the bottom of the page.

But there may be a discrepancy to this whole idea. If the
first time through (when Pages=0), the last page's page
footer will be invisible, leaving more space for the detail
data. The second time through the report when the page
footer on the last page is visible, there may not be enough
space for all the data so it wasn't really the last page. I
conclude from this thought experiment that trying to reclaim
the page footer's space on all but the last page is not
reliable. You can test this by seeing if the page of pages
text box displays something goofy like Page 7 of 6

If you can live without reclaiming the page footer space,
then just move the line of code from the page header event
to the page footer's Format event.
--
Marsh
MVP [MS Access]


Bob Vance wrote:
Marshall I made a text box that in my header that shows me how many pages
[txtMaxpage]
If Me.Pages = 0 Then
Me.txtMaxpage = Me.Page
Me.Section(4).Visible = (Me.txtMaxpage = Me.Pages)
and have another text box showing :
="Page " & [Page] & " of " & [Pages]
It is taking away the footer from the first pages but the last page is not
showing my Reports/Footer
Thanks for the help....Bob

"Marshall Barton" wrote
Bob Vance wrote:
I have a report with a footer , Information about my company, but my
report
has a Sub/Report that mat stretch to 4 or 5 pages is it possible for
footer
only to appear on the last page at the Bottom



I presume the footer you are talking about is the report's
Page Footer section.

You can make the page footer section visible/invisible by
using code in the page *header* section's Format (or Print)
event:

Me.Section(4).Visible = (Me.Page = Me.Pages)

This requires that you have a text box (somewhere) that uses
the report's Pages property.

  #5  
Old September 18th, 2008, 09:37 AM posted to microsoft.public.access.reports
Bob Vance
external usenet poster
 
Posts: 726
Default Footer only to appear once!

Marshall, I am struggling with this, txtmaxPage is showing me the last page
but i am not getting my footer on that last page....regards bob
If Me.Pages = 0 Then
Me.txtMaxpage = Me.Page
Me.Section(4).Visible = (Me.txtMaxpage Me.Page)

"Marshall Barton" wrote in message
...
When you post code, please use Copy/Paste so we don't have
to deal with typing mistakes or omissions.

Why are you using all that to calculate the last page
number? It seems to me that it should make the page footer
visible on every page. There may be a valid reason for
calculating txtMaxPage, but you need to compare it to
Me.Page, not to Me.Pages

What are you referring to when you say "Reports/Footer"?
There can be a Report footer and/or a Page footer, but only
the Page footer appears at the bottom of the page.

But there may be a discrepancy to this whole idea. If the
first time through (when Pages=0), the last page's page
footer will be invisible, leaving more space for the detail
data. The second time through the report when the page
footer on the last page is visible, there may not be enough
space for all the data so it wasn't really the last page. I
conclude from this thought experiment that trying to reclaim
the page footer's space on all but the last page is not
reliable. You can test this by seeing if the page of pages
text box displays something goofy like Page 7 of 6

If you can live without reclaiming the page footer space,
then just move the line of code from the page header event
to the page footer's Format event.
--
Marsh
MVP [MS Access]


Bob Vance wrote:
Marshall I made a text box that in my header that shows me how many pages
[txtMaxpage]
If Me.Pages = 0 Then
Me.txtMaxpage = Me.Page
Me.Section(4).Visible = (Me.txtMaxpage = Me.Pages)
and have another text box showing :
="Page " & [Page] & " of " & [Pages]
It is taking away the footer from the first pages but the last page is not
showing my Reports/Footer
Thanks for the help....Bob

"Marshall Barton" wrote
Bob Vance wrote:
I have a report with a footer , Information about my company, but my
report
has a Sub/Report that mat stretch to 4 or 5 pages is it possible for
footer
only to appear on the last page at the Bottom


I presume the footer you are talking about is the report's
Page Footer section.

You can make the page footer section visible/invisible by
using code in the page *header* section's Format (or Print)
event:

Me.Section(4).Visible = (Me.Page = Me.Pages)

This requires that you have a text box (somewhere) that uses
the report's Pages property.



  #6  
Old September 18th, 2008, 03:06 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Footer only to appear once!

Please Copy/Paste the entire procedure so I can tell where
the code is and check to make sure there isn't something
else getting in the way.

You changed the = to so the page footer should be visible
on all but the last page.

Did you understand what I said about reclaiming the space
being unreliable?

It may help me understand your report a little better if you
explained why you are calculating txtMaxpage. Seems to me
you can just set the text box's control source expression to
=Pages
--
Marsh
MVP [MS Access]


Bob Vance wrote:

Marshall, I am struggling with this, txtmaxPage is showing me the last page
but i am not getting my footer on that last page....regards bob
If Me.Pages = 0 Then
Me.txtMaxpage = Me.Page
Me.Section(4).Visible = (Me.txtMaxpage Me.Page)

"Marshall Barton" wrote
When you post code, please use Copy/Paste so we don't have
to deal with typing mistakes or omissions.

Why are you using all that to calculate the last page
number? It seems to me that it should make the page footer
visible on every page. There may be a valid reason for
calculating txtMaxPage, but you need to compare it to
Me.Page, not to Me.Pages

What are you referring to when you say "Reports/Footer"?
There can be a Report footer and/or a Page footer, but only
the Page footer appears at the bottom of the page.

But there may be a discrepancy to this whole idea. If the
first time through (when Pages=0), the last page's page
footer will be invisible, leaving more space for the detail
data. The second time through the report when the page
footer on the last page is visible, there may not be enough
space for all the data so it wasn't really the last page. I
conclude from this thought experiment that trying to reclaim
the page footer's space on all but the last page is not
reliable. You can test this by seeing if the page of pages
text box displays something goofy like Page 7 of 6

If you can live without reclaiming the page footer space,
then just move the line of code from the page header event
to the page footer's Format event.
--
Marsh
MVP [MS Access]


Bob Vance wrote:
Marshall I made a text box that in my header that shows me how many pages
[txtMaxpage]
If Me.Pages = 0 Then
Me.txtMaxpage = Me.Page
Me.Section(4).Visible = (Me.txtMaxpage = Me.Pages)
and have another text box showing :
="Page " & [Page] & " of " & [Pages]
It is taking away the footer from the first pages but the last page is not
showing my Reports/Footer
Thanks for the help....Bob

"Marshall Barton" wrote
Bob Vance wrote:
I have a report with a footer , Information about my company, but my
report
has a Sub/Report that mat stretch to 4 or 5 pages is it possible for
footer
only to appear on the last page at the Bottom


I presume the footer you are talking about is the report's
Page Footer section.

You can make the page footer section visible/invisible by
using code in the page *header* section's Format (or Print)
event:

Me.Section(4).Visible = (Me.Page = Me.Pages)

This requires that you have a text box (somewhere) that uses
the report's Pages property.



  #7  
Old September 18th, 2008, 06:40 PM posted to microsoft.public.access.reports
Bob Vance
external usenet poster
 
Posts: 726
Default Footer only to appear once!

Thanks Marshall, Regards Bob
Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As
Integer)
If tbCash = True Then
lblcash.Visible = True
Else
lblcash.Visible = False
If Me.Pages = 0 Then
Me.txtMaxpage = Me.Page
Me.Section(4).Visible = (Me.txtMaxpage Me.Page)


End If
End If
End Sub
"Marshall Barton" wrote in message
...
Please Copy/Paste the entire procedure so I can tell where
the code is and check to make sure there isn't something
else getting in the way.

You changed the = to so the page footer should be visible
on all but the last page.

Did you understand what I said about reclaiming the space
being unreliable?

It may help me understand your report a little better if you
explained why you are calculating txtMaxpage. Seems to me
you can just set the text box's control source expression to
=Pages
--
Marsh
MVP [MS Access]


Bob Vance wrote:

Marshall, I am struggling with this, txtmaxPage is showing me the last
page
but i am not getting my footer on that last page....regards bob
If Me.Pages = 0 Then
Me.txtMaxpage = Me.Page
Me.Section(4).Visible = (Me.txtMaxpage Me.Page)

"Marshall Barton" wrote
When you post code, please use Copy/Paste so we don't have
to deal with typing mistakes or omissions.

Why are you using all that to calculate the last page
number? It seems to me that it should make the page footer
visible on every page. There may be a valid reason for
calculating txtMaxPage, but you need to compare it to
Me.Page, not to Me.Pages

What are you referring to when you say "Reports/Footer"?
There can be a Report footer and/or a Page footer, but only
the Page footer appears at the bottom of the page.

But there may be a discrepancy to this whole idea. If the
first time through (when Pages=0), the last page's page
footer will be invisible, leaving more space for the detail
data. The second time through the report when the page
footer on the last page is visible, there may not be enough
space for all the data so it wasn't really the last page. I
conclude from this thought experiment that trying to reclaim
the page footer's space on all but the last page is not
reliable. You can test this by seeing if the page of pages
text box displays something goofy like Page 7 of 6

If you can live without reclaiming the page footer space,
then just move the line of code from the page header event
to the page footer's Format event.
--
Marsh
MVP [MS Access]


Bob Vance wrote:
Marshall I made a text box that in my header that shows me how many
pages
[txtMaxpage]
If Me.Pages = 0 Then
Me.txtMaxpage = Me.Page
Me.Section(4).Visible = (Me.txtMaxpage = Me.Pages)
and have another text box showing :
="Page " & [Page] & " of " & [Pages]
It is taking away the footer from the first pages but the last page is
not
showing my Reports/Footer
Thanks for the help....Bob

"Marshall Barton" wrote
Bob Vance wrote:
I have a report with a footer , Information about my company, but my
report
has a Sub/Report that mat stretch to 4 or 5 pages is it possible for
footer
only to appear on the last page at the Bottom


I presume the footer you are talking about is the report's
Page Footer section.

You can make the page footer section visible/invisible by
using code in the page *header* section's Format (or Print)
event:

Me.Section(4).Visible = (Me.Page = Me.Pages)

This requires that you have a text box (somewhere) that uses
the report's Pages property.





  #8  
Old September 18th, 2008, 09:21 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Footer only to appear once!

Please provide some clarification on the points that I asked
about.

I can not tell what this code will do without a very
specific detailed explanation of what it's supposed to be
doing. You have never said anything about hiding the page
footer only when tbCash is False. What do you do to
guarantee that the last page has tbCash is set to False?

Why haven't you changed the to =

At this point, I am about to give up and tell you, again, to
move the line:

Me.Section(4).Visible = (Me.Page = Me.Pages)

to the Page Footer section's Format event.
--
Marsh
MVP [MS Access]


Bob Vance wrote:
Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As
Integer)
If tbCash = True Then
lblcash.Visible = True
Else
lblcash.Visible = False
If Me.Pages = 0 Then
Me.txtMaxpage = Me.Page
Me.Section(4).Visible = (Me.txtMaxpage Me.Page)
End If
End If
End Sub



"Marshall Barton" wrote
Please Copy/Paste the entire procedure so I can tell where
the code is and check to make sure there isn't something
else getting in the way.

You changed the = to so the page footer should be visible
on all but the last page.

Did you understand what I said about reclaiming the space
being unreliable?

It may help me understand your report a little better if you
explained why you are calculating txtMaxpage. Seems to me
you can just set the text box's control source expression to
=Pages


Bob Vance wrote:

Marshall, I am struggling with this, txtmaxPage is showing me the last
page
but i am not getting my footer on that last page....regards bob
If Me.Pages = 0 Then
Me.txtMaxpage = Me.Page
Me.Section(4).Visible = (Me.txtMaxpage Me.Page)

"Marshall Barton" wrote
When you post code, please use Copy/Paste so we don't have
to deal with typing mistakes or omissions.

Why are you using all that to calculate the last page
number? It seems to me that it should make the page footer
visible on every page. There may be a valid reason for
calculating txtMaxPage, but you need to compare it to
Me.Page, not to Me.Pages

What are you referring to when you say "Reports/Footer"?
There can be a Report footer and/or a Page footer, but only
the Page footer appears at the bottom of the page.

But there may be a discrepancy to this whole idea. If the
first time through (when Pages=0), the last page's page
footer will be invisible, leaving more space for the detail
data. The second time through the report when the page
footer on the last page is visible, there may not be enough
space for all the data so it wasn't really the last page. I
conclude from this thought experiment that trying to reclaim
the page footer's space on all but the last page is not
reliable. You can test this by seeing if the page of pages
text box displays something goofy like Page 7 of 6

If you can live without reclaiming the page footer space,
then just move the line of code from the page header event
to the page footer's Format event.



  #9  
Old September 18th, 2008, 11:24 PM posted to microsoft.public.access.reports
Bob Vance
external usenet poster
 
Posts: 726
Default Footer only to appear once!

Sorry Marshall, lblCash is just a label in my header that shows when there
is a true in the command to open the report!
I have done what you said , but my Pagefooter dosent appear on the last page
or any page actually..Regards Bob

Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As
Integer)
Me.Section(4).Visible = (Me.Page = Me.Pages)

End Sub

"Marshall Barton" wrote in message
...
Please provide some clarification on the points that I asked
about.

I can not tell what this code will do without a very
specific detailed explanation of what it's supposed to be
doing. You have never said anything about hiding the page
footer only when tbCash is False. What do you do to
guarantee that the last page has tbCash is set to False?

Why haven't you changed the to =

At this point, I am about to give up and tell you, again, to
move the line:

Me.Section(4).Visible = (Me.Page = Me.Pages)

to the Page Footer section's Format event.
--
Marsh
MVP [MS Access]


Bob Vance wrote:
Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As
Integer)
If tbCash = True Then
lblcash.Visible = True
Else
lblcash.Visible = False
If Me.Pages = 0 Then
Me.txtMaxpage = Me.Page
Me.Section(4).Visible = (Me.txtMaxpage Me.Page)
End If
End If
End Sub



"Marshall Barton" wrote
Please Copy/Paste the entire procedure so I can tell where
the code is and check to make sure there isn't something
else getting in the way.

You changed the = to so the page footer should be visible
on all but the last page.

Did you understand what I said about reclaiming the space
being unreliable?

It may help me understand your report a little better if you
explained why you are calculating txtMaxpage. Seems to me
you can just set the text box's control source expression to
=Pages


Bob Vance wrote:

Marshall, I am struggling with this, txtmaxPage is showing me the last
page
but i am not getting my footer on that last page....regards bob
If Me.Pages = 0 Then
Me.txtMaxpage = Me.Page
Me.Section(4).Visible = (Me.txtMaxpage Me.Page)

"Marshall Barton" wrote
When you post code, please use Copy/Paste so we don't have
to deal with typing mistakes or omissions.

Why are you using all that to calculate the last page
number? It seems to me that it should make the page footer
visible on every page. There may be a valid reason for
calculating txtMaxPage, but you need to compare it to
Me.Page, not to Me.Pages

What are you referring to when you say "Reports/Footer"?
There can be a Report footer and/or a Page footer, but only
the Page footer appears at the bottom of the page.

But there may be a discrepancy to this whole idea. If the
first time through (when Pages=0), the last page's page
footer will be invisible, leaving more space for the detail
data. The second time through the report when the page
footer on the last page is visible, there may not be enough
space for all the data so it wasn't really the last page. I
conclude from this thought experiment that trying to reclaim
the page footer's space on all but the last page is not
reliable. You can test this by seeing if the page of pages
text box displays something goofy like Page 7 of 6

If you can live without reclaiming the page footer space,
then just move the line of code from the page header event
to the page footer's Format event.





  #10  
Old September 19th, 2008, 12:49 AM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Footer only to appear once!

Bob Vance wrote:

lblCash is just a label in my header that shows when there
is a true in the command to open the report!
I have done what you said , but my Pagefooter dosent appear on the last page
or any page actually

Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As
Integer)
Me.Section(4).Visible = (Me.Page = Me.Pages)

End Sub



The only reasons I can think of to explain why that didn't
work is:

a) Pages was not used in a text box expression

b) There is something else in the report's code that's
messing with the page number

c) You did not remove that code from the page header's
event.

--
Marsh
MVP [MS Access]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:16 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.