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 />

The preceding steps are general steps that work with all supported database types. In some<br />

situations, you may prefer to open the database file directly and not create a named data<br />

source that will appear in the Choose Data Source dialog box. For example, if you won’t be using the database<br />

again, you can open the file directly and not have to bother creating a new named data source. If you’re<br />

using an Access file, you can select MS Access Database from the Databases tab in the Choose Data Source<br />

dialog box. Then, you can specify the file, and you’re taken directly to <strong>Microsoft</strong> Query.<br />

NOTE<br />

Using the Query Wizard<br />

The Choose Data Source dialog box has a check box at the bottom that lets you specify whether to use the<br />

Query Wizard to create your query. The Query Wizard walks you through the steps used to create your<br />

query, and if you use the Query Wizard, you don’t have to deal directly with Query. I highly recommend<br />

using the Query Wizard, and the examples in this chapter use this tool.<br />

In the Choose Data Source dialog box:<br />

1. Select your data source (Budget Database, for this example).<br />

2. Make sure that the Query Wizard check box is checked.<br />

3. Click OK to start the Query Wizard.<br />

Query Wizard: Choosing the columns<br />

In the first step of the Query Wizard, select the database columns that you want to appear in your query.<br />

Select one or more columns and click the > button to add them (see Figure 33.6). To select all fields, click<br />

the table name (budget) and click the > button.<br />

FIGURE 33.6<br />

In the first step of Query Wizard, you select the columns to use in your query.<br />

If you want to see the data for a particular column, select the column and click the Preview Now button. If<br />

you accidentally add a column that you don’t need, select it in the right panel and click the < button to<br />

remove it.<br />

For this example, add all the fields and then click the Next button.<br />

581

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

Saved successfully!

Ooh no, something went wrong!