ACC2000: Same Named Module and Procedure Causes ErrorsID: Q210098
|
When you run a procedure from an object's events, you may receive the following error message:
If you use the RunCode action in a macro to call a function, you may receive the following error message:The expression [event name] you entered as the event property setting produced the following error: The expression you entered has a function name that Microsoft Access can't find.
If you try to run a procedure from the Immediate window, you may receive the following error message:The expression you entered has a function name that Microsoft Access can't find.
NOTE: All the modules in the database or project will appear to compile successfully.Compile Error:
Expected variable or procedure, not module.
A user-defined function or a subroutine have the same name as a module. These errors occur even if the procedure is not contained in the module with the same name.
Change the name of a procedure so that it is different from the name of any module that you have in the database or project.
Function Test()
MsgBox "Does this work correctly?"
End Function
Test
Additional query words: conversion name prb
Keywords : kberrmsg kbprg kbdta MdlGnrl
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: May 13, 1999