G
Gregg Knapp
Using Microsoft Access 2003.
I'm attempting to write a custom function to strip out some
characters from a field, then total the leftover numbers.
The data in the field could look something like this -
AM20,WH2,LF13
I'd like to extract the numbers, and add them on a report.
I've used VB, but I seem to be having problems calling the
function.
For example -
I have the dataSource field in the Access Report setup
something like so...
=CodeTotal([CapacityCode])
I've written the function in a module like so -
Function CodeTotal(strCode As String) As String
*Do stuff*
CodeTotal = *RESULT*
End Function
However, when I run the report, it prompts me for input,
then processes what I've typed in, rather than the code
data from the field.
Am I doing this wrong?
Thanks for the assistance!
Gregg Knapp
gregg underscore knapp at hotmail dot com
I'm attempting to write a custom function to strip out some
characters from a field, then total the leftover numbers.
The data in the field could look something like this -
AM20,WH2,LF13
I'd like to extract the numbers, and add them on a report.
I've used VB, but I seem to be having problems calling the
function.
For example -
I have the dataSource field in the Access Report setup
something like so...
=CodeTotal([CapacityCode])
I've written the function in a module like so -
Function CodeTotal(strCode As String) As String
*Do stuff*
CodeTotal = *RESULT*
End Function
However, when I run the report, it prompts me for input,
then processes what I've typed in, rather than the code
data from the field.
Am I doing this wrong?
Thanks for the assistance!
Gregg Knapp
gregg underscore knapp at hotmail dot com