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

ID: Q167301


The information in this article applies to:

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


SYMPTOMS

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, follow these steps:

  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 that 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:


  4. 
    Function SaveError()
       MsgBox "You will receive a save error"
    End Function 
  5. 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."

Additional query words:


Keywords          : kberrmsg MdlGnrl 
Version           : WINDOWS:97
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: August 10, 1999