B
Bob Howard
I have need to pass a variable name (to a function) which is actually a
string-type argument (or possibly a variant-type argument) that itself
contains the *NAME* of the variable I'm really interested in.
My application has a series of global variables where, at times, I need
access to their values from either a query or within the recordsource in a
control on a form or report. I could implement a function for each global
variable (to return its value) --- but I would prefer to "generalize" this
and have a common function that is capable of returning the value of any of
these global variables.
An example might be my global variable named gblProcessRouter. I want to
implement a function to return the value of gblProcessRouter as I refer to
its value in a query. Within a calculated field in the query, I want to
execute a function specifying something like:
getVariableValue("gblProcessRouter")
to return the value of gblProcessRouter.
What do I substitute for the ???????? to accomplish this?
Function getVariableValue(Variable_Name as String)
getVariableValue = ????????
End Function
Thanks in advance!
Bob (@Martureo.Org)
string-type argument (or possibly a variant-type argument) that itself
contains the *NAME* of the variable I'm really interested in.
My application has a series of global variables where, at times, I need
access to their values from either a query or within the recordsource in a
control on a form or report. I could implement a function for each global
variable (to return its value) --- but I would prefer to "generalize" this
and have a common function that is capable of returning the value of any of
these global variables.
An example might be my global variable named gblProcessRouter. I want to
implement a function to return the value of gblProcessRouter as I refer to
its value in a query. Within a calculated field in the query, I want to
execute a function specifying something like:
getVariableValue("gblProcessRouter")
to return the value of gblProcessRouter.
What do I substitute for the ???????? to accomplish this?
Function getVariableValue(Variable_Name as String)
getVariableValue = ????????
End Function
Thanks in advance!
Bob (@Martureo.Org)