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