Mich,
I got your point, but this will not answer my query. Please see my
illustration below
Note: This is a continuos Form
1 ballpen 5.50
2 paper 1.00
3 bond paper 0.50
4 pencil 4.00
the number 1-4 is the running sum
Well, here is a poor solution you can play with:
Create the following function in a standard module:
Public Function myRunSum(strGarbage As String) As Integer
Static intSum As Integer
intSum = intSum + 1
myRunSum = intSum
End Function
Add the following field to the record source of your form:
myRunSum(somefieldnamegoeshere) as myRun
Bind myRun to a control.
Ok. So what's the deal with this solution? It is pretty crappy (as you
will see if you open and close your form several times). You need the
strGarbage parameter - otherwise Access is "smart" and will run your
function only once, not once for each row.
Try throwing an optional boolean parameter in the function like
"blReset". Then call the function w/ blReset = true during onload/
onopen or something like that. Change the function to reset when
blReset = true.
Well, that should give you enough to play with. Have fun!
-Kris