Microsoft Access 2010 Bible

(Rick Simeone) #1

Part I: Access Building Blocks


138


l (^) View: Switches between the Datasheet view and Design view in the query window. The
View drop-down control also enables you to display the underlying SQL statement behind
the query.
l Run: Runs the query. Displays a select query’s datasheet, serving the same function as
selecting Datasheet View from the View button. However, when working with action que-
ries, the Run button performs the operations (append, make-table, and so on) specified by
the query.
l Select: Clicking the Select button opens a new select query in the Query Designer.
l (^) Make Table, Append, Update, and Crosstab: Each of these buttons specifies the type of
query you’re building. In most cases, you transform a select query into an action query by
clicking one of these buttons.
l Show Table: Opens the Show Table dialog box.
l (^) Save (in the Quick Access Toolbar): Saves the query. It’s a good idea to save your work
often, especially when creating complex queries.
The remaining buttons are used for creating more-advanced queries, printing the contents of the
query, and displaying a query’s Property Sheet.
Adding Fields
There are several ways to add fields to a query. You can add fields one at a time, select and add
multiple fields, or select all the fields in a field list.
Adding a single field
You add a single field in several ways. One method is to double-click the field name in the table in
the top pane of the query designer. The field name immediately appears in the first available col-
umn in the QBE pane. Alternatively, drag a field from a table in the top pane of the query designer,
and drop it on a column in the QBE grid. Dropping a field between two fields in the QBE grid
pushes other fields to the right.
Another way to add fields to the QBE grid is to click an empty field cell in the QBE grid, and select
the field’s name from the drop-down list in the cell, or type the field’s name into the cell. Figure
4.8 shows selecting the Cost field from the drop-down list. Once the field is selected, simply move
to the next field cell and select the next field you want to see in the query.
Each cell in the Table row of the QBE grid contains a drop-down list of the tables contained in the
upper pane of the query designer.
After selecting the fields, run the query by clicking the Datasheet button or the Run button on the
ribbon. Click the Design View button on the ribbon to return to the query design window.

Free download pdf