PRB: You Are Prompted to Save Form When Nothing Has Changed

    Article ID: Q121275
    Creation Date: 30-SEP-1994
    Revision Date: 19-SEP-1996

    The information in this article applies to:

    • Microsoft Access version 2.0

    SYMPTOMS

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

    After you open a form in Design view and review some of the procedures in the form module, you are prompted to save the form even though you have not made any changes to the form or the module.

    CAUSE

    This behavior occurs if you make a selection in the Object box on the form module's toolbar and the default procedure for that object does not exist. When the default procedure for an object does not exist, Microsoft Access must create the procedure, thereby "dirtying," or changing, the module, causing you to be prompted to save the changes.

    RESOLUTION

    If you want to avoid this behavior, press the F2 key when the form module is open to see a list of the existing procedures. Or, you can press the PAGE DOWN and PAGE UP keys to page through the existing procedures in the module.

    STATUS

    This behavior no longer occurs in Microsoft Access for Windows 95 version 7.0.

    MORE INFORMATION

    Steps to Reproduce Behavior

    1. Start Microsoft Access and open the sample database NWIND.MDB.
    2. Create a blank, new form.
    3. From the View menu, choose Code.
    4. In the Object box on the toolbar, select Form. In the Procedure box on the toolbar, select Click.
    5. Enter the following code in the module:

            Sub Form_Click ()
               Rem Testing
            End Sub
      
    6. Close the module, save the form as Form1, and then close the form.
    7. Open the Form1 form in Design view, and then chose Code from the View menu.
    8. In the Object box on the toolbar, select Form. In the Procedure box on the toolbar, select Click.
    9. Close the module and then close the form. Note that you are prompted to save the form even though you have not made any changes.


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.
©1997 Microsoft Corporation. All rights reserved. Legal Notices.

Additional reference words: 2.00
KBCategory: kbprg
KBSubcategory: MdlOthr