Hello all,
I have created a report that uses 6 subreports. Each of the subreports contains 2 columns that I total at the end of the subreport. I used this code to find the totals:
If I open the subreport by itself, everything works fine, but once I open the big report, I get the error:
"Run-time error '2451':
The Report Name 'rptSubIPR' you enetered is misspelled or refers to a report that isn't open or doesn't exist."
-I am positive, however, that the report exists.
Any ideas?
I have created a report that uses 6 subreports. Each of the subreports contains 2 columns that I total at the end of the subreport. I used this code to find the totals:
Code:
Option Compare Database
Option Explicit
Public PageSum As Double
Public PageSum2 As Double
Private Sub Detail_Print(Cancel As Integer, FormatCount As Integer)
PageSum = PageSum + Reports![rptSubIPR]![MRC]
PageSum2 = PageSum2 + Reports![rptSubIPR]![CountOfPDC]
End Sub
Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)
' reset the counter for each new page
PageSum = 0
PageSum2 = 0
End Sub
If I open the subreport by itself, everything works fine, but once I open the big report, I get the error:
"Run-time error '2451':
The Report Name 'rptSubIPR' you enetered is misspelled or refers to a report that isn't open or doesn't exist."
-I am positive, however, that the report exists.
Any ideas?