Microsoft KB Archive/279124

= ACC2000: Error Message: Member Already Exists in an Object Module from Which This Object Module Derives =

Article ID: 279124

Article Last Modified on 7/15/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q279124



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

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).



SYMPTOMS
When you run code in an Access form or report, you may receive the following error message:

The expression you entered as the event property setting produced the following error: Member already exists in an object module from which this object module derives.

The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].

There may have been an error evaluating the function, event, or macro.



CAUSE
A Sub procedure and an object in your form or report have the same name. For example, you may have a form with a text box named CategoryID and also have a Sub procedure in the Visual Basic for Applications module of that form named CategoryID.



RESOLUTION
Search through the code module of the form or the report to see if any Sub procedure has the same name as an object on the form or report. If so, rename the Sub procedure or rename the object.



Steps to Reproduce the Behavior
 Open the sample database Northwind.mdb. Open the Categories form in Design view. Add a text box named CurrentDate to the form. On the View menu, click Code.  Type or paste the following code into the module: Private Sub Form_Current Me.CurrentDate = CategoryID End Sub

Function CategoryID CategoryID = DateValue(Now) End Function Close the module and view the form in Form view.

Note that you receive the error message that is mentioned in the &quot;Symptoms&quot; section of this article. </li></ol>

Additional query words: OFF2000 prb

Keywords: kberrmsg kbnofix kbprb KB279124

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.