| Lesson 5 | Analyze a select Query in Design View |
| Objective | Analyze a select query in Design View to identify its source tables, join condition, and selected fields. |
Microsoft Access Query Design View has two main areas: the upper pane (tables and joins) and the lower pane (the query grid). This lesson shows how to read a saved SELECT query so you can identify (1) source tables, (2) join condition, and (3) selected fields.
In Microsoft Access, the Design View of a select query is divided into two main panes: the upper pane (also called the table or relationship pane) and the lower pane (the query design grid or QBE grid). To identify the **source tables** (or queries acting as sources), look at the upper pane where rectangular field list windows display the names of each table or query added to the design—these are the data sources from which the query pulls information. The **join conditions** are visible as lines connecting fields between these tables in the upper pane; by default, these are inner joins (shown as a simple line), but outer joins display an arrowhead indicating directionality, and you can double-click any join line to open the Join Properties dialog for details on the exact fields and join type (e.g., inner, left, or right outer join). In the lower pane's design grid, the **selected fields** appear in the "Field" row across columns, with the corresponding source shown in the "Table" row below each; additionally, check the "Show" checkbox to confirm if a field is included in the output results (unchecked fields may be used only for criteria or sorting). This visual layout allows quick analysis of how the query combines and filters data from multiple sources.
The image shows an Access query named Project Hours : Select Query built from two tables: Projects and Hours.
Projects.Project ID to Hours.ProjectID. This indicates a one-to-many relationship:
one project can have many hour entries.
| Field | Table | Sort | Show | Criteria | Or |
|---|---|---|---|---|---|
| Project Description | Projects | Yes | |||
| Date | Hours | Yes | |||
| Hours worked | Hours | Yes |
Because there is no Sort or Criteria, the query returns all matching rows: each Hours record is joined to its related Projects row. The output includes the project description, the date of the hours entry, and the hours worked.
In SQL View, the same query typically appears in the following form:
SELECT
Projects.[Project Description],
Hours.[Date],
Hours.[Hours worked]
FROM Projects
INNER JOIN Hours
ON Projects.[Project ID] = Hours.[ProjectID];