Hello,

I have got this formula, and it does calc the numbers, the issue is it never stops updating in the query. How can i get it to hardwire the numbers, and not have it constantly changing. I understand why it is changing as the one variable is constantly being updated.

Is there a better way of writing this?

Code:
Option Compare Database
Option Explicit
Public Growth As Double
Public Product As Integer
Public Function CalcGrowth(dblRet As Double, intProductID As Integer) As Double
If Product <> intProductID Then
    Product = intProductID
    Growth = 0
End If
Growth = (dblRet + 1) * IIf(Growth = 0, 100000, Growth)
CalcGrowth = Growth

End Function
What this formula does is take the previous growth, to multiply the (currentReturn+1). This allows the cummulative growth.

Thanks for your input.