Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

Symptoms

When you run code in an Access form or report, you may receive the following error message:
The expression <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.

↑ Back to the top


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().

↑ Back to the top


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.

↑ Back to the top


More information

Steps to Reproduce the Behavior

  1. Open the sample database Northwind.mdb.
  2. Open the Categories form in Design view.
  3. Add a text box named CurrentDate to the form.
  4. On the View menu, click Code.
  5. 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 "Symptoms" section of this article.

↑ Back to the top


Keywords: KB279124, kbprb, kbnofix, kberrmsg

↑ Back to the top

Article Info
Article ID : 279124
Revision : 2
Created on : 7/15/2004
Published on : 7/15/2004
Exists online : False
Views : 259