18.11.2014 Views

Microsoft Office

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Using <strong>Microsoft</strong> Query with External Database Files 33<br />

FIGURE 33.13<br />

Display the Criteria pane as shown here so that you’ll be able to create your query.<br />

The Query window has three panes, which are split horizontally:<br />

n<br />

n<br />

Tables pane: The top pane, which holds the selected data tables for the database. Each data table<br />

window has a list of the fields in the table.<br />

Criteria pane: The middle pane, which holds the criteria that determine the rows that the query<br />

returns.<br />

n Data pane: The bottom pane, which holds the data that passes the criteria.<br />

Creating a query consists of the following steps:<br />

1. Drag fields from the Tables pane to the Data pane. You can drag as many fields as you want.<br />

These fields are the columns that the query will return. You can also double-click a field instead<br />

of dragging it.<br />

2. Enter criteria in the Criteria pane. When you activate this pane, the first row (labeled Criteria<br />

Field) displays a drop-down list that contains all the field names. Select a field and enter the criteria<br />

below it. Query updates the Data pane automatically, treating each row like an OR operator.<br />

3. Choose File ➪ Return Data to <strong>Microsoft</strong> Excel to execute the query and place the data in a<br />

worksheet or pivot table.<br />

Figure 33.14 shows how the query for the example presented earlier in this chapter appears in Query.<br />

TIP<br />

Double-click a criteria box to display the Edit Criteria dialog box, which enables you to select<br />

an operator and value.<br />

587

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!