J
JohnW
Hi,
I have 60 reports to which I need to add the same procedures. I got the
code below from an old forum post by Fred. It allows page updating to run in
sequence in a chain of reports. What I would like to do is write the same
procedures in the same events over and over in each report.
-----------
1. Now in each report, Dim a variable in the declarations section:
Option Compare Database
Option Explicit
Dim intLastPage as Integer
2. Code each report's Open event:
intLastPage = DLookUp("intPageNumber","tblPage")
3. Code each Report's Report Header Format event:
[Page] = [Page] + intLastPage
4. Code each Report's Report Footer Print event:
DoCmd.SetWarnings False
DoCmd.RunSQL "Update tblPage Set tblPage.intPageNumber = " & [Page] & ";"
Docmd.SetWarnings True
I have 60 reports to which I need to add the same procedures. I got the
code below from an old forum post by Fred. It allows page updating to run in
sequence in a chain of reports. What I would like to do is write the same
procedures in the same events over and over in each report.
-----------
1. Now in each report, Dim a variable in the declarations section:
Option Compare Database
Option Explicit
Dim intLastPage as Integer
2. Code each report's Open event:
intLastPage = DLookUp("intPageNumber","tblPage")
3. Code each Report's Report Header Format event:
[Page] = [Page] + intLastPage
4. Code each Report's Report Footer Print event:
DoCmd.SetWarnings False
DoCmd.RunSQL "Update tblPage Set tblPage.intPageNumber = " & [Page] & ";"
Docmd.SetWarnings True