ACC2000: Saved Form or Report Does Not Show in Project Window of Visual Basic Editor

ID: Q225879


The information in this article applies to:

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

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


SYMPTOMS

When you create and save a form or a report and then open the Visual Basic Editor, the new object does not appear in the Project window.


CAUSE

A Microsoft Access form or report does not appear in the Project window until the HasModule property of the object is set to Yes.


RESOLUTION

You can use any of the following methods while the form or report is open in Design view to add a module to the object:

Following any of these steps will open the Visual Basic Editor to the form or report's Class Module. The form or report will now be listed in the Project window in the Visual Basic Editor.


MORE INFORMATION

Microsoft Access Jet databases contain several parts, such as forms, reports, links to data access pages, database objects, and Visual Basic code. The Visual Basic code can also be referred to as Visual Basic projects. Database objects, such as forms and reports, are not considered a part of the Visual Basic project unless code has been added to the form or report.

Whenever the HasModule property of a form or report is set to No, the form or report will not be listed within the Visual Basic Project window. The object must contain a module before it can be considered a part of the Visual Basic project.

Steps To Reproduce Behavior:

  1. Open either the Northwind.mdb or NorthwindCS.adp sample database.


  2. In the Database window, click Forms under objects, and then click New.


  3. In the New Form dialog box, click AutoForm: Columnar, click Shippers in the Choose the table or query where the object's data comes from box, and then click OK.


  4. Close the new form, and save it as Shippers.


  5. In the Database window, click Modules under Objects, and then click New.


  6. In the Project window, Project - Northwind (or Project - NorthwindCS), expand the node labeled Microsoft Access Class Objects.


  7. Note that Form_Shippers does not appear in the object list.


Additional query words: pra prb


Keywords          : kbdta FmrCdbeh 
Version           : WINDOWS:2000
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: June 8, 1999