Can a database expose a class?

  • Thread starter Francesc Hervada-Sala
  • Start date
F

Francesc Hervada-Sala

Hello NG,

I have developed a class module with Access 2000, say myClass. Is it
possible for my database to expose myClass, so that other databases can
use it?

For example I would like to use Dim a As New myClass at other databases
(without copying the class source code into these databases).

In other words, I would like to use myClass like any other public
available class (such as DAO).

Thank you,

Francesc
 
B

Brian Camire

In the other database(s), add a reference (via Tools, References) to the MDB
(or MDE) file that contains the class you want to use.
 
D

david epsom dot com dot au

There was a workaround to expose classes (do a google
search of the Access newsgroups to try to find more
information), but it is less useful than you might think,
because the class still runs in the context of the library
database - that it, it doesn't see any of the tables and
data of the calling code.

You can of course pass an instance of the current
Application to each object as you instantiate it, but I've
never seen an example of anyone who thought it was
worth the trouble.

(david)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top