In an Access 97 database, I use serveral global variables that hold
information about the database, for example:
gstrFileServer - holds the server root where the database is stored
gstrDataServer - holds the server root where a related data warehouse
is stored
The values of these variables are set when the database is opened.
I want to retrieve one or more of these values in a query, but Access
does not recognize variables in a query. The alternative is to
include a function call in the query that returns the value of a
variable.
I want to write one function that accepts a string value identifying
the variable, then returns the value of the given variable.
Calling the function from the debug window might produce the
following:
? GetValue("gstrFileServer"):? GetValue("gstrDataServer")
\\FILE_001\VOL_0001
\\DATA_009\VOL_0002
What is the function that will extract the value from a given
variable?
Thanks in advance,
Gordon Rogers
MICO, Inc.