Microsoft KB Archive/225873

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

Article ID: 225873

Article Last Modified on 10/11/2006

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



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.



Steps to Reproduce Behavior
 Open the sample database Northwind.mdb. On the Tools menu, point to Macro, and then click Visual Basic Editor. On the Insert menu, click Module.

Note the name of the module but do not save it at this point.  Type the following line in the Declarations section: Option Explicit   Type the following procedure: Sub testCode MsgBox "This is a test" End Sub </li> On the Debug menu, click Compile Northwind.</li> Close the Visual Basic Editor.</li> Note that you were not prompted to save your changes. Note also that the module is not listed under Objects in the Database window.</li> Close the Northwind database.</li> Note that you are presented with the monolithic Save dialog box.</li></ol>

Additional query words: pra prb

Keywords: kbnofix kbprb kbprogramming KB225873

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.