Need to print Cover Sheet for report.

Hi,

I'm using Access via Office XP Pro.

I am working on a government report.  The first page of the report is a 
cover sheet / instructions and has nothing to do with the actual data other 
than it has to be the first page / coversheet to the report.

Then I have the actual report which needs to have one footer at the end of 
the report which has the actual totals.  I do not need a footer on each page, 
just the last page.

Currently, I put the cover sheet in the Report Header.  The cover sheet has 
our name, address, phone number, name of person submitting the report, and 
goverment specified text.  It takes one entire page and must be formatted as 
specified by the government.  At the end of the cover sheet, I want to force 
a page eject, but I don't know how to do that.  So currently, I've just 
formatted the page to take up every line and let Access do the page eject.

I then have a page header, which prints at the top of the second and 
subsequent pages.

I then have my detailed report section and then my page footer.  (There is 
no Report footer.)

Everything works great in print preview.  It is perfect!  The first page 
prints without the page header or page footer, and the subsequent pages (the 
actual report) print with the header and footer on the last page.    However, 
when click on Print, the footer prints on EVERY Page. 

I have another post asking how to suppress printing the footer on all but 
the last page.

Here is my questions for this post:

Is this the right approach?
I'm thinking about breaking this into two reports - 1 for the cover sheet 
and then the acutal report.  The actual report will call the coversheet 
report in the On Open event and then proceed with the actual report.  Any 
thoughs on this approach?

Is there a better approach? 

If there a way to force a page eject from within the code?  I would like to 
force a page eject after the cover sheet.

Thanks for your help.


-- 
Dennis
0
Utf
2/3/2010 5:07:01 PM
access.reports 4434 articles. 0 followers. Follow

12 Replies
829 Views

Similar Articles

[PageSpeed] 51

Dennis wrote:
>I'm using Access via Office XP Pro.
>
>I am working on a government report.  The first page of the report is a 
>cover sheet / instructions and has nothing to do with the actual data other 
>than it has to be the first page / coversheet to the report.
>
>Then I have the actual report which needs to have one footer at the end of 
>the report which has the actual totals.  I do not need a footer on each page, 
>just the last page.
>
>Currently, I put the cover sheet in the Report Header.  The cover sheet has 
>our name, address, phone number, name of person submitting the report, and 
>goverment specified text.  It takes one entire page and must be formatted as 
>specified by the government.  At the end of the cover sheet, I want to force 
>a page eject, but I don't know how to do that.  So currently, I've just 
>formatted the page to take up every line and let Access do the page eject.
>
To start a new page after the report header, you should only
need to set the report header section's ForceNewPage
property to After Section in design view.

>I then have a page header, which prints at the top of the second and 
>subsequent pages.
>
>I then have my detailed report section and then my page footer.  (There is 
>no Report footer.)
>
>Everything works great in print preview.  It is perfect!  The first page 
>prints without the page header or page footer, and the subsequent pages (the 
>actual report) print with the header and footer on the last page.    However, 
>when click on Print, the footer prints on EVERY Page. 
>
>I have another post asking how to suppress printing the footer on all but 
>the last page.
>
>Here is my questions for this post:
>
>Is this the right approach?
>I'm thinking about breaking this into two reports - 1 for the cover sheet 
>and then the acutal report.  The actual report will call the coversheet 
>report in the On Open event and then proceed with the actual report.  Any 
>thoughs on this approach?
>

Don't make it so complicated.

It sounds like you set the page footer section's Visible
property to No in design view and use some code to set it to
True only for the last page.  If so, setting the Visible
property to No in design view is not effective.  Instead you
can use a line of code in the PAGE HEADER section's Format
event to set the page footer section's Visible property for
each page:

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

This approach requires that you have a text box somewhere in
the report that refers to Pages.  A text box with an
expression something like  =Page & " of " & Pages would be
sufficient.

-- 
Marsh
MVP [MS Access]
0
Marshall
2/3/2010 6:24:18 PM
Marsh,

I did set my page footer section's Visible property to No in design view.  I 
have
“= “Page “ & [Page] & “ of “ & [Pages]” in my page heading.

I did the following:
1.  Set the page footer’s Visible Property to Yes in design view.
2.  Placed the following code in the PAGE HEADER section's Format event:

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

The results:
1.  I have a 2 page report, 2 pages print, but the value of Pages = 3.
2.  No footer is printed on page 2.


I did the following:
1.  I set the page footer’s visible property to No in designe view.
2.  Placed the above code in the PAGE HEADER section’s Format event.

Results:
1.  I have a 2 page report, 2 pages print, and the value of Pages = 2
2.  No footer is printed on page 2.

Bottom line is no footer is printed on page 2.  Any suggestions.


Here is the report’s code:

Option Compare Database
Option Explicit

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

    If Len(Me.txtPostalCode) > 5 Then
        Me.txtPostalCode.Format = "@@@@@-@@@@"
    Else
        Me.txtPostalCode.Format = "@@@@@"
    End If

End Sub

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
    Dim strNoMembers As String
    
    pintNoMembers = pintNoMembers + 1
    strNoMembers = "0" & Trim(str(pintNoMembers)) & "."
    txtMemCt = Right(strNoMembers, 3)
    
End Sub

Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As 
Integer)
    txtPFNoMembers = pintNoMembers
    txtPFCheckAmt = pintNoMembers * psinMemDues
End Sub

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



Dennis

