Microsoft KB Archive/223209

= ACC2000: Database Window Doesn't Display Modules Inserted from Text in VBE =

Article ID: 223209

Article Last Modified on 7/16/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q223209



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

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



SYMPTOMS
When you insert a module from text in the Visual Basic Editor (VBE), the module does not appear in the Microsoft Access Database window.



CAUSE
You have not saved the Visual Basic project of the database. The Database window in Access displays only saved modules.



RESOLUTION
Save the Visual Basic project of the database. To save the Visual Basic project of your database, follow these steps:
 * 1) In Microsoft Access, press ALT+F11 to open the Visual Basic Editor.
 * 2) On the File menu, click Save  .



MORE INFORMATION
Access displays only saved modules in the Database window, even though the Visual Basic Project Explorer can display new, unsaved modules. This occurs because Access is unaware of the new module until you save the Visual Basic project of the database. After you save the project, the Visual Basic Editor notifies Access of the modules currently stored in the project.

Create a Text File to Import

 * 1) Open the sample database Northwind.mdb.
 * 2) Press ALT+F11 to open the Visual Basic Editor.
 * 3) On the View menu, click Project Explorer.
 * 4) Expand the Modules node under the Northwind project node to view the modules in the project.
 * 5) Select the Startup module.
 * 6) On the File menu, click Export File.
 * 7) Select the default name Startup.bas, and then click Save.
 * 8) Press ALT+F11 to switch to Microsoft Access.
 * 9) Close the Northwind database.

Import the Text File

 * 1) Create a new, blank database.
 * 2) Press ALT+F11 to open the Visual Basic Editor.
 * 3) On the File menu, click Import File.
 * 4) Select the Startup.bas file that you saved in step 7 of the "Create a Text File to Import" section, and then click Open.
 * 5) On the View menu, click Project Explorer.
 * 6) Expand the new database project node in the Project Explorer.
 * 7) Expand the Modules node to view the modules in the project. Note that the Visual Basic Editor Project Explorer displays the newly imported Startup module under the Modules node.
 * 8) Press ALT+F11 to return to Microsoft Access.
 * 9) Click Modules under Objects, in the Database window.

Note that Microsoft Access does not display the Startup module in the Database window.

Additional query words: prb doesn t does not

Keywords: kbprb KB223209

-

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

© Microsoft Corporation. All rights reserved.