ACC97: "Ambiguous Name Detected" Error Message When Procedure Is Executed (815284)



The information in this article applies to:

  • Microsoft Access 97

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

For a Microsoft Access 2000 version of this article, see 817411.

SYMPTOMS

When you run a procedure, you may receive the following error message:

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

CAUSE

This behavior occurs when multiple procedures with the same name are in a module.

WORKAROUND

To work around this problem, you can delete the duplicate procedures. To do this, follow these steps:
  1. Open the form in Design view.
  2. On the View menu, click Code.
  3. On the Debug menu, click Compile Loaded Modules.

    You receive the following error message:

    Compile error:
    Ambiguous name detected: <Procedure Name>.
  4. Write down the <Procedure Name> and then click OK.
  5. Look through the code and find the other occurrences of the <Procedure Name>, where <Procedure Name> is the procedure that produced the compile error in step 3.
  6. Select and then delete the unwanted procedure.
  7. On the Debug menu, click Compile Loaded Modules.
  8. On the File menu, click Close.

REFERENCES

For additional information, click the following article numbers to view the articles in the Microsoft Knowledge Base:

163842 ACC: Compile Error After Converting Form Macros to VBA

171072 ACC97: No Error When AddFromFile Creates Duplicate Procedure


Modification Type:MajorLast Reviewed:9/26/2003
Keywords:kberrmsg kbprb KB815284 kbAudDeveloper