0
Utf
2/4/2010 12:44:01 AM
Dennis wrote:
>I did set my page footer section's Visible property to No in design view.  I 
>have
>�= �Page � & [Page] & � of � & [Pages]� in my page heading.
>
>I did the following:
>1.  Set the page footer�s Visible Property to Yes in design view.
>2.  Placed the following code in the PAGE HEADER section's Format event:
>
>	Me.Section(4).Visible = (Me.Page = Me.Pages)
>
>The results:
>1.  I have a 2 page report, 2 pages print, but the value of Pages = 3.
>2.  No footer is printed on page 2.
>
>
>I did the following:
>1.  I set the page footer�s visible property to No in designe view.
>2.  Placed the above code in the PAGE HEADER section�s Format event.
>
>Results:
>1.  I have a 2 page report, 2 pages print, and the value of Pages = 2
>2.  No footer is printed on page 2.
>
>Bottom line is no footer is printed on page 2.  Any suggestions.
>
>
>Here is the report�s code:
>
>Option Compare Database
>Option Explicit
>
>Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
>
>    If Len(Me.txtPostalCode) > 5 Then
>        Me.txtPostalCode.Format = "@@@@@-@@@@"
>    Else
>        Me.txtPostalCode.Format = "@@@@@"
>    End If
>
>End Sub
>
>Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
>    Dim strNoMembers As String
>    
>    pintNoMembers = pintNoMembers + 1
>    strNoMembers = "0" & Trim(str(pintNoMembers)) & "."
>    txtMemCt = Right(strNoMembers, 3)
>    
>End Sub
>
>Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As 
>Integer)
>    txtPFNoMembers = pintNoMembers
>    txtPFCheckAmt = pintNoMembers * psinMemDues
>End Sub
>
>Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As 
>Integer)
>    Me.Section(4).Visible = (Me.Page = (Me.Pages))
>End Sub


Very nice explanation of what you tried and the results.
I'm pretty sure that pins things down.

I was afraid that the last  page might get a 3 of 2 kind of
anomaly.  The problem is almost certainly that you have
exactly the wrong number of details so that the last detail
fits on the second page if there is no page footer, but
moves to the next page when there is a page footer.

I'll try to explain the background that put's the report
into that catch 22 kind of state.  When a report uses Pages,
it must be formatted twice, the first time just to calculate
the number of pages.  During this first pass through the
report, Pages has the value 0 so the code to display the
page footer never succeeds.  The second time through, Pages
has a value and the page footer is displayed on what was the
last page the first time through.  I get a headache thinking
about the ramifications of all that and don't see how
setting the page footer's Visible property in design view
causes different results.  The detail section's
CanGrow/CanShrink and KeepTogether settings can add another
level of complexity to the headache.

If you do not require the space the page footer would occupy
on each page, we could try a different approach.  Remove the
line of code in the page header's event and try this in the
page footer's event:
	Cancel = Not (Me.Page = Me.Pages)

If you want to use the page footer space, then it gets very
messy and can not be done at all if the detail section is
allowed to grow/shrink.

-- 
Marsh
MVP [MS Access]
0
Marshall
2/4/2010 2:18:40 PM
Marsh,

Did you say launching one report for the instruction page and another for 
the report was complicated?  Trying to suppress the page footing without 
causing the print engine to reformat is also complicated.  The print preview 
and print engine apparently work differently.

I have asked earlier if there was any anyway to force the Report Footing 
(not page footing) to print at  the bottom of the current page. 

Your responded:  

Not easily, but it can be done. Add a top level group (View - Sorting And 
Grouping) with footer using a constant expression such as =1 Don't add 
anything to this group 
footer. 

Use code in this group footer's Format event to adjust its height to fill 
the page down to where you want the report footer to be. The code to position 
the report footer 9 inches from the top of the page would be something like: 

Const FOOTERPOSITION As Long = 9 * TPI ' 9 inches 

Private Sub GroupFooter0_Format(Cancel As Integer, FormatCount As Integer) 
If Me.Top < FOOTERPOSITION Then 
Me.Section(6).Height = FOOTERPOSITION - Me.Top 
End If 
End Sub 

I have not experimented with scenarios when there is not enough room for the 
report footer on the same page as the last detail. 

After reading below, I would ask which is the best option (I’m 3 days into 
trying to position the footing):

1.  Keep working on the page footing
2.  Work on positioning the Report Footing
3.  Launch report from within this report to print government page and the 
let this report print the detail?


Response to your response:


Regarding your comment  “I was afraid that the last  page might get a 3 of 2 
kind of anomaly.  The problem is almost certainly that you have exactly the 
wrong number of details so that the last detail fits on the second page if 
there is no page footer, but moves to the next page when there is a page 
footer.”

Response:  I don’t believe this is the issue yet as I have only 1 detail.

I removed the code in the Page Header and putting  in the Page Footer Format 
and no footing appeared.

Below is the different code I tried (one at a time) in Page Footer Format 
event, the results and a debug.print statement that I put in Page Footer 
Format.  The debug print statement is:

“Debug.Print "Cancel =" & Cancel, "Page = " & Me.Page, "Pages = " & 
Me.Pages, "footing Vis = " & Me.Section(4).Visible:

First try:
“Cancel = Not (Me.Page = Me.Pages)” 

Print Preview
Report Open
Report Activate
Footing Visible set to False
Report Header Format
Page Footer Format                 Cancel =0     Page = 1      Pages = 0     
footing Vis = False
Page Header Format
Detail Format
Page Footer Format                 Cancel =0     Page = 2      Pages = 0     
footing Vis = False
Report Header Format
Page Header Print
Page Footer Format                 Cancel =0     Page = 1      Pages = 2     
footing Vis = True

Preview Page 2
Page Header Format	
Detail Format
Detail Print
Page Footer Format                 Cancel =0     Page = 2      Pages = 2     
footing Vis = True


Print Run
Report Header Format
Page Footer Format Print Run
Report Header Format
Page Footer Format                 Cancel =0     Page = 1      Pages = 2     
footing Vis = True

