ACC2000: "Method or Data Member Not Found" Error Message (198650)
The information in this article applies to:
This article was previously published under Q198650 Advanced: Requires expert coding, interoperability, and multiuser skills.
SYMPTOMS
When you compile a module that has a procedure which tries to call another
procedure that is in a class module in another database, you may receive the following error message:
Method or Data Member not Found.
CAUSE
Class modules are private in scope to the Visual Basic project in the
database in which they are defined; therefore, procedures in class modules
cannot be referenced in another Visual Basic project.
RESOLUTION
Use one of the following two methods to work around this behavior.
Method 1
Store the procedure in a standard module rather than in a class module. This makes the procedure directly accessible from other databases but requires that you convert your class module procedures to standard module procedures.
Method 2
Create a function in a standard module in the database where the class
module is defined. This function calls the procedure from the class
module. Then, you call this function from a standard module of another database. This allows you to leave your class module procedures as
they are, but requires that you write a standard procedure for each class
module procedure that you want to run.
REFERENCESFor more information about creating references, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type references property in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
For more information about class modules, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type class modules in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
Modification Type: | Minor | Last Reviewed: | 7/16/2004 |
---|
Keywords: | kberrmsg kbprb kbProgramming KB198650 |
---|
|