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



The information in this article applies to:

  • Microsoft Access 2000

This article was previously published under Q225873
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

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:
    Option Explicit
    					
  5. Type the following procedure:
    Sub testCode() 
       MsgBox "This is a test" 
    End Sub
    					
  6. On the Debug menu, click Compile Northwind.
  7. Close the Visual Basic Editor.
  8. Note that you were not prompted to save your changes. Note also that the module is not listed under Objects in the Database window.
  9. Close the Northwind database.
  10. Note that you are presented with the monolithic Save dialog box.

Modification Type:MinorLast Reviewed:10/11/2006
Keywords:kbnofix kbprb kbProgramming KB225873