PC Review


Reply
Thread Tools Rate Thread

Cannot run function from autoexec macro

 
 
Dorian
Guest
Posts: n/a
 
      31st Dec 2009
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".
 
Reply With Quote
 
 
 
 
Duane Hookom
Guest
Posts: n/a
 
      31st Dec 2009
Do you have two functions with the same name?
Does the function share the same name as a module?

--
Duane Hookom
Microsoft Access MVP


"Dorian" wrote:

> 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".

 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      31st Dec 2009
Also, is the function in a stand-alone module, as opposed to a class module
(or a module associated with a form or report)?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Duane Hookom" <duanehookom@NO_SPAMhotmail.com> wrote in message
news:2AD3CD2C-E17F-4272-8120-(E-Mail Removed)...
> Do you have two functions with the same name?
> Does the function share the same name as a module?
>
> --
> Duane Hookom
> Microsoft Access MVP
>
>
> "Dorian" wrote:
>
>> 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".



 
Reply With Quote
 
Dorian
Guest
Posts: n/a
 
      31st Dec 2009
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".


"Duane Hookom" wrote:

> Do you have two functions with the same name?
> Does the function share the same name as a module?
>
> --
> Duane Hookom
> Microsoft Access MVP
>
>
> "Dorian" wrote:
>
> > 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".

 
Reply With Quote
 
Dorian
Guest
Posts: n/a
 
      31st Dec 2009
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".


"Douglas J. Steele" wrote:

> Also, is the function in a stand-alone module, as opposed to a class module
> (or a module associated with a form or report)?
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
>
>
> "Duane Hookom" <duanehookom@NO_SPAMhotmail.com> wrote in message
> news:2AD3CD2C-E17F-4272-8120-(E-Mail Removed)...
> > Do you have two functions with the same name?
> > Does the function share the same name as a module?
> >
> > --
> > Duane Hookom
> > Microsoft Access MVP
> >
> >
> > "Dorian" wrote:
> >
> >> 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".

>
>
> .
>

 
Reply With Quote
 
Dorian
Guest
Posts: n/a
 
      31st Dec 2009
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".


"Douglas J. Steele" wrote:

> Also, is the function in a stand-alone module, as opposed to a class module
> (or a module associated with a form or report)?
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
>
>
> "Duane Hookom" <duanehookom@NO_SPAMhotmail.com> wrote in message
> news:2AD3CD2C-E17F-4272-8120-(E-Mail Removed)...
> > Do you have two functions with the same name?
> > Does the function share the same name as a module?
> >
> > --
> > Duane Hookom
> > Microsoft Access MVP
> >
> >
> > "Dorian" wrote:
> >
> >> 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".

>
>
> .
>

 
Reply With Quote
 
Duane Hookom
Guest
Posts: n/a
 
      31st Dec 2009
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

--
Duane Hookom
Microsoft Access MVP


"Dorian" wrote:

> 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".
>
>
> "Douglas J. Steele" wrote:
>
> > Also, is the function in a stand-alone module, as opposed to a class module
> > (or a module associated with a form or report)?
> >
> > --
> > Doug Steele, Microsoft Access MVP
> > http://I.Am/DougSteele
> > (no private e-mails, please)
> >
> >
> > "Duane Hookom" <duanehookom@NO_SPAMhotmail.com> wrote in message
> > news:2AD3CD2C-E17F-4272-8120-(E-Mail Removed)...
> > > Do you have two functions with the same name?
> > > Does the function share the same name as a module?
> > >
> > > --
> > > Duane Hookom
> > > Microsoft Access MVP
> > >
> > >
> > > "Dorian" wrote:
> > >
> > >> 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".

> >
> >
> > .
> >

 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      31st Dec 2009
On Thu, 31 Dec 2009 14:21:01 -0800, Dorian <(E-Mail Removed)>
wrote:

>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?

--

John W. Vinson [MVP]
 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      1st Jan 2010
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?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Dorian" <(E-Mail Removed)> wrote in message
news:974897FE-5192-495D-BE4D-(E-Mail Removed)...
> 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".
>
>
> "Douglas J. Steele" wrote:
>
>> Also, is the function in a stand-alone module, as opposed to a class
>> module
>> (or a module associated with a form or report)?
>>
>> --
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no private e-mails, please)
>>
>>
>> "Duane Hookom" <duanehookom@NO_SPAMhotmail.com> wrote in message
>> news:2AD3CD2C-E17F-4272-8120-(E-Mail Removed)...
>> > Do you have two functions with the same name?
>> > Does the function share the same name as a module?
>> >
>> > --
>> > Duane Hookom
>> > Microsoft Access MVP
>> >
>> >
>> > "Dorian" wrote:
>> >
>> >> 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".

>>
>>
>> .
>>


 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      1st Jan 2010
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.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"Dorian" <(E-Mail Removed)> wrote in message
news:33620508-DE80-45D2-A6FF-(E-Mail Removed)...
> 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".
>
>
> "Douglas J. Steele" wrote:
>
>> Also, is the function in a stand-alone module, as opposed to a class
>> module
>> (or a module associated with a form or report)?
>>
>> --
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no private e-mails, please)
>>
>>
>> "Duane Hookom" <duanehookom@NO_SPAMhotmail.com> wrote in message
>> news:2AD3CD2C-E17F-4272-8120-(E-Mail Removed)...
>> > Do you have two functions with the same name?
>> > Does the function share the same name as a module?
>> >
>> > --
>> > Duane Hookom
>> > Microsoft Access MVP
>> >
>> >
>> > "Dorian" wrote:
>> >
>> >> 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".

>>
>>
>> .
>>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
AutoExec Macro PMBO Microsoft Word Document Management 1 29th Aug 2009 03:06 PM
Autoexec but not a macro ?? =?Utf-8?B?bXNjZXJ0aWZpZWQ=?= Microsoft Access Getting Started 3 25th Jun 2007 12:52 PM
autoexec macro =?Utf-8?B?VGFueWE=?= Microsoft Access Macros 4 10th Apr 2007 05:04 AM
AutoExec macro runing VBA function =?Utf-8?B?S2VudEFF?= Microsoft Access VBA Modules 1 17th Feb 2006 06:53 AM
How do I set up a AutoExec macro =?Utf-8?B?QnJldHQgU2VuaW9y?= Microsoft Access Forms 1 13th Feb 2006 08:31 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:30 PM.