The object doesn't contain the Automation object... 
Author Message
 The object doesn't contain the Automation object...

I am trying to write a Public Function which I can call
from several forms in my application.

In testing, the code works when I apply it to the On_Focus
private event of a textbox control on a form, but it fails
when I try to run it as a Public Function.

I copied the exact code from the private function to a
Module.  The code will not even start to run.  The error
message is:

The object doesn't contain the Automation
object 'Groupmember' (That's the name of the Module)

You tried to run a Visual Basic procedure to set a
property or method for an object.  However, the component
doesn't make the property or method available for
Automation operations.

What am I overlooking?  Access 2000

Craig Darville



Fri, 04 Mar 2005 21:25:33 GMT  
 The object doesn't contain the Automation object...
Are you passing the control's name to the function?  Are
you referencing the control correctly for the function to
be able to 'find' it?  The public function needs to know
where to look for the control that the function is trying
to change/affect.
--
HTH
Tim Hansen

=========================

Quote:
>-----Original Message-----
>I am trying to write a Public Function which I can call
>from several forms in my application.

>In testing, the code works when I apply it to the
On_Focus
>private event of a textbox control on a form, but it
fails
>when I try to run it as a Public Function.

>I copied the exact code from the private function to a
>Module.  The code will not even start to run.  The error
>message is:

>The object doesn't contain the Automation
>object 'Groupmember' (That's the name of the Module)

>You tried to run a Visual Basic procedure to set a
>property or method for an object.  However, the component
>doesn't make the property or method available for
>Automation operations.

>What am I overlooking?  Access 2000

>Craig Darville
>.



Sat, 05 Mar 2005 00:24:01 GMT  
 The object doesn't contain the Automation object...
You didn't by any chance give your function and your module the same
name, did you?

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)



Quote:
> I am trying to write a Public Function which I can call
> from several forms in my application.

> In testing, the code works when I apply it to the On_Focus
> private event of a textbox control on a form, but it fails
> when I try to run it as a Public Function.

> I copied the exact code from the private function to a
> Module.  The code will not even start to run.  The error
> message is:

> The object doesn't contain the Automation
> object 'Groupmember' (That's the name of the Module)

> You tried to run a Visual Basic procedure to set a
> property or method for an object.  However, the component
> doesn't make the property or method available for
> Automation operations.

> What am I overlooking?  Access 2000

> Craig Darville



Sat, 05 Mar 2005 11:25:55 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. VBScript doesn't see C# object as object

2. class doesn't support automation or doesn't support expected interface

3. Objects that contain other Objects

4. Severe Problem with objects containing Collections both in Scripting.Dictionary and VB 5.0 object

5. Collection object as parent of its contained objects?

6. Collection object as parent of its contained objects?

7. Collection object as parent of its contained objects?

8. Can't add class to ASP.NET project - Automation server can't create object

9. Object doesn't support this property or method : 'DTSGlobalVariables(...).Value.Open

10. Advanced : Excel doesn't close when i release it's object

11. QueryDef Object doesn't fail

12. CreateObject doesn't create Outlook Object

 

 
Powered by phpBB® Forum Software