Consecutive Page Numbers

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

On 7/16/2005 there was a post regarding consecutive page numbers across
several reports. I attempted to follow the advice given and now my reports
won't open at all except in design mode. An example of the what I did:

Option Compare Database
Option Explicit
Dim intLastPage As Integer

Private Sub Report_Open(Cancel As Integer)

intLastPage = DLookup("intPageNumber", "pagenumber")

End Sub

Private Sub ReportFooter_Print(Cancel As Integer, PrintCount As Integer)

DoCmd.SetWarnings False
DoCmd.RunSQL "Update pagenumber Set pagenumber.intPageNumber = " &
[page] & ";"
DoCmd.SetWarnings True

End Sub

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

[page] = [page] + intLastPage

End Sub

If someone would look at the previous post and help me out that would be
great. FYI, "pagenumber" is my table.
 
Margaret:

There's a file in the Free files area of our web called "Other Reports"
which can show you one method to consecutively number the pages of multiple
reports.
 
Thank you. I've downloaded the reports and will attempt to do it this way.
It looks much easier.

SA said:
Margaret:

There's a file in the Free files area of our web called "Other Reports"
which can show you one method to consecutively number the pages of multiple
reports.
--
Steve Arbaugh
ACG Soft
http://ourworld.compuserve.com/homepages/attac-cg

margaret said:
On 7/16/2005 there was a post regarding consecutive page numbers across
several reports. I attempted to follow the advice given and now my
reports
won't open at all except in design mode. An example of the what I did:

Option Compare Database
Option Explicit
Dim intLastPage As Integer

Private Sub Report_Open(Cancel As Integer)

intLastPage = DLookup("intPageNumber", "pagenumber")

End Sub

Private Sub ReportFooter_Print(Cancel As Integer, PrintCount As Integer)

DoCmd.SetWarnings False
DoCmd.RunSQL "Update pagenumber Set pagenumber.intPageNumber = " &
[page] & ";"
DoCmd.SetWarnings True

End Sub

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

[page] = [page] + intLastPage

End Sub

If someone would look at the previous post and help me out that would be
great. FYI, "pagenumber" is my table.
 
Back
Top