Edlueze wrote:
Thanks for the response. I use the CallByName routine to call a Sub
routine via a string that contains the name of the Sub routine. Is
there any way to call a Sub routine that is physically located in a
standard module (as opposed to a Form or Report) in this way (ie with a
string containing "Sub_Name")? Do the Form or Report class objects
somehow inherit the standard module routines?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
You can use the Eval() function:
strProcedure = "FunctionName()"
Eval(strProcedure)
The routine in the Eval() function has to be the name of a Function not
a Sub.
If you "know" the name of the procedure you want to run & where it is,
which it seems you do, why not use:
ModuleName.RoutineName
?? This was stated in my first response to you're original post.
E.g.:
intRound = Math.Round(dblPercentage,2)
Which calls the Round() function in the module Math and returns the
results into the intRound variable.
The Form/Reports do NOT inherit standard modules. There is no
inheritance in Access.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBQnaTlYechKqOuFEgEQIWvgCg5oEpVAnJXqzchsWDaJtnN2 XvlSQAoLOd
mbEBCJEIA/8OcnUZ7f3Cwe5c
=fc1l
-----END PGP SIGNATURE-----