getting a total from a vba calculation

P

Pat Wright

I have a report that calculates a total based on an item:

If [CountOfPurch] = 0 Then
prodpoints = -3

End If

If [CountOfPurch] = 1 Then
prodpoints = 0

End If

If [CountOfPurch] = 2 Then
prodpoints = 1

End If

If [CountOfPurch] > 2 And [CountOfPurch] < 5 Then
prodpoints = 2

End If

If [CountOfPurch] > 5 And [CountOfPurch] < 7 Then
prodpoints = 3

End If

If [CountOfPurch] > 7 And [CountOfPurch] < 9 Then
prodpoints = 4

End If

If [CountOfPurch] > 9 And [CountOfPurch] < 10 Then
prodpoints = 5

End If

If [CountOfPurch] > 11 Then
prodpoints = 7

End If
prodpoints1 = prodpoints

I need a total in the report footer, but the =sum
([prodpoints1]) doesn't work - how do you get a total in
a report footer based on a value calculated in vba?

thank you,

Pat Wright
 

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

Top