I have the same scenario as Mr. Costa. I have tried all the steps that you
gave him. I did not get the exact error messages, but entered all the
information anyway. I get the following error message:
If Me is a new macro or macro group, make sure you have saved it and that
you have typed its name correctly.
What does this mean? I do not know anything about macros, and really did
not understand the code that I typed in, but tried it anyway.
Is there no other way to get a page total? This seems like a lot of code
for what should be a standard task.
In case I typed it wrong, this is how my event procedure looks:
Option Compare Database
Private Sub GroupFooter14_Format(Cancel As Integer, FormatCount As Integer)
Option Explicit 'Optional, but recommended for every module.
Dim curTotal As Currency 'Variable to sum [Amount] over a Page.
End Sub
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
If PrintCount = 1 Then curTotal = curTotal + Nz(Me.Amount, 0)
End Sub
Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As
Integer)
curTotal = 0 'Reset the sum to zero each new Page.
End Sub
Pedro Costa said:
I have a report with about 50 pages, and what i'm trying to do is the sum in
every page of the report.
Detail Section
Field 1
Field 2
Field 3
Field 4 SubTotal (=[Field 1]+[Field 2]+[Field 3]+[Field 4])
Page Section
Sum of all SubTotals ???
No matter what i do or i get the #error message or the text box gets invisible
What am i doing wrong?
Thanks
PC