Trying to get counts in the bottom of each page of a report; cut and pasted from MS and lots of sites, but get requests for a parameter when the report opens.
I have of course a text box in the footer with " = txtpageSum ", and I get a request for this as the parameter value.
Some test code:
Option Compare Database
Dim txtpageSum As Integer
Private Sub PageFooterSection_Print(Cancel As Integer, PrintCount As Integer)
If PrintCount = 1 Then
' txtpageSum = txtpageSum + ExtendedPrice
' txtPageQuantity = txtPageQuantity + Quantity
txtpageSum = 22 'test; keeping it simple
End If
End Sub
Private Sub PageHeaderSection_Print(Cancel As Integer, _
PrintCount As Integer)
txtpageSum = 0
' txtPageQuantity = 0
End Sub