Report Header Format
Page Footer Format                 Cancel =0     Page = 2      Pages = 2     
footing Vis = True
Page Header Format
Detail Format
Page Footer Format                 Cancel =0     Page = 3      Pages = 2     
footing Vis = True

Report Header Format
Page Header Print
Page Footer Format                 Cancel =0     Page = 1      Pages = 3     
footing Vis = True

Report Header Format
Page Header Print
Page Footer Format                 Cancel =0     Page = 2      Pages = 3     
footing Vis = True
Page Header Format
Detail Format
Detail Print
Page Footer Format                 Cancel =0     Page = 3      Pages = 3     
footing Vis = True

It reserves the footing space on page 1 which causes original page 1 to fall 
on to 2, and 2 to fall on to three.  Does not print footing on pg 1 or 2, but 
does on page 3.  Since this did not work, I did not try it in Print mode.


Second try:

Footing Visible Property = False design view 
If (me.page  = (Me.pages) – 1) then
   Me.section(4).visibile = True
end

PRINT PREVIEW - PAGE 1
Report Open
Report Activate

Report Header Format             Pass # 1
Page Footer Format                 Cancel =0     Page = 1      Pages = 0     
footing Vis = False
Page Header Format
Detail Format
Page Footer Format                 Cancel =0     Page = 2      Pages = 0     
footing Vis = False

Report Header Format             Pass # 2
Page Header Print
Page Footer Format                 Cancel =0     Page = 1      Pages = 2     
footing Vis = True

PREVIEW - PAGE 2
Page Header Format
Detail Format
Detail Print
Page Footer Format                 Cancel =0     Page = 2      Pages = 2     
footing Vis = True
Page Footer Print                     Page Footer Visible = False


PRINT REPORT
Report Header Format             Pass # 1
Page Footer Format                 Cancel =0     Page = 1      Pages = 2     
footing Vis = False
Page Header Format
Detail Format
Page Footer Format                 Cancel =0     Page = 2      Pages = 2     
footing Vis = True

Report Header Format             Pass # 2
Page Header Print
Page Footer Format                 Cancel =0     Page = 1      Pages = 2     
footing Vis = True
Page Footer Print                     Page Footer Visible = False

Report Header Format             Pass # 1
Page Header Print
Page Footer Format                 Cancel =0     Page = 2      Pages = 2     
footing Vis = True
Page Header Format
Detail Format
Detail Print
Page Footer Format                 Cancel =0     Page = 3      Pages = 2     
footing Vis = True
Page Footer Print                     Page Footer Visible = False

The problem is in Print mode, turning on Footing appears to cause Access to 
reformat starting at page 1.  (Pass 2’s page is -= 1). 


Here is the strip down code for the report:

Option Compare Database
Option Explicit

Dim pintNoMembers As Integer
Dim psinMemDues As Single
Dim pblnPrtFlag As Boolean
Dim pintNoPasses As Integer

Const cpintDefNationalDues As Integer = 11
Const cpintDefDeptDues As Integer = 11


Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As 
Integer)
    txtPFNoMembers = pintNoMembers
    txtPFCheckAmt = pintNoMembers * psinMemDues
    If pblnPrtFlag Then
        If (Me.Page = Me.Pages) Then
            Me.Section(4).Visible = True
        End If
    Else
        If (Me.Page = (Me.Pages) - 1) Then
            Me.Section(4).Visible = True
        End If
    End If
    Debug.Print "Page Footer Format"
    Debug.Print "Cancel =" & Cancel, "Page = " & Me.Page, "Pages = " & 
Me.Pages, "footing Vis = " & Me.Section(4).Visible
End Sub

Private Sub PageFooterSection_Print(Cancel As Integer, PrintCount As Integer)
    
    pblnPrtFlag = True
    pintNoPasses = 0
    Me.Section(4).Visible = False         ‘ reset to invisible for print pass
    Debug.Print "Page Footer Print", , "  Page Footer Visible = " & 
Me.Section(4).Visible
End Sub

Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As 
Integer)
    Debug.Print "Page Header Format"
End Sub

Private Sub Report_Activate()
    Debug.Print "Report Activate"
   
End Sub

Private Sub Report_Open(Cancel As Integer)
    
    Debug.Print "Report Open"
    pintNoMembers = 0
    psinMemDues = 0
    pblnPrtFlag = False
    pintNoPasses = 0
    Me.Section(4).Visible = False                           ' Turn off page 
footer visibilty
    
End Sub

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)
    pintNoPasses = pintNoPasses + 1
    Debug.Print vbCrLf & "Report Header Format", "          Pass # " & 
pintNoPasses
End Sub

Private Sub ReportHeader_Print(Cancel As Integer, PrintCount As Integer)
    Debug.Print "Page Header Print"
End Sub



Thanks 

Dennis
0
Utf
2/5/2010 6:54:16 PM
Hello Dennis,

Do you launch the report with a command button? Have you considered creating 
the cover sheet/instructions in Word and formatting it as needed? Then in 
your code in the click event of the button, start by opening Word and 
printing the cover sheet/instructions, Close Word then print the Access 
report/

Steve
santus@penn.com



