Microsoft Office Tutorials and References
In Depth Information
Querying: The Basics
Switching between views with the View button: On the Home tab, click
the View button. This button changes appearance, depending on
whether you’re in Design view or Datasheet view.
Switching between views on the status bar: Click the Datasheet View or
Design View button on the right side of the status bar.
Switching between views by right-clicking: Right-click the query’s title
bar and choose Datasheet View or Design View.
Finding your way around the Query Design window
The Query Design window (see Figure 4-4) is where you construct a query
or retool a query you constructed already. Switch to Design view to see the
Query Design window. You see this window straightaway after you click the
Query Design button to construct a new query. The Query Design window is
divided into halves:
Table pane: Lists the database tables you’re querying as well as the
fields in each table. You can drag the tables to new locations or drag a
table border to change its size and view more fields.
Design grid: Lists which fields to query from the tables, how to sort the
query results, which fields to show in the query results, and criteria for
locating records in fields.
Choosing which database tables to query
To choose which database tables (and queries as well) to get information
from, go to the (Query Tools) Design tab and click the Show Table button.
You see the Show Table dialog box (refer to Figure 4-4). The Tables tab lists
all the database tables you created for your database. Ctrl+click to select the
tables you want to query and then click the Add button. To query a query,
go to the Queries tab and select the query.
The tables and queries you choose appear in the Table pane of the Query
Design window (refer to Figure 4-4). To remove a table from a query,
rightclick it in the Table pane and choose Remove Table on the shortcut menu.
In order to query more than one table, you need to establish relationships
between tables. (Chapter 2 of this mini-book has information about
establishing relationships between database tables.) So-called join lines in the
Query Design window show how the tables are related to one another.
If you haven’t defined relationships between the tables, you can still join
them together by dragging a field from one table onto a field in another
table. This is the same method used to create relationships between tables.
Joining tables in a query doesn’t create an actual relationship; it’s just a
temporary join for the sake of the query.
Search JabSto ::

Custom Search