PRB: "Save Changes to Form" Prompt When No Changes MadeArticle ID: Q115876Creation Date: 06-JUN-1994 Revision Date: 19-SEP-1996
The information in this article applies to:
SYMPTOMS
Advanced: Requires expert coding, interoperability, and multiuser skills.
Each time you open a form in Form view and then close it, you are prompted
to save the changes to the form even if you have not made any changes to
the form.
CAUSE
The form contains an OLE Object, and the object frame's Locked property is
set to No.
RESOLUTION
To keep from being prompted to save your changes each time you close the
form, set the object frame's Enabled property to No and its Locked property
to Yes. Note that if you set both the Enabled and the Locked properties to
Yes, you will receive the following message when you close the form, and
any changes to the form will be discarded:
The object is locked and any changes made will be discarded when the form is closed.Workaround to Allow Editing The following example demonstrates how to keep from being prompted to save your changes each time you close the form, but still allow changes to be made to the form. CAUTION: Following the steps in this example will modify the sample database NWIND.MDB. You may want to back up the NWIND.MDB file, or perform these steps on a copy of the NWIND database.
To create this event procedure, click in the OnExit property field, then choose the Build button at the right side of the field. Select Code Builder, and then choose OK. Enter the code in the module, and then close the module. When you open the form, the graph will not be enabled. If you close the form, you will not be prompted to save your changes. However, if you choose the new command button, the graph will be enabled. When you select a different control on the form, the graph will be locked and the form will be saved. Note that if you choose the command button and then immediately close the form, you will be prompted to save your changes. This is due to the timing of the OnExit property.
STATUS This behavior no longer occurs in Microsoft Access for Windows 95 version 7.0.
MORE INFORMATION
Steps to Reproduce Behavior
|
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.