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:
- On the View menu, click Code.
- On the Events tab of the property sheet, select Event Procedure for any event, and then click the Build (...) button to the right of the event box.
- Right-click the form/report element or control and click Build Event; then select Code Builder, and click OK.
- Click the Build button (it looks like a magic wand above three dots) on the Form/Report Design toolbar, select Code Builder, and then click OK.
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:
- Open either the Northwind.mdb or NorthwindCS.adp sample database.
- In the Database window, click Forms under objects, and then click New.
- 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.
- Close the new form, and save it as Shippers.
- In the Database window, click Modules under Objects, and then click New.
- In the Project window, Project - Northwind (or Project - NorthwindCS), expand the node labeled Microsoft Access Class Objects.
- 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