"Dennis" <Dennis@discussions.microsoft.com> wrote in message 
news:AF98AF44-6864-4303-A1FE-E48F413CF2FB@microsoft.com...
> Hi,
>
> I'm using Access via Office XP Pro.
>
> I am working on a government report.  The first page of the report is a
> cover sheet / instructions and has nothing to do with the actual data 
> other
> than it has to be the first page / coversheet to the report.
>
> Then I have the actual report which needs to have one footer at the end of
> the report which has the actual totals.  I do not need a footer on each 
> page,
> just the last page.
>
> Currently, I put the cover sheet in the Report Header.  The cover sheet 
> has
> our name, address, phone number, name of person submitting the report, and
> goverment specified text.  It takes one entire page and must be formatted 
> as
> specified by the government.  At the end of the cover sheet, I want to 
> force
> a page eject, but I don't know how to do that.  So currently, I've just
> formatted the page to take up every line and let Access do the page eject.
>
> I then have a page header, which prints at the top of the second and
> subsequent pages.
>
> I then have my detailed report section and then my page footer.  (There is
> no Report footer.)
>
> Everything works great in print preview.  It is perfect!  The first page
> prints without the page header or page footer, and the subsequent pages 
> (the
> actual report) print with the header and footer on the last page. 
> However,
> when click on Print, the footer prints on EVERY Page.
>
> I have another post asking how to suppress printing the footer on all but
> the last page.
>
> Here is my questions for this post:
>
> Is this the right approach?
> I'm thinking about breaking this into two reports - 1 for the cover sheet
> and then the acutal report.  The actual report will call the coversheet
> report in the On Open event and then proceed with the actual report.  Any
> thoughs on this approach?
>
> Is there a better approach?
>
> If there a way to force a page eject from within the code?  I would like 
> to
> force a page eject after the cover sheet.
>
> Thanks for your help.
>
>
> -- 
> Dennis 


0
Steve
2/5/2010 7:52:40 PM
Dennis wrote:
>Did you say launching one report for the instruction page and another for 
>the report was complicated?  Trying to suppress the page footing without 
>causing the print engine to reformat is also complicated.  The print preview 
>and print engine apparently work differently.
>
>I have asked earlier if there was any anyway to force the Report Footing 
>(not page footing) to print at  the bottom of the current page. 
>
>Your responded:  
>
>Not easily, but it can be done. Add a top level group (View - Sorting And 
>Grouping) with footer using a constant expression such as =1 Don't add 
>anything to this group 
>footer. 
>
>Use code in this group footer's Format event to adjust its height to fill 
>the page down to where you want the report footer to be. The code to position 
>the report footer 9 inches from the top of the page would be something like: 
>
>Const FOOTERPOSITION As Long = 9 * TPI ' 9 inches 
>
>Private Sub GroupFooter0_Format(Cancel As Integer, FormatCount As Integer) 
>If Me.Top < FOOTERPOSITION Then 
>Me.Section(6).Height = FOOTERPOSITION - Me.Top 
>End If 
>End Sub 
>
>I have not experimented with scenarios when there is not enough room for the 
>report footer on the same page as the last detail. 
>
>After reading below, I would ask which is the best option (I�m 3 days into 
>trying to position the footing):
>
>1.  Keep working on the page footing
>2.  Work on positioning the Report Footing
>3.  Launch report from within this report to print government page and the 
>let this report print the detail?
>
>
>Response to your response:
>
>
>Regarding your comment  �I was afraid that the last  page might get a 3 of 2 
>kind of anomaly.  The problem is almost certainly that you have exactly the 
>wrong number of details so that the last detail fits on the second page if 
>there is no page footer, but moves to the next page when there is a page 
>footer.�
>
>Response:  I don�t believe this is the issue yet as I have only 1 detail.
>
>I removed the code in the Page Header and putting  in the Page Footer Format 
>and no footing appeared.
>
>Below is the different code I tried (one at a time) in Page Footer Format 
>event, the results and a debug.print statement that I put in Page Footer 
>Format.  The debug print statement is:
>
>�Debug.Print "Cancel =" & Cancel, "Page = " & Me.Page, "Pages = " & 
>Me.Pages, "footing Vis = " & Me.Section(4).Visible:
>
>First try:
[snip invalid tests]
>The problem is in Print mode, turning on Footing appears to cause Access to 
>reformat starting at page 1.  (Pass 2�s page is -= 1). 
>
>Here is the strip down code for the report:
>
>Option Compare Database
>Option Explicit
>
>Dim pintNoMembers As Integer
>Dim psinMemDues As Single
>Dim pblnPrtFlag As Boolean
>Dim pintNoPasses As Integer
>
>Const cpintDefNationalDues As Integer = 11
>Const cpintDefDeptDues As Integer = 11
>
>
>Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As 
>Integer)
>    txtPFNoMembers = pintNoMembers
>    txtPFCheckAmt = pintNoMembers * psinMemDues
>    If pblnPrtFlag Then
>        If (Me.Page = Me.Pages) Then
>            Me.Section(4).Visible = True
>        End If
>    Else
>        If (Me.Page = (Me.Pages) - 1) Then
>            Me.Section(4).Visible = True
>        End If
>    End If
>    Debug.Print "Page Footer Format"
>    Debug.Print "Cancel =" & Cancel, "Page = " & Me.Page, "Pages = " & 
>Me.Pages, "footing Vis = " & Me.Section(4).Visible
>End Sub
>
>Private Sub PageFooterSection_Print(Cancel As Integer, PrintCount As Integer)
>    
>    pblnPrtFlag = True
>    pintNoPasses = 0
>    Me.Section(4).Visible = False         � reset to invisible for print pass
>    Debug.Print "Page Footer Print", , "  Page Footer Visible = " & 
>Me.Section(4).Visible
>End Sub
>
>Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As 
>Integer)
>    Debug.Print "Page Header Format"
>End Sub
>
>Private Sub Report_Activate()
>    Debug.Print "Report Activate"
>   
>End Sub
>
>Private Sub Report_Open(Cancel As Integer)
>    
>    Debug.Print "Report Open"
>    pintNoMembers = 0
>    psinMemDues = 0
>    pblnPrtFlag = False
>    pintNoPasses = 0
>    Me.Section(4).Visible = False                           ' Turn off page 
>footer visibilty
>    
>End Sub
>
>Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)
>    pintNoPasses = pintNoPasses + 1
>    Debug.Print vbCrLf & "Report Header Format", "          Pass # " & 
>pintNoPasses
>End Sub
>
>Private Sub ReportHeader_Print(Cancel As Integer, PrintCount As Integer)
>    Debug.Print "Page Header Print"
>End Sub


