ACC2000: No Prompt to Save Module When Visual Basic Editor Closes

ID: Q225873


The information in this article applies to:
  • Microsoft Access 2000

Novice: Requires knowledge of the user interface on single-user computers.

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


SYMPTOMS

When you make changes to a module and then close the Visual Basic Editor, or you close the Module window but leave the Visual Basic Editor open, you are not prompted to save the changes.


CAUSE

Closing the the Visual Basic Editor closes the development environment and returns you to Access. Visual Basic is hidden but remains in memory. When you close the database, you will be prompted to save the changes to the objects that you modified.


RESOLUTION

If you want to save your work while in the Visual Basic Editor, click Save on the File menu.

NOTE: If you need to reopen the Visual Basic Editor, press ALT+F11, or on the Tools menu, point to Macro, and then click Visual Basic Editor.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Open the sample database Northwind.mdb.


  2. On the Tools menu, point to Macro, and then click Visual Basic Editor.


  3. On the Insert menu, click Module.

    Note the name of the module but do not save it at this point.


  4. Type the following line in the Declarations section:


  5. 
    Option Explicit 
  6. Type the following procedure:


  7. 
    Sub testCode() 
       MsgBox "This is a test" 
    End Sub 
  8. On the Debug menu, click Compile Northwind.


  9. Close the Visual Basic Editor.


  10. Note that you were not prompted to save your changes. Note also that the module is not listed under Objects in the Database window.


  11. Close the Northwind database.


  12. Note that you are presented with the monolithic Save dialog box.


Additional query words: pra prb

Keywords : kbprg kbdta AccCon
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: June 8, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.