Microsoft KB Archive/817411

= Error message when you run a procedure in Access: &quot;Ambiguous name detected&quot; =

Article ID: 817411

Article Last Modified on 4/3/2007

-

APPLIES TO


 * Microsoft Office Access 2007
 * Microsoft Office Access 2003
 * Microsoft Access 2002 Standard Edition
 * Microsoft Access 2000 Standard Edition

-



Moderate: Requires basic macro, coding, and interoperability skills.



For a Microsoft Access 97 version of this article, see 815284.



SYMPTOMS
When you run a procedure in Microsoft Access 2000 or later, you may receive the following error message:

The expression  you entered as the event property setting produced the following error: Ambiguous name detected:.



CAUSE
This error occurs when there are multiple procedures with the same name in a module.



WORKAROUND
To work around this problem, delete the unwanted duplicate procedure. To do this, follow these steps:  Open the form in Design view. In Microsoft Office Access 2003, click Code on the View menu.

In Microsoft Office Access 2007, click View Code in the Tools group on the Design tab. On the Debug menu, click Compile .

You receive the following error message:

Compile error: Ambiguous name detected:.

 Notice the procedure name, and then click OK. In the code, find the other occurrences of the  procedure, where   produced the compile error mentioned in step 3. Select and then delete the unwanted procedure.</li> On the Debug menu, click Compile .</li> On the File menu, click Close.</li></ol>

<div class="references_section">