Consecutive Page Numbers

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.
 
S

SA

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.
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top