You receive a "Compile error" error message when you run a function or a procedure in Access 2002 (312851)
The information in this article applies to:
This article was previously published under Q312851 Moderate: Requires basic macro, coding, and interoperability skills.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
For a Microsoft Access 2000 version of this article, see 210098.
SYMPTOMS
When you run a procedure or a function, you may receive one of the following error messages:
Compile error:
Expected variable or procedure, not module.
Microsoft Access can't find the name 'ProcedureName' you entered in the expression.
The expression you entered has a function name that Microsoft Access can't find.
All the modules in the database or the project compile successfully.
CAUSE
These errors can occur if a user-defined function or a subroutine has the same name as a module.
RESOLUTION
To resolve these errors, change the name of the module so that the name is different from the name of any procedure or function that you have in the database or project.
Modification Type: | Minor | Last Reviewed: | 8/13/2004 |
---|
Keywords: | kberrmsg kbprb KB312851 |
---|
|