Connecting Tech Pros Worldwide Help | Site Map

mdb as reference problem...

  #1  
Old July 11th, 2007, 10:05 PM
Matthew Wells
Guest
 
Posts: n/a
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

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

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

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

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
ACCESS97, try to relink reference to another MDB lesperancer@natpro.com answers 12 April 4th, 2006 11:15 AM
A2KReportSpecs.mde as reference in XP runtime Bob Darlington answers 7 November 13th, 2005 01:16 PM
ADP vs. MDB: Speed Neil answers 60 November 13th, 2005 10:11 AM
Problem on incorporting code from the Access 2000 Developer's Handbook Uttam answers 6 November 12th, 2005 02:24 PM