Hi all...
I've a frustrating situation at the moment. I inherited an architecture that consisted of various access-based applications that used common functionality from modules located in another database. This common database was linked as a reference in the VBE. This is using AccXP.
What I attempted to do this week was to further encapsulate this functionality into a class that would group the most common functions but share data and methods that are otherwise repeated in different modules. That's irrelevant to the issue I've encountered, but that's what I was trying to do.
What I discovered, after finishing and testing the class within the database that housed it, was that an access database that references the other cannot directly reference the object, and on debug or compile, I get a UDT not found error.
What I need to discover is whether it is possible to expose a class to another database that has the first one referenced.
Example:
Oddly enough, the custom class will be available from the Intellisense picklist for a short while. The option will disappear, however, as soon as you try to run or debug it.
Blah.
In any case, if anyone finds a workaround or something that states categorically that this cannot be done, I would appreciate a reply.
I've a frustrating situation at the moment. I inherited an architecture that consisted of various access-based applications that used common functionality from modules located in another database. This common database was linked as a reference in the VBE. This is using AccXP.
What I attempted to do this week was to further encapsulate this functionality into a class that would group the most common functions but share data and methods that are otherwise repeated in different modules. That's irrelevant to the issue I've encountered, but that's what I was trying to do.
What I discovered, after finishing and testing the class within the database that housed it, was that an access database that references the other cannot directly reference the object, and on debug or compile, I get a UDT not found error.
What I need to discover is whether it is possible to expose a class to another database that has the first one referenced.
Example:
Code:
SourceDB.mdb
Class Module TestClass
Public Sub Testing
Msgbox "hi!"
End Sub
TargetDB.mdb
Module Testing
Reference set to SourceDB.mdb
Public Sub UseClass
Dim t as New TestClass
t.Testing
End Sub
Oddly enough, the custom class will be available from the Intellisense picklist for a short while. The option will disappear, however, as soon as you try to run or debug it.
Blah.
In any case, if anyone finds a workaround or something that states categorically that this cannot be done, I would appreciate a reply.