ACC2000: Access Prompts You to Save Form After You Use the Code Builder (241811)



The information in this article applies to:

  • Microsoft Access 2000

This article was previously published under Q241811
Novice: Requires knowledge of the user interface on single-user computers.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).

SYMPTOMS

Access prompts you to save changes when you close a form or a report even though you did not make any design changes.

CAUSE

You used the Code builder to view the module of the form or the report. When you use the Code builder to view a form or a report module, the builder always marks the form as dirty even if you did not make any design changes. When you close the form or the report, Microsoft Access prompts you to save it.

RESOLUTION

To avoid the save prompt when you want to view a form or report module, do not use the Code builder. Instead, use one of the following methods to view the form or report module.

Method 1: Use the Code command on the View Menu

  1. Start Microsoft Access 2000.
  2. Open the sample database Northwind.mdb.
  3. Open the Employees form in Design view.
  4. On the View menu, click Code to view the module of the form.
  5. Browse to the procedure that you want to view.
  6. Close the Visual Basic Editor without making any changes, and then return to Microsoft Access.
  7. Close the Employees form without making any changes.
Note that Microsoft Access does not prompt you to save the form.

Method 2: View the Module from the Project Explorer in the Visual Basic Editor

  1. Start Microsoft Access 2000.
  2. Open the sample database Northwind.mdb.
  3. Open the Employees form in Design view.
  4. On the Tools menu, point to Macro, and then click Visual Basic Editor.
  5. On the View menu, click Project Explorer.
  6. In the Project Explorer, expand the Microsoft Access Class Objects folder under your database.
  7. Locate the form or report module that you want to view, and then double-click to open it.
  8. Browse to the procedure that you want to view.
  9. Close the Visual Basic Editor without making any changes, and then return to Microsoft Access.
  10. Close the Employees form without making any changes.
Note that Microsoft Access does not prompt you to save the form.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Repeat steps 1 through 3 of either method in the "Resolution" section earlier in this article.
  2. On the View menu, click Properties to display the property sheet.
  3. On the Edit menu, click Select Form.
  4. In the property sheet, click the Event tab.
  5. Click in the AfterUpdate property box. Note that it is set to [Event Procedure].
  6. Click the Build (...) button to the right of the property box. Note that this invokes the Visual Basic Editor and displays the code for the AfterUpdate event of the form.
  7. Close the Visual Basic Editor without making any changes, and then return to Microsoft Access.
  8. Close the Employees form without making any changes.
Note that Microsoft Access prompts you to save changes to the form even though you did not modify the design of the form.

Modification Type:MajorLast Reviewed:6/30/2004
Keywords:kbbug KB241811