Microsoft KB Archive/167301

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

Article ID: 167301

Article Last Modified on 1/19/2007

-

APPLIES TO


 * Microsoft Access 97 Standard Edition

-



This article was previously published under Q167301



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.



Steps to Reproduce Behavior
 Start Microsoft Access and open the sample database Northwind.mdb. On the View menu, click Options. Note that the Project Name box on the Advanced tab contains Northwind.  Create a new module and type the following procedure: Function SaveError MsgBox "You will receive a save error" End Function  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.

<div class="references_section">