You are now mixing the visible approach (that has the last
page problem) with the Cancel approach so I can not get any
useful information from those tests.

You mentioned another thread where I tried to explain how to
get the report footer at the bottom of the page.  I'm pretty
sure that idea should work, whereas your requirements go
beyond the restrictions of messing with the page footer.
Let's start over and try that approach to see how it does.

-- 
Marsh
MVP [MS Access]
0
Marshall
2/5/2010 7:58:15 PM
"Steve" <notmyemail@address.com> schreef in bericht news:eQ8rGzppKHA.1552@TK2MSFTNGP04.phx.gbl...
> Hello Dennis,
>
> Do you launch the report with a command button? Have you considered creating the cover sheet/instructions in Word and formatting 
> it as needed? Then in your code in the click event of the button, start by opening Word and printing the cover sheet/instructions, 
> Close Word then print the Access report/
>

-- 
Get lost $teve.  Go away... far away....
No-one wants you here... no-one needs you here...

OP look at http://home.tiscali.nl/arracom/whoissteve.html
(Website has been updated and has a new 'look'...  we have passed 11.000 pageloads... it's a shame !!)

For those who don't 'agree' with this mail , because $teve was 'helping' with his post...
We warned him a thousand times...  Sad, but he is not willing to stop advertising...

He is just toying with these groups... advertising like hell... on and on... for years...
oh yes... and sometimes he answers questions... indeed...
and sometimes good souls here give him credit for that...

==> We are totally 'finished' with $teve now...
==> Killfile 'StopThisAdvertising' and you won't see these mails....

Arno R 


0
StopThisAdvertising
2/5/2010 8:07:17 PM
Marshall,

I'm sorry I did not explain things clearly.  Before I tried the combined 
approach, I did try putting 
  Cancel =  Not(Me.Page = Pages)
in the PageFooter Format event with the visibilty property set to true.  The 
only place in the code that altered that is the above line of code.

The problem with this approach is Access appears to reserved space for the 
footing on the first page.  This caused the last paragraph in the Report 
Heading to print at the top of the second page instead of the bottom of the 
first page.  The actual report then start of page 3.

The good news is the footing does not print on page 1 or page 2 but does 
print on page 3 as it should.

The bad news is last paragraph of the Report Heading is printed on page 2.  
Is there any way to prevent Access from allocating the page footer space on 
the pages where the footer is not printed.

I only tried the other approached because I was trying to resolve the 
problem without bothering you anymore.  I GREATLY appreciate your assitance 
and am trying very hard not to abuse that priviledge.

I will try to change the position where the Report Footing prints.

-- 
Dennis


"Marshall Barton" wrote:

> Dennis wrote:
> >Did you say launching one report for the instruction page and another for 
> >the report was complicated?  Trying to suppress the page footing without 
> >causing the print engine to reformat is also complicated.  The print preview 
> >and print engine apparently work differently.
> >
> >I have asked earlier if there was any anyway to force the Report Footing 
> >(not page footing) to print at  the bottom of the current page. 
> >
> >Your responded:  
> >
> >Not easily, but it can be done. Add a top level group (View - Sorting And 
> >Grouping) with footer using a constant expression such as =1 Don't add 
> >anything to this group 
> >footer. 
> >
> >Use code in this group footer's Format event to adjust its height to fill 
> >the page down to where you want the report footer to be. The code to position 
> >the report footer 9 inches from the top of the page would be something like: 
> >
> >Const FOOTERPOSITION As Long = 9 * TPI ' 9 inches 
> >
> >Private Sub GroupFooter0_Format(Cancel As Integer, FormatCount As Integer) 
> >If Me.Top < FOOTERPOSITION Then 
> >Me.Section(6).Height = FOOTERPOSITION - Me.Top 
> >End If 
> >End Sub 
> >
> >I have not experimented with scenarios when there is not enough room for the 
> >report footer on the same page as the last detail. 
> >
> >After reading below, I would ask which is the best option (I’m 3 days into 
> >trying to position the footing):
> >
> >1.  Keep working on the page footing
> >2.  Work on positioning the Report Footing
> >3.  Launch report from within this report to print government page and the 
> >let this report print the detail?
> >
> >
> >Response to your response:
> >
> >
> >Regarding your comment  “I was afraid that the last  page might get a 3 of 2 
> >kind of anomaly.  The problem is almost certainly that you have exactly the 
> >wrong number of details so that the last detail fits on the second page if 
> >there is no page footer, but moves to the next page when there is a page 
> >footer.”
> >
> >Response:  I don’t believe this is the issue yet as I have only 1 detail.
> >
> >I removed the code in the Page Header and putting  in the Page Footer Format 
> >and no footing appeared.
> >
> >Below is the different code I tried (one at a time) in Page Footer Format 
> >event, the results and a debug.print statement that I put in Page Footer 
> >Format.  The debug print statement is:
> >
> >“Debug.Print "Cancel =" & Cancel, "Page = " & Me.Page, "Pages = " & 
> >Me.Pages, "footing Vis = " & Me.Section(4).Visible:
> >
> >First try:
> [snip invalid tests]
> >The problem is in Print mode, turning on Footing appears to cause Access to 
> >reformat starting at page 1.  (Pass 2’s page is -= 1). 
> >
> >Here is the strip down code for the report:
> >
> >Option Compare Database
> >Option Explicit
> >
> >Dim pintNoMembers As Integer
> >Dim psinMemDues As Single
> >Dim pblnPrtFlag As Boolean
> >Dim pintNoPasses As Integer
> >
> >Const cpintDefNationalDues As Integer = 11
> >Const cpintDefDeptDues As Integer = 11
> >
> >
> >Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As 
> >Integer)
> >    txtPFNoMembers = pintNoMembers
> >    txtPFCheckAmt = pintNoMembers * psinMemDues
> >    If pblnPrtFlag Then
> >        If (Me.Page = Me.Pages) Then
> >            Me.Section(4).Visible = True
> >        End If
> >    Else
> >        If (Me.Page = (Me.Pages) - 1) Then
> >            Me.Section(4).Visible = True
> >        End If
> >    End If
> >    Debug.Print "Page Footer Format"
> >    Debug.Print "Cancel =" & Cancel, "Page = " & Me.Page, "Pages = " & 
> >Me.Pages, "footing Vis = " & Me.Section(4).Visible
> >End Sub
> >
> >Private Sub PageFooterSection_Print(Cancel As Integer, PrintCount As Integer)
> >    
> >    pblnPrtFlag = True
> >    pintNoPasses = 0
> >    Me.Section(4).Visible = False         ‘ reset to invisible for print pass
> >    Debug.Print "Page Footer Print", , "  Page Footer Visible = " & 
> >Me.Section(4).Visible
> >End Sub
> >
> >Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As 
> >Integer)
> >    Debug.Print "Page Header Format"
> >End Sub
> >
> >Private Sub Report_Activate()
> >    Debug.Print "Report Activate"
> >   
> >End Sub
> >
> >Private Sub Report_Open(Cancel As Integer)
> >    
> >    Debug.Print "Report Open"
> >    pintNoMembers = 0
> >    psinMemDues = 0
> >    pblnPrtFlag = False
> >    pintNoPasses = 0
> >    Me.Section(4).Visible = False                           ' Turn off page 
> >footer visibilty
> >    
> >End Sub
> >
> >Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)
> >    pintNoPasses = pintNoPasses + 1
> >    Debug.Print vbCrLf & "Report Header Format", "          Pass # " & 
> >pintNoPasses
> >End Sub
> >
> >Private Sub ReportHeader_Print(Cancel As Integer, PrintCount As Integer)
> >    Debug.Print "Page Header Print"
> >End Sub
> 
> 
> You are now mixing the visible approach (that has the last
> page problem) with the Cancel approach so I can not get any
> useful information from those tests.
> 
> You mentioned another thread where I tried to explain how to
> get the report footer at the bottom of the page.  I'm pretty
> sure that idea should work, whereas your requirements go
> beyond the restrictions of messing with the page footer.
> Let's start over and try that approach to see how it does.
> 
> -- 
> Marsh
> MVP [MS Access]
> .
> 
0
Utf
2/5/2010 10:19:01 PM
Marsh,

