Cannot run function from autoexec macro

  • Thread starter Thread starter Dorian
  • Start date Start date
D

Dorian

Access 2003.
I'm trying to run a function from an autoexec macro and am getting the
message 'access cannot find the function'.
I selected the function from the macros runcode ... prompt via the
expression builder!
Yes its a public function.
Any ideas?
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
Do you have two functions with the same name?
Does the function share the same name as a module?
 
Also, is the function in a stand-alone module, as opposed to a class module
(or a module associated with a form or report)?
 
No to both questions.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
I'm not sure what you mean, the function was created in a module that was
created with Modules--New. The type is 'Module'.
It's declared with:
Public Function ClaimsCheck() As Boolean
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
If I rename the function to begin with an X, it starts working.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
I would try these trouble-shooting steps:
1) open the debug window and test your function
Press Ctrl+G then
? ClaimsCheck()
2) try create a different function that is very simple and place it in your
Autoexec macro
 
If I rename the function to begin with an X, it starts working.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".

What is (now) the name of the function?
What is the name of the module?
 
That's what I was trying to say: that where the code is stored must have
been created as a Module, not a Class Module.

What did you name the module when you saved it?
 
That implies to me that you may have named the module ClaimsCheck.

As we've been trying to tell you, the name of the module cannot be the same
as the name of any function or sub within the module.
 
As we've been trying to tell you, the name of the module cannot be
the same as the name of any function or sub within the module.

....or of any public function or sub in any other standalone module.
 
Back
Top