View Full Version : how to call a public function? call in a query?


alienscript
09-04-2004, 06:13 AM
I got help with the Public Function below that will loop through a column of PartNumbers values and it strips the left characters out until it runs into one that isn't a zero.

I don't know how to call this Public Function in a Query ?
Would somebody be nice please show me how to do this (may be with steps) and thanks a lot.



Public Function StripZeros(strNum as String)
Do Until Left(strNum,1) < "0"
strNum = Right(strNum,Len(strNum)-1)
Loop

StripZeros = strNum
End Function

Rich
09-04-2004, 07:49 AM
Add another field to the grid, such as
NewField: StripZeros([OriginalField])