ACC2000: Project Explorer Displays Unexpected Projects After Import (210240)



The information in this article applies to:

  • Microsoft Access 2000

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

  1. Create a new database named Db1.mdb.
  2. Add a module with the following code:
    Sub subTest()
        MsgBox "Test"
    End Sub
    					
  3. On the Debug menu, click Compile Db1. On the File menu, click Save Db1, and then save the module as DB1Module.
  4. 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
  5. Close the database and create a database called Db2.mdb.
  6. Add a module to Db2.mdb with the following code:
    Sub subTest2()
        MsgBox "Test2"
    End Sub
    					
  7. 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.
  8. Click OK to close the References dialog box, and then close the Visual Basic Editor.
  9. Save the module as DB2Module, and then quit Access.
  10. Restart Microsoft Access, and then create a database named Db3.mdb.
  11. On the File menu, point to Get External Data, and then click Import.
  12. Click Db2.mdb, click Import, and import the module named DB2Module.
  13. On the Tools menu, point to Macro, and then click Visual Basic Editor.
  14. 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.
  15. Expand the Db3(Db3) node, expand the Modules node, and double-click DB2Module.
  16. On the Tools menu, click References, and note that there is no reference to Db1.mde.

Modification Type:MajorLast Reviewed:6/28/2004
Keywords:kbprb KB210240