Class Library (1 Viewer)

BillP

Registered User.
Local time
Today, 05:12
Joined
Nov 22, 1999
Messages
13
I am taking a somewhat object oriented approach to an application I am building, and I have been very pleased with the results. However, I am having a problem setting up a class library. The application uses 3 databases and I developed the classes in one of them, but each of the databases will be creating objects from these classes, so I want a central class library. I am finding that even though I have set a reference to the library database, the application does not recognize objects created using these classes. Can anyone help?
 

rtg

Registered User.
Local time
Today, 05:12
Joined
Apr 18, 2000
Messages
12
Have you created modules that manipulate the Class modules. You have to setup a normal module in the same database as the Class module and let procedures in this module handle the classes.

The problem I found was that if the .mdb with the class modules is password protected then I couldn't access the .mdb.

Check:
1: The objects have public functions
2: Can you see the normal modules in the Object Browser
3: Check the functions in the library have different names to local ones. Access will use the local copy if the function names overlap.

If all else fails create a VB DLL and set all databases to reference this DLL.

Hope this helps.



[This message has been edited by rtg (edited 06-02-2000).]
 

BillP

Registered User.
Local time
Today, 05:12
Joined
Nov 22, 1999
Messages
13
Thanks for the advice. I did try using a normal module in the library, and it is being referenced by the other databases, so I can use the module to create function wrappers for my objects, but it would be much preferable to create the objects directly. It sounds like the VBA dll may be the only option.
 

Users who are viewing this thread

Top Bottom