Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 11th, 2007, 10:05 PM
Matthew Wells
Guest
 
Posts: n/a
Default mdb as reference problem...

I have an mdb with class modules that I use as a reference for another mdb.
The library is called MyLib.

I'm trying to declare variables in my front end mdb as class objects in the
library

Dim x as MyLib.ClassModuleName

This doesn't seem to work. When I type MyLib. and the intellisense pops up,
all I see are public functions and enums. I don't see any class module
names. How do I expose them?

Thanks.

Matthew Wells
Matthew.Wells@FirstByte.net




  #2  
Old July 11th, 2007, 10:45 PM
UrbanSpaceman
Guest
 
Posts: n/a
Default Re: mdb as reference problem...

The way I work around this issue is to provide a public function in the
library which returns a new instance of the object:

Public Function New_ClassModuleName () as ClassModuleName
Set New_ClassModuleName=new ClassModuleName
End Function

"Matthew Wells" <Matthew.Wells@FirstByte.netwrote in message
news:o9KdnXmku_962AjbnZ2dnUVZ_r2onZ2d@comcast.com. ..
Quote:
>I have an mdb with class modules that I use as a reference for another mdb.
>The library is called MyLib.
>
I'm trying to declare variables in my front end mdb as class objects in
the library
>
Dim x as MyLib.ClassModuleName
>
This doesn't seem to work. When I type MyLib. and the intellisense pops
up, all I see are public functions and enums. I don't see any class
module names. How do I expose them?
>
Thanks.
>
Matthew Wells
Matthew.Wells@FirstByte.net
>
>
>
>

  #3  
Old July 12th, 2007, 12:45 AM
Marshall Barton
Guest
 
Posts: n/a
Default Re: mdb as reference problem...

Matthew Wells wrote:
Quote:
>I have an mdb with class modules that I use as a reference for another mdb.
>The library is called MyLib.
>
>I'm trying to declare variables in my front end mdb as class objects in the
>library
>
>Dim x as MyLib.ClassModuleName
>
>This doesn't seem to work. When I type MyLib. and the intellisense pops up,
>all I see are public functions and enums. I don't see any class module
>names. How do I expose them?

Take a look at:
http://www.mvps.org/access/modules/mdl0034.htm

--
Marsh
  #4  
Old July 12th, 2007, 05:05 PM
Matthew Wells
Guest
 
Posts: n/a
Default Re: mdb as reference problem...

This works great - with a few notes.

You don't have to rename the old class and create a new one. You can just
delete the code and import the text file.

When you import the text file, these lines will appear at the top. Just
delete them (unless someone knows something I don't).

VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
End

Also, if you have any private classes that are used as parameters in the new
public class (paramaters and other stuff - you'll see in the error message),
you have to expose those classes as well.

But overall this is really GREAT!!

THANKS!!!




"Marshall Barton" <marshbarton@wowway.comwrote in message
news:nsqa93t4a9grqumssj0tqiudj58ebr76o9@4ax.com...
Quote:
Matthew Wells wrote:
>
Quote:
>>I have an mdb with class modules that I use as a reference for another
>>mdb.
>>The library is called MyLib.
>>
>>I'm trying to declare variables in my front end mdb as class objects in
>>the
>>library
>>
>>Dim x as MyLib.ClassModuleName
>>
>>This doesn't seem to work. When I type MyLib. and the intellisense pops
>>up,
>>all I see are public functions and enums. I don't see any class module
>>names. How do I expose them?
>
>
Take a look at:
http://www.mvps.org/access/modules/mdl0034.htm
>
--
Marsh

 

Bookmarks

Thread Tools

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles