Sharing VB Classes with Other Databases

G

Guest

Hi -

I want to use VB classes, modules, tables located in database (DB2) in
another database (DB1).

Earlier and MVP (Alex Dybenko) suggested that I add a reference from DB1 to
DB2.

How is this done? Would someone walk me through this process?

I'm familiar with setting references to for objects such as DAO 3.6. (Tools,
References). Is this what is meant?

Is this done programatically or manually via Access?

Thanks,
Mark
 
G

Guest

Alex -

Thank you for the "spoon-feeding".

It's just what the doctor ordered!!!

Awesome.
 
G

Guest

Alex -

Upon further review...

I was able to set the reference to DB2 from DB1.

The Explorer window shows DB2 project and there it shows up under
"References" as a "Reference to DB2.mdb" in the DB1project also in the
Explorer window.

So that looks great. By all indications the reference is set.

However, when I go to dim a class or module they don't show up in DB1.

So:
dim obj as DB2.myclass
set obj = new DB2.myclass

It gives me a "User Defined type not defined" error.

FYI, I tried setting a reference to the Northwind - which was successful
(for the most part, it does act a bit strangely).

I'm using Accesse 2002.

Any suggestions?

Thanks again, Mark
 

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