Douglas:
I tried that, and it worked. My local function executes "intVar =
FileName.ModName.fnX()". As a test, I then put a second action in the
AutoExec, this one a RunCode that directly calls the referenced function
(what I've been trying to do all along). On the assumption that the actions
are executed synchronously, and since the first action includes a call to the
referenced file, then when it comes time to run the second action, I'm
assuming the referenced file has to be fully loaded. When I start the
application with those in place I get the same
"...can't find the name..." error. Does this mean my syntax is incorrect? Or
it simply won't work this way?
I have hundreds of Access apps that need to have this code run on startup.
My hope is to go to each app, add a reference to my "shared" app, and add a
RunCode action to the AutoExec macro. If that doesn't work, and I need to
implement something like your Douglas', I would go to each app, add a
reference to my "shared" app, add a module (most apps won't have one), add a
function in this new module that calls the referenced app, and add a RunCode
action to the AutoExec macro to run the new local function. Definitely
doable, but more work, and if direct autoexec of a referenced function should
work, I'd rather get it to work. So... should I stop here and implement this,
or does anyone have any other ideas?
Thanks
Vern Rabe