Expression - calculating running total

  • Thread starter Thread starter Ted Allen
  • Start date Start date
I made the corrections you indicated, except for the possible problems of using the integer data type for intTotalRet. I want to wait to see what kind of results I get once this runs.

Also, the TotRet field is set as percent format, so that's why I do need to have the value multipled by 100.

I'm still getting an error: "Run-time error '94: Invalid use of Null"

The debugger goes to the following line:

intTotalRet = intTotalRet * (1 + !TotRet)

Thanks for your help! I think we are getting very close.
 
Hi Kathy,

Is it possible that the TotRet field would be blank
(Null) for any of the records? If so, we would have to
modify the code line as follows (actually wouldn't hurt
to change it even if none are blank, just in case that
happens in the future):

intTotalRet = intTotalRet * (1 + Nz(!TotRet,0))

Post back with the full code if you get another error.

-Ted Allen
-----Original Message-----
I made the corrections you indicated, except for the
possible problems of using the integer data type for
intTotalRet. I want to wait to see what kind of results
I get once this runs.
Also, the TotRet field is set as percent format, so
that's why I do need to have the value multipled by 100.
 
Soory I have not responded, but I have not had the time to do an analysis of
your question and build a mockup of your data. Hopefully, you have found a
solution.
 
Back
Top