Understanding the Project Explorer Window

The Project Explorer window provides access to modules behind forms and reports

Northwind (Northwind)

□••"tt§ Microsoft Office Access Class Objects m Form_Customer Orders Subforml Ell Form_Customers ; IfU Form_Employees i El Form_Main Switchboard

EH Form_Orders I El Form_Orders Subform

| El Form_Products

Eil Form_Sales Analysis I El Form_5ales by Year Dialog i El Form_5ales Reports Dialog

Eil Form_Suppliers ill Report_Employee Sales by Country ill Report_5ales by Year a via the Microsoft Office Access Class Objects folder (see Figure 2-1). The Modules folder lists only standard modules that are not behind a form or report.

Northwind (Northwind)

□••"tt§ Microsoft Office Access Class Objects m Form_Customer Orders Subforml Ell Form_Customers ; IfU Form_Employees i El Form_Main Switchboard

EH Form_Orders I El Form_Orders Subform

| El Form_Products

Eil Form_Sales Analysis I El Form_5ales by Year Dialog i El Form_5ales Reports Dialog

Eil Form_Suppliers ill Report_Employee Sales by Country ill Report_5ales by Year

Figure 2-1: The Project Explorer window is an easy entry port to your VBA procedure code.

4tBBBB

Startup

Utility Functions

Introduction to Access 2003 VBA Programming

In addition to the Microsoft Office Access Class Objects and Modules folders, the VBA Project Explorer window can contain class modules, which are used for creating your own objects as demonstrated in Chapter 8. Using the Project Explorer window, you can easily move between modules currently loaded into memory.

You can activate the Project Explorer window in one of three ways: ■ From the View menu by selecting Project Explorer From the keyboard by pressing Ctrl+R

From the Standard toolbar by clicking the Project Explorer button H as shown in Figure 2-2

^^ Note: If the Project Explorer window is visible but not active, activate it by clicking the Project Explorer title bar.

Buttons on the Standard toolbar (Figure 2-2) provide a quick way to access many Visual Basic features.

'Sm Microsoft Visual Basic - Northwind [Modulel (Code)]

BE®

; File Edit View Insert Debug Run Tools Add-lns

Window Help

Type a question for help

- - S X

iE : A « - A J

% In 3, Col 1

R

i Ü3 % iS ÏF U '- -

Project Explorer_

Figure 2-2: Use the toolbar buttons to quickly access frequently used features in the VBE window.

Figure 2-2: Use the toolbar buttons to quickly access frequently used features in the VBE window.

Notice that the Project Explorer window (see Figure 2-3 on the next page) contains three buttons:

View Code — Displays the Code window for the selected module View Object — Displays the selected form or report in the Microsoft Office Access Class Objects folder. This button is disabled when an object in the Modules or Class Modules folder is selected. Toggle Folders — Hides and unhides the display of folders in the Project Explorer window

0 0

Post a comment