Error after Update to Access 2K3

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

Until today I was using MS Access 2000 for database managment. I switched
to Access 2003. Using some code I found in the knowledge base I used a
function for calculating a total of the detail section for each page. It is
as follows:

Option Compare Database
Option Explicit
Public PageSum As Double
Public PagePaid As Double

Private Sub Detail_Print(Cancel As Integer, FormatCount As Integer)
PageSum = PageSum + Reports![rep1500ELECTRONICb]![Cost] *
Reports!rep1500ELECTRONICb!Quantity
PagePaid = PagePaid + Reports!rep1500ELECTRONICb!TotalPaid
End Sub

Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As
Integer)
' reset the counter for each new page
PageSum = 0
PagePaid = 0

End Sub

Then the textboxes on my report reference PageSum and PagePaid

When I print the report I get a =Name? error in the fields.

If you could help me figure out what's wrong I would greatly appreciate it,
since the report I'm printing is vital for billing purposes.

Thanks.
 
Although I still don't understand why the old code no longer works, I did
some research and found a KB article that helped me out.
 
Back
Top