Microsoft KB Archive/210240

= ACC2000: Project Explorer Displays Unexpected Projects After Import =

Article ID: 210240

Article Last Modified on 6/28/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q210240



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 import a module from a database into the current database, the Project Explorer in the Visual Basic Editor displays projects that are referenced in the source database.



CAUSE
During the Access import process, the Project Explorer in the Visual Basic Editor loads the source database as you import modules. If the source database contains references to .mda, .mdb, .mde, .adp, or .ade files, the Project Explorer displays the projects in these referenced files as well, even though the current database does not have explicit references to these .mda, .mdb, and .mde files.



RESOLUTION
After the import is complete, close and restart Microsoft Access. Then reopen the database that the objects were imported into. Open the Visual Basic Editor and note that the Project Explorer no longer displays the referenced .mda, .mdb, .mde, .adp, and .ade files.



STATUS
This behavior is by design.



MORE INFORMATION
This behavior does not occur when you import tables, queries, forms, reports, or macros. It only occurs when you import modules.

With modules, this behavior occurs even if the database that the objects were imported into does not have literal references to these other .mda, .mdb, .mde, .adp, or .ade files.

Steps to Reproduce the Behavior
 Create a new database named Db1.mdb.  Add a module with the following code: Sub subTest MsgBox "Test" End Sub  On the Debug menu, click Compile Db1. On the File menu, click Save Db1, and then save the module as DB1Module. Close the Visual Basic Editor, and then on the Tools menu in Access, point to Database Utilities, click Make MDE File, and then save the file as Db1.mde Close the database and create a database called Db2.mdb.</li>  Add a module to Db2.mdb with the following code: Sub subTest2 MsgBox "Test2" End Sub </li> On the Tools menu, click References. In the References dialog box, click Browse. Select the folder where Db1.mde is stored, and then click MDE Files (*.mde) in the Files of type list. Click Db1.mde, and then click Open.</li> Click OK to close the References dialog box, and then close the Visual Basic Editor.</li> Save the module as DB2Module, and then quit Access.</li> Restart Microsoft Access, and then create a database named Db3.mdb.</li> On the File menu, point to Get External Data, and then click Import.</li> Click Db2.mdb, click Import, and import the module named DB2Module.</li> On the Tools menu, point to Macro, and then click Visual Basic Editor.</li> View the Project Explorer, and note that it lists both Db1 and Db3, where Db1 is the referenced .mde project within Db2.mdb (the database that you imported from), and Db3 is the current database project.</li> Expand the Db3(Db3) node, expand the Modules node, and double-click DB2Module.</li> On the Tools menu, click References, and note that there is no reference to Db1.mde.</li></ol>

Additional query words: prb

Keywords: kbprb KB210240

-

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

© Microsoft Corporation. All rights reserved.