473,385 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Hide Section When Printing Report

Hello,

If my report is only 1 page I would like the page footer to print and
not the report footer. If the report is more than 1 page I would like
the report footer to print and I don't want the page footer to print on
any of the pages. This has turned out to be more difficult than I
originally thought it would be.

Thanks,

Bill from PA

Nov 13 '05 #1
4 3501
Ken
Bill from PA,

Private Sub Report_Page()

If Me.Pages = 1
DoCmd.RunCommand acCmdPageHdrFtr 'Toggles display of page
header and footer
Else
DoCmd.RunCommand acCmdReportHdrFtr 'Toggles display of rpt
headers and footers
End If

End Sub

Ken

Nov 13 '05 #2
Ken,

Thanks for the reply. When I put this code into the page event of the
report I get a run-time error "The command or action PageHdrFtr isn't
available now". Run-Time error 2046.

I played around with setting the sections visible property to False but
I couldn't get it to work properly.

Thanks,

Bill

Nov 13 '05 #3
Ken
Have you tried:

If Me.Pages = 1 Then
Me.Section(acPageFooter).Visible = True
Me.Section(acFooter).Visible = False
Else
Me.Section(acPageFooter).Visible = False
Me.Section(acFooter).Visible = True
End If

Nov 13 '05 #4
Yes this is how I originally had it set up (I used
Me.PageFooterSection.Visible and Me.ReportFooter.Visible). Both gave
the same result. Even though I am stepping through the code and it
steps through exactly the way it should the first page still always
prints the page footer which is what I'm trying to avoid. The second
page is correct, the page footer does not print and the report footer
does.

Thanks again.

Bill from PA

Nov 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: L Mehl | last post by:
Different users of the app will want or not want to see report footer ( appears as a separate page). I can make the section invisible with a DLookup of a Y or N value from a 'parameters' table ...
7
by: Mark | last post by:
Hi All, I have a report which is based on a query which is used to produce QC check sheets. I have quite a few text boxes which are used to display questions depending on the value of one...
7
by: Darin | last post by:
I have a report that sub-totals on a group, then grand-totals at the report footer. If there's only one group, the sub-total and grand total are redundant, so I only want to show one of them. I...
1
by: Norman | last post by:
Hello All, I have developed the ASP.Net application using .Net 1.1. I want to get one section of the page under hide/show feauture. That means when the user clicks on display I want to display all...
3
by: deciacco | last post by:
I'm trying to write a label printing SDI app with a small preview on the main form itself. Every time I run the InvalidatePreview event on the preview control to redraw the preview I get the...
10
by: sara | last post by:
Hi - Is it possible to hide the detail section of a report at run time? I have a report that prints all details, with summary lines. The user would like the report ALSO with just summary lines....
11
by: dusk | last post by:
Hi, I'm very new to javascript, and I'm having trouble finding a way to display a string of divs without the code getting really messy. I have several different pages to write, each with about...
3
by: carmela_wong | last post by:
I am trying to output a report in which I show the total number of people if groupfooter is "STAFF" but not if it is "ATTENDEES". The report will say: STAFF: Staff1....... Staff2...... Total...
1
by: Glenn | last post by:
I am writing a program for field work that will use a receipt printer. I need to be able to adjust the page settings prior to printing depending on how much needs to be printed. I have been able...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.