G
Guest
I'm having a little trouble with the function below. When use it in a query,
the query only accesses the function once and returns the one value for all
of records. How do I get it to call the function for each record and return
a counter? BTW, I reset the static variable before I call the function.
Thanks,
Chris
Public Function OrderLineCounterA()
Static lngLineCounterA As Long
If lngLineCounterA < lngCounterStart Then lngLineCounterA =
lngCounterStart
lngLineCounterA = lngLineCounterA + 1
OrderLineCounterA = lngLineCounterA
End Function
the query only accesses the function once and returns the one value for all
of records. How do I get it to call the function for each record and return
a counter? BTW, I reset the static variable before I call the function.
Thanks,
Chris
Public Function OrderLineCounterA()
Static lngLineCounterA As Long
If lngLineCounterA < lngCounterStart Then lngLineCounterA =
lngCounterStart
lngLineCounterA = lngLineCounterA + 1
OrderLineCounterA = lngLineCounterA
End Function