From the Help file:
<quote>
The Me keyword behaves like an implicitly declared variable. It is
automatically available to every procedure in a class module. When a class
can have more than one instance, Me provides a way to refer to the specific
instance of the class where the code is executing. Using Me is particularly
useful for passing information about the currently executing instance of a
class to a procedure in another module. For example, suppose you have the
following procedure in a module:
Sub ChangeFormColor(FormName As Form)
FormName.BackColor = RGB(Rnd * 256, Rnd * 256, Rnd * 256)
End Sub
You can call this procedure and pass the current instance of the Form class
as an argument using the following statement:
ChangeFormColor Me
</quote>
In other words, in a form's module, it's a way of referring to the current
form. You could have used:
Forms!NameOfForm!PageSum = Forms!NameOfForm!RunSum - x
x = Forms!NameOfForm!RunSum
but if you'd had two copies of NameOfForm open, you'd have run into
problems.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> What does the Me! do?
>
[quoted text clipped - 5 lines]
> Thanks
> Jim
Jim in Spokane - 29 Jan 2007 19:24 GMT
Thanks! From what help file did you find that?
Jim
> From the Help file:
>
[quoted text clipped - 35 lines]
> > Thanks
> > Jim
Douglas J. Steele - 29 Jan 2007 20:03 GMT
Well, I pulled it from the Access 97 Help file, but I'd expect to find it in
other versions as well.
You might have to go into the VB Editor before you look for it, though: you
get different help in the two places.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> Thanks! From what help file did you find that?
>
[quoted text clipped - 45 lines]
>> > Thanks
>> > Jim
Jim in Spokane - 29 Jan 2007 19:43 GMT
I modified the code from http://support.microsoft.com/?kbid=296249
to sub-total a debit and credit column.
Wondering after reading your reply if this code is okay?
The values I see for the Credit column in Report View are correct, but when
it prints, there are different values. As I scroll through the pages front
to back and then back to front, the numbers change in Report View.
Any ideas?
Me!pagesum = Me!RunSum - x
Me!pagesumcr = Me!RunSumCR - y
x = Me!RunSum
y = Me!RunSumCR
> From the Help file:
>
[quoted text clipped - 35 lines]
> > Thanks
> > Jim
Douglas J. Steele - 29 Jan 2007 20:06 GMT
Did you remember to declare y as a Double, and to set y = 0 in the
ReportHeader_Print event?

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
>I modified the code from http://support.microsoft.com/?kbid=296249
> to sub-total a debit and credit column.
[quoted text clipped - 58 lines]
>> > Thanks
>> > Jim
Jim in Spokane - 29 Jan 2007 20:21 GMT
When I took the Me! off the second column add for CR, got stable numbers.
Dim x As Double
Dim y As Double
Private Sub PageFooterSection_Print(Cancel As Integer, PrintCount As Integer)
Me!pagesum = Me!RunSum - x
pagesumcr = RunSumCR - y
x = Me!RunSum
y = RunSumCR
End Sub
Private Sub ReportHeader_Print(Cancel As Integer, PrintCount As Integer)
x = 0
y = 0
End Sub
> Did you remember to declare y as a Double, and to set y = 0 in the
> ReportHeader_Print event?
[quoted text clipped - 61 lines]
> >> > Thanks
> >> > Jim
Jim in Spokane - 29 Jan 2007 20:24 GMT
Actually, I think it was the missing y=0 that caused the problem.
This works too.
Private Sub PageFooterSection_Print(Cancel As Integer, PrintCount As Integer)
Me!pagesum = Me!RunSum - x
Me!pagesumcr = Me!RunSumCR - y
x = Me!RunSum
y = Me!RunSumCR
End Sub
Thanks!
> Did you remember to declare y as a Double, and to set y = 0 in the
> ReportHeader_Print event?
[quoted text clipped - 61 lines]
> >> > Thanks
> >> > Jim
Jim in Spokane - 29 Jan 2007 21:11 GMT
Tested this on another database and had to remove the Me! from the credit
column to get stable numbers.
Dim x As Double
Dim y As Double
Private Sub PageFooterSection_Print(Cancel As Integer, PrintCount As Integer)
Me!pagesum = Me!RunSum - x
pagesumcr = RunSumCR - y
x = Me!RunSum
y = RunSumCR
End Sub
Private Sub ReportHeader_Print(Cancel As Integer, PrintCount As Integer)
x = 0
y = 0
End Sub
> Actually, I think it was the missing y=0 that caused the problem.
>
[quoted text clipped - 73 lines]
> > >> > Thanks
> > >> > Jim