Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / May 2006

Tip: Looking for answers? Try searching our database.

Sharing VB Classes with Other Databases

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mark - 23 May 2006 15:42 GMT
Hi -

I have two Access databases (DB1 and DB2).  DB2 has VB classes and tables
that I'd like to use in DB1.  How can I share Classes across databases?

I tried instantiating DB2 from DB1.

Dim accDB2 as Access.Application
set accDB2 = CreateObject("Access.Application")

accDB2.ApplicationOpenDatabase "C:\DB2.mdb", false

but when I instantiate the class (in DB2) an error occurs:

Dim cList as clsList
set cList = new clsList

Error => "User defined type not defined"

Any suggests?

Thank you, Mark
Alex Dybenko - 23 May 2006 15:54 GMT
Hi,
you can add a reference from DB1 to DB2 - then you can use classes and
modules of DB2 in DB1.

Signature

Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com

> Hi -
>
[quoted text clipped - 18 lines]
>
> Thank you, Mark
Mark - 23 May 2006 16:06 GMT
Thanks Alex.

Can youwalk me through the process of adding references?

I'm familiar with setting references to for objects such as DAO 3.6.  Is
this what you mean?

Is this done programatically or manually via Access?

> Hi,
> you can add a reference from DB1 to DB2 - then you can use classes and
[quoted text clipped - 22 lines]
> >
> > Thank you, Mark
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.