Report calculations

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

Guest

I have a report where I want to preform some calculations on and I was
wondering in what event procedure should I put the statement. I tried putting
it in the on open property and it gives an error saying invalid use of null.
Here is the statement:

'Calculate the total paid
If Not IsNull(DSum("[Amount]", "PaymentsReceived", "[MemberNumber] = " &
Me.Member_Number)) Then
myTotalPaid = DSum("[Amount]", "PaymentsReceived", "[MemberNumber] = " &
Me.Member_Number)
Else: myTotalPaid = 0
End If

If I put the code in the on page event, it doesn't insert the information
when I open the report unless I open it in design view and then open it in
the preview view
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top