What value should TPI have?  TPI is not an Access or VBA variable.  I've 
search for Access & TPI on Google and could not find anything.  I also looked 
in Access 2007 VBA, Access Prog by Example, and Inside Access 2003 and there 
is no reference to TPI.  I know it something per inch, but don't know what.

Dennis


0
Utf
2/5/2010 10:39:01 PM
Marsh,

I think I found it   TPI  = 1440 twips = 1 inch

-- 
Dennis


"Dennis" wrote:

> Marsh,
> 
> What value should TPI have?  TPI is not an Access or VBA variable.  I've 
> search for Access & TPI on Google and could not find anything.  I also looked 
> in Access 2007 VBA, Access Prog by Example, and Inside Access 2003 and there 
> is no reference to TPI.  I know it something per inch, but don't know what.
> 
> Dennis
> 
> 
0
Utf
2/5/2010 11:13:02 PM
Dennis wrote:
>I think I found it   TPI  = 1440 twips = 1 inch


Right!  Sorry, my Copy/Paste missed the line:
	Const TPI As Long = 1440

Did you get a better result with this approach?

-- 
Marsh
MVP [MS Access]
0
Marshall
2/6/2010 2:39:01 PM
Dennis wrote:
>I'm sorry I did not explain things clearly.  Before I tried the combined 
>approach, I did try putting 
>  Cancel =  Not(Me.Page = Pages)
>in the PageFooter Format event with the visibilty property set to true.  The 
>only place in the code that altered that is the above line of code.
>
>The problem with this approach is Access appears to reserved space for the 
>footing on the first page.  This caused the last paragraph in the Report 
>Heading to print at the top of the second page instead of the bottom of the 
>first page.  The actual report then start of page 3.
>
>The good news is the footing does not print on page 1 or page 2 but does 
>print on page 3 as it should.
>
>The bad news is last paragraph of the Report Heading is printed on page 2.  
>Is there any way to prevent Access from allocating the page footer space on 
>the pages where the footer is not printed.


Right, as far as I can tell, the space for the page footer
is reserved right after the page header is done, so when we
tried to mess with it later we open the door to the page 3
of 2 kind of issue.

If worse comes to worse, you could try setting the page
footer visibility to No in the report header and making it
visible in the second page's page header, but that will
probably invite some other issue to the party.

-- 
Marsh
MVP [MS Access]
0
Marshall
2/6/2010 2:50:21 PM
Reply:

Similar Artilces:

Special Pasting a work book with many sheets and formulas
I have a workbook with many sheets that all have formulas and links to other data. I want to save the workbook as another name with all the worksheets keeping the values only (no links or formulas). Is there a quick way to do this for everysheet without having to special paste every sheet in the workbook. So can I save everysheets data values at workbook level. See this page for a code example http://www.rondebruin.nl/values.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "lex63" <lex63@discussions.microsoft.com> wrote in message news:ED708...

