Microsoft Office Tutorials and References
In Depth Information
Overview
As you read this chapter, you will learn how to query a database by performing these
general tasks:
• Create queries using the Simple Query Wizard and Design view
• Use criteria in queries
• Create and use parameter queries
• Sort data in queries
• Join tables in queries
• Perform calculations in queries
• Create crosstab queries
Plan
Ahead
Query Design Guidelines
When posing a question to Access, you must design an appropriate query. In the process of
designing a query, the decisions you make will determine the fi elds, tables, criteria, order,
and special calculations included in the query. To design a query, you should follow these
general guidelines:
1. Identify the fi elds. Examine the question or request to determine which fi elds from the
tables in the database are involved. Examine the contents of these fi elds to make sure
you understand how the data is stored.
2. Identify restrictions. Unless the question or request calls for all records, determine the
restrictions, that is, the conditions records must satisfy in order to be included in the results.
3. Determine whether special order is required. Examine the question or request to
determine whether the results must appear in some specifi c order.
4. Determine whether more than one table is required. If all the fi elds identifi ed in Step 1
are in the same table, no special action is required. If this is not the case, identify all tables
represented by those fi elds.
5. Determine whether calculations are required. Examine the question or request to
determine whether, in addition to the fi elds determined in Step 1, calculations must be
included. Results of mathematical operations typically are not stored in the database
because they can be calculated easily when necessary. Such calculations include individual
record calculations (for example, adding the values in two fi elds) or group calculations
(for example, fi nding the total of the values in a particular fi eld on all the records).
6. If data is to be summarized, determine whether a crosstab query would be appropriate.
If data is to be grouped by two different types of information, you can use a crosstab
query. You will need to identify the two types of information. One of the types will form
the row headings and the other will form the column headings in the query results.
When necessary, more specifi c details concerning the above decisions and/or actions are
presented at appropriate points in the chapter.
Search JabSto ::




Custom Search