ACC97: Error "The Save operation failed" When Saving a Module

Last reviewed: August 29, 1997
Article ID: Q167301
The information in this article applies to:
  • Microsoft Access 97

SYMPTOMS

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

When you try to save a Visual Basic for Applications module, you may receive the following error messages:

   The Save operation failed.

   Name conflicts with existing module, project or object library.

This article assumes that you are familiar with Visual Basic for Applications and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Visual Basic for Applications, please refer to the "Building Applications with Microsoft Access 97" manual.

CAUSE

You are trying to save a module with the same name as that of the Visual Basic project of the current database. By default, the name of the project and the name of the database are the same, but it is possible for them to differ.

RESOLUTION

Save the module under a different name from that of the Visual Basic project of the current database. To verify the name of the project:

  1. On the Tools menu, click Options.

  2. Click the Advanced tab in the Options dialog box.

  3. Check the name in the Project Name box to see if it is the same name as the module you are trying to save.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Start Microsoft Access and open the sample database Northwind.mdb.

  2. On the View menu, click Options. Note that the Project Name box on the Advanced tab contains Northwind.

  3. Create a new module and type the following procedure:

          Function SaveError()
    
             MsgBox "You will receive a save error"
          End Function
    
    

  4. Save the module as Northwind. Note that you receive the error messages. Save the module as Northwind1. Note that the module is saved without any errors.

REFERENCES

For more information about Visual Basic projects, search the Help Index for "projects, names."

Keywords          : kberrmsg MdlGnrl
Version           : 97
Platform          : WINDOWS
Hardware          : x86
Issue type        : kbprb
Solution Type     : Info_Provided


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: August 29, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.