Hello, im very new to using access and have been getting by with examples and trial and error so far but i cant figure this out.
I'm calculating the page total in the details section and I would like to have it shown in the header also.
The code for my report is:
"Option Explicit
Dim curTotal As Currency
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If PrintCount = 1 Then curTotal = curTotal + Me.rcrdAmount
End Sub
Private Sub PageFooterSection_Format(Cancel As Integer, FormatCount As Integer)
Me.pgTotal = curTotal
End Sub
Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)
curTotal = 0
End Sub"
I was trying to reference pgTotal as the source for an unbounded text box in the header but since the header prints first it prints the first pages total on the second pages header.
Is it possible to do what I'm trying to do?