Expression - calculating running total

G

Guest

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.
 
T

Ted Allen

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.
 
J

John Spencer (MVP)

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.
 

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