Reporting IRA distributions
I have an IRA account with corresponding cash account. I am trying to get the distribution from the IRA to show up as "Retirement Income" in the Tax-Related Transactions report. How to do it? The distributions are handled as a transfer from the IRA Investment cash acct to a checking account. Thanks for any help. Money 99, BTW. Do I need to upgrade to a later version? ...

Excel and some disappeared sheets
Anybody has the same or similar experiences : - I worked with excel file / closed as usually - new day opened and unfortunatelly some very important sheets disappeared / why ? Don=B4t know - I had about 7-9 sheets just now only 3 ones are there but not so important as another ones - the file has original size / I quickly looked into file by normal text editor only for reading and all relevant data are there, however if I open file by Excel, NO original sheets or data are there. - this file is VERY IMPORTANT for me - why happened ? Don=B4t know since I ask anybody for help Thanks in advan...

crm consultant needed asap
i am looking for a crm consultant who has a lot of experience with form customization, crm implimentation, heavy work flow, and activities. ideally someone in arizona but not required. telecommute will be considered for the right person. looking for someone for a possible 2 month (i am guessing here....) project. if you are available and have this experience please email me at j-e-f-f@mag-en-ta-tech.c-o-m (remove the -). we are looking for someone to start like next week at the latest (this message was posted 08-08-2004). This message was posted 8/4, not 8/8. And I have some swamp land in f...

Printing In Color
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) I am trying to print a document in word that is color but it is only coming out in black and white. How can I change the color settings on my printer? Word has no setting to print in color v. B/W -- that's a function of your printer & its driver software. The settings are available in the Print dialog in the Copies & Pages List, but exactly where the setting is located depends to a great extent on what printer you have. Some printers also have physical controls on the printer, itself, but that isn't common. ...

set print area #2
Where is the "set print area" button in Excel 2002 that was in Excel '97? =?Utf-8?B?Q2Fyb2wgTWM=?= wrote > Where is the "set print area" button in Excel 2002 that was in Excel '97? > Are you sure it was "standard"? Only way I could get in was to right-click the toolbar|Customise and drag it to the toolbar from Commands|File -- David ...

Exchange server crashed, please help....! Need to restore two priv.edb and pub.edb files into one....!
Hi Guys, I was wondering if I could get some help with the following problem we are having on our company. Here is the scenario; Our Windows NT 4.0 SP4a server running Exchange 5.5 SP4 crashed (Server 1) due to the exchange database reaching its 16 Gig's max limit. I went ahead and moved some mailboxes' e-mails to a few .pst files in order to make some space. This worked ok. Then, I decided to build another exchange server (Server 2) to moved some mailboxes and alleviate the load. Once the server was ready and configured as part of the current exchange site, I went ahead and move...

Report Can Grow not aligned horizontally
I have a report where I have 1 row of text, memo, number, and date fields. The memo field can contain up to 4-5 lines of wrapped text. I have set all teh rows to "can grow". However, on my report, the conditional formatting doesn't grow. For instance, the fill (which I have set to a gray color) in the memo field is about 3 lines deep when there is a lot of text in the memo field, but the text and number fields associated with that record are actually only 1 line. This essentially looks like a mess, small gray filled boxes for the text fields and a large gray ...

Why will my publisher 2003 not print graphics?
I have recently loaded windows 7, and since then I cannot print any graphics from any publisher document, text and infills print but lines do not! I have looked at the advance printer settings and the "Do not print any graphics" box is not ticked. I have also tried reloading publisher but this did nothing. Any ideas anyone? Might take a look at the web site of your printer model to see if there are Windows 7 drivers. Will the document print okay if you convert it to PDF? There are free converters around. www.primopdf.com is free. It is always wise to completely remove ...

Custom reports #3
Hi, I want to pull a report on how many customers I am getting every hour of the day. Does anyone out there know how to do that? I can try writing a query if someone can tell me which table I can find this information in (timestamp, transaction etc). Any help is appreciated. Regards JD This info is given at the end of the Z report. If you want to use it in a query open the Z report recipt file using the Notepad and see the fields that are used... Report.Hour.HourSales etc... Hope this helps... Carlos "JD" wrote: > Hi, > > I want to pull a report on how many cust...

How can I print on 8 1/2"x17" paper?
I have cut down an 11x17 paper to 8 1/2" x 17". I cannot figure out how to change the paper size to accept and print anything bigger than 14." any suggestions would be greatly appreciated First make the size settings in the Printer Setup. You may need to use the Custom selection. -- Don Vancouver, USA "mickilena" <mickilena@discussions.microsoft.com> wrote in message news:1AD99AFE-7FE7-4A07-9D20-1B1AFF9856BD@microsoft.com... >I have cut down an 11x17 paper to 8 1/2" x 17". I cannot figure out how to > change the paper size to accept a...

how can I do a lookup into another sheet?
how can I do a lookup into another sheet? thanks ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ Try something like =VLOOKUP(123,Sheet2!A1:B10,2,FALSE) -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "melawaisi" <melawaisi.ws67m@excelforum-nospam.com> wrote in message news:melawaisi.ws67m@excelforum-nospam.com... > > how can I do a lookup into another sheet? > thanks > > > ------...

how to run onhand value report
I get the message enter parameter when entering the zoom feature On Sat, 6 Mar 2010 17:36:01 -0800, junebugg <junebugg@discussions.microsoft.com> wrote: >I get the message enter parameter when entering the zoom feature You'll have to give us some more context than that, junebugg. What's the "onhand value report"? What's the "zoom feature"? You can see your database; we cannot! -- John W. Vinson [MVP] ...

I really need help with a formview problem
I have a formview that I place a toolbar onto. In my OnInitialUpdate(), after I create the toolbar, I say GetParentFrame()->RecalcLayout(); ResizeParentToFit(FALSE); ResizeParentToFit(TRUE); The formview is still not sized properly. It looks like the problem is the toolbar on the top of the formview. It is not being taken into account in sizing the formview. The difference at the bottom of the form that is not displayed is the size of the toolbar. Any suggestions? Should work if your toolbar was created (and docked) back in your CMainFrame::OnCreate() method. ----- William Gower ...

