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 / February 2005

Tip: Looking for answers? Try searching our database.

modules in a library DB reference an instance defined in main DB

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
catmort - 16 Feb 2005 16:23 GMT
Modules in a library database should be able to reference an instance of a
class that is defined in the main database
Paul Overway - 16 Feb 2005 16:27 GMT
There is a trick to making classes in library MDEs available in the main
database.  See:

http://www.mvps.org/access/modules/mdl0034.htm

Signature

Paul Overway
Logico Solutions
http://www.logico-solutions.com

> Modules in a library database should be able to reference an instance of a
> class that is defined in the main database
catmort - 16 Feb 2005 16:37 GMT
Yes I know that trick, but once you have instanced the class in the main
database and then need to use its return values in the library database e.g.
for a form, you can't do this can you?

> There is a trick to making classes in library MDEs available in the main
> database.  See:
[quoted text clipped - 3 lines]
> > Modules in a library database should be able to reference an instance of a
> > class that is defined in the main database
Paul Overway - 16 Feb 2005 17:18 GMT
No.  In that case, you would need to pass your instance of that class to
whatever routine requires it.  But that would apply in any case, i.e., even
within the main database you couldn't instantiate an object and then use
that object within another routine, unless the object was declared globally.

I haven't tested it, but if the object is declared globally in the main DB,
it might be accessible within the library DB.  Nevertheless, passing a
reference to the object would be better in practice.

Signature

Paul Overway
Logico Solutions
http://www.logico-solutions.com

> Yes I know that trick, but once you have instanced the class in the main
> database and then need to use its return values in the library database
[quoted text clipped - 9 lines]
>> > of a
>> > class that is defined in the main database
 
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.