Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / February 2007

Tip: Looking for answers? Try searching our database.

Report's page footers - again, next trick

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Larry Kahm - 24 Feb 2007 18:39 GMT
OK, I've resolved that the problem I was facing the other day was in the
report's page footer section - not the report footer section.  Now it has
gotten even more complicated.

If there is more than one page of the report, I need to show >some<
information on the first page and >other< information on the final page.

On the first page, I need to include a list of cities - they must not appear
on any following page.
On the last page, I need to include a signature block - this must not appear
on any previous page.

I am totally stumped!  I've tried logic in the page footer format event -
counting current page and total pages - and can't seem to find the right
mix.

Any help is greatly appreciated.

Thanks!

Larry
Douglas J. Steele - 24 Feb 2007 19:06 GMT
Try the Report header and footer (as opposed to the Page header or footer)

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

> OK, I've resolved that the problem I was facing the other day was in the
> report's page footer section - not the report footer section.  Now it has
[quoted text clipped - 17 lines]
>
> Larry
Larry Kahm - 25 Feb 2007 14:24 GMT
Thanks, but that path lead to a horror show in Preview mode.

Here's what I eventually came up with - and it seems to work.  If anyone can
punch holes in it, please post a note.

In the Format event of the Page Footer section

intP = Me!txtPage
intS = Me!txtPages
If FormatCount >= 1 Then
   intT = intP+intS
   Select Case intT
       Case 4
           ' print signatures
           ' hide city
       Case 3
           ' hide signatures
           ' print city
       Case Else
           ' print signatures
           ' print city
     End Select
End if

Larry

> Try the Report header and footer (as opposed to the Page header or footer)
>
[quoted text clipped - 19 lines]
>>
>> Larry
Ken Sheridan - 25 Feb 2007 19:09 GMT
Larry:

You are testing for the FormatCount property being >= 1, which will always
evaluate to True.  I suspect you might be misunderstanding the way the
FormatCount property works.  It returns the number of times the section's
OnFormat event property has been evaluated for the current section.  It is
reset to 1 when the next section is formatted.  The number of iterations
through the report, which might be what you have in mind here, is not
relevant.  To determine that you can set a value of a module level variable
in the report footer's Format event procedure so that the variable only has
that value on the second iteration through the report.

In your case as you are assigning values to the two variables locally in the
event procedure it looks to me like you can forget about the FormatCount
property completely as the values are not going to change however many times
the section is formatted.

Going back to your original post:

If Pages = 1 Then
   ' one page report so
   ' show both signature and city
Else
   ' multi page report so
   If Page = 1 Then
       ' first page so show the city and hide the signature
Else
   If Page = Pages
     ' last page so show signature and hide city
   Else
      ' intervening pages
      ' what do you do here?  Hide both?
   End If
End If

Ken Sheridan
Stafford, England

> Thanks, but that path lead to a horror show in Preview mode.
>
[quoted text clipped - 45 lines]
> >>
> >> Larry
Larry Kahm - 26 Feb 2007 00:16 GMT
Ken,

I am going to try that suggestion later tonight.  If it works - as I suspect
it will - then I'll clean up the code.

Thanks!

Larry

> Larry:
>
[quoted text clipped - 94 lines]
>> >>
>> >> Larry
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.