Print preview distorts objects
I have an XL2000 worksheet that has 4 controls on it (one command button, and 3 radio buttons). When I print preview the worksheet, once I close the print preview window the controls become distorted in size and location. Has anyone ever encountered anything like this? Thanks, Bill ...

Printing problem in booklet format
When I try to print my booklet document, on the screen it looks perfect, but when i go into print preview it only has half of each page on the paper. When i print, it comes out exactly like that. I have Publisher 2003 and run it on XP home. My printer is an Epson stylus Photo RX650. I contacted Epson and they say its a Publisher problem. Any suggestions. Driver? http://tech.epson.com.au/downloads/product.asp?sCategory=Multi_Functional&id=stylusphotorx650&FileType=1&EmailAdd=&MetricIDReturned=624915&platform=winxp Are you selecting booklet in page setup? Do you ...

problem opening up program/file
Hello, All. I am having some trouble opening up Word. It was working okay until I loaded some fonts to FontBook. Okay, now I removed all my fonts but I still get this error message about corrupt fonts I have on my computer. When I open Word, I see the blue starting-up window: Word:Mac 2004. Right underneath the product ID #, I see that it is initiating... when it gets to the point "Optimizing font menu performance" I start getting this error windows popping up one after another. (E.g. The font M TimesSmallText is corrupt and should be removed.) I keep on clicking okay for a whole lot...

Report: Cell #1, Cell #2, Cell #3, Cell #4
I am stuck again and would love som help :( I would like to repeat all words found inside ~25 cells, separated only by ", ", ignoring empty cells. Data: A1: [Apple ] A2: [Orange] A3: [Banana] A4: [Tomato] A5: [Syrup ] A6: [ ] A7: [ ] A8: [ ] The result should be something like: [Apple, Orange, Banana, Tomato, Syrup] -- JemyM ------------------------------------------------------------------------ JemyM's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=26945 View this thread: http://www.excelforum.com/showthread.php?thre...

Departments on Z Report
Hello, I have noticed that as I set up new departments and categories into the database, the new departments are always printed last...or below all of the other departments. Is there a way to change this, and possibly have them organized alphebetically or in an order I would like? Thank You, Vicne Perhaps if you modified the department table usinfg Microsoft Access 2003 .... not that I would advise that :-) Vince... is this you... my buddy? Since you don't use an email address... I'm never sure if it you... and then I worry I'm getting too personal with someone I don'...

Printing a newsletter on 11x17 not in full size
I am trying to print my 4 page newlsetter that is 8.5x11 on 11x17 so that it is a folded newsletter. It prints on the 11x17 but it keeps printing small with crop lines. It is in the right order but not full size. PLEASE HELP What version Publisher? Are you using Publisher 2007? Are you setting up your printer first for 11 x 17? File, page setup, booklet, select custom size 8.5 x 11, click advanced on the right, select booklet in the pull down type 8.5 width 11 height -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Tam Nee...

How do I assign a name to a PDF report via VBA
Thanks to the internet site: http://msdn.microsoft.com/en-us/library/ee336132.aspx I have the following subprocedure: Private Sub Print_to_PDF_Click() On Error Resume Next Dim reportName As String reportName = "HCBS CMgr Smmry Report" DoCmd.OpenReport reportName, _ View:=acPreview, WindowMode:=acHidden Set Reports(reportName).Printer = _ Application.Printers("CutePDF Printer") DoCmd.OpenReport reportName, _ View:=acViewNormal End Sub This appears to be a good start; however, it stops and waits for me to enter the n...

How can I count unique values in a query in the report footer 12-16-07
I have a report that gives me the count of the status of individuals . This works fine as long is there is only one record in the query (in my query there is one record per month). When I query 12 months (individuals may appear in various months) it counts each record of an individual. For Example in a query considering 12 months for a widow Jones it may count her 12 times and for a survivor named Smith may count her 8 times: Widows 12 Survivors 8 I would like to add a count in the report footer that will tell me how many unique individuals I have in the report (Example widows: Tot...

Add message to customers on printed invoice
We should be able to add a message to customers (holiday hours, holiday message, etc.) to an invoice. Even QuickBooks has this ability, why doesn't GP? -- Art Cabot Director, Information Technology Sizemore, Inc. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. ht...

PRINT PREVIEW #6
I REVIEW A PRINT PREVIEW AND AM OK WITH IT. I SAVE THE FILE AND WHEN I RETRIEVE THE FILE THE NEXT DAY THE PRINT PREVIEW HAS CHANGED. WHAT IS HAPPENING? -- RON What has changed? -- Bernard Liengme www.stfx.ca/people/bliengme remove CAPS in email address "RON" <RON@discussions.microsoft.com> wrote in message news:0D42919B-91FE-4B88-B932-EC5E947BB035@microsoft.com... >I REVIEW A PRINT PREVIEW AND AM OK WITH IT. I SAVE THE FILE AND WHEN I > RETRIEVE THE FILE THE NEXT DAY THE PRINT PREVIEW HAS CHANGED. WHAT IS > HAPPENING? > -- > RON ...

printing problems with memorized reports
We have recently been running into printing problems with our memorized reports. We will print preview a report and it will look fine on screen, then we will send to the printer, and the report print extremely small in the corner of the page. However if we go back in and re-print the report then it will print normal size on the page. We are not making any settings changes at all, and when it does this appears to just be at random. We are printing to an HP laserjet 4000 series printer that is on our network. We've used RMS with the same configuration for approx. 5 years now and ...