Microsoft Access 2003 Illustrated Complete Creating Multiple Table Queries
Objectives Build select queries Sort a query on multiple fields Develop AND criteria Develop OR criteria Creating Multiple Table Queries
Objectives Create calculated fields Build summary queries Build crosstab queries Build PivotTables and PivotCharts Creating Multiple Table Queries
Building Select Queries Methods Methods: Simple Query Wizard Query Design View Creating Multiple Table Queries
Query Design View Query grid Field identifies fields Lists in query Criteria to limit records Creating Multiple Table Queries
Sorting a Query on Multiple Fields Sort orders are evaluated in a left-to-right order Use the Show check box to sort on a field but not show it in the query datasheet Creating Multiple Table Queries
Specifying Sort Orders Primary sort field Secondary sort field Creating Multiple Table Queries
Developing AND Criteria AND criteria are entered on the same row of the query grid AND criteria must both be true for the record to display in the datasheet AND criteria further limit the number of records in the datasheet Comparison operators or wildcard characters may be used in criteria Creating Multiple Table Queries
Developing AND Criteria AND criteria are entered on the same row Creating Multiple Table Queries
Common Comparison Operators Creating Multiple Table Queries
Developing OR Criteria OR criteria are entered on different rows of the query grid OR criteria may either be true for the record to display in the datasheet OR criteria further expand the number of records in the datasheet Comparison operators or wildcard characters may be used in criteria Creating Multiple Table Queries
Developing OR Criteria OR criteria are entered on different rows Creating Multiple Table Queries
Criteria Wildcards An asterisk (*) searches for any number of characters A question mark (?) searches for any single character A pound sign (#) searches for any single number Creating Multiple Table Queries
Creating Calculated Fields Create a calculated field in the field cell of the query grid Calculated fields follow this pattern NewFieldName:expression Expressions may include field names, operators, and functions such as Sum Surround field names in [square brackets] Example: HourlyRate:[Cost]/[Hours] Creating Multiple Table Queries
Creating Calculated Fields [Cost]/[Hours] is the expression HourlyRate is the new calculated field name Creating Multiple Table Queries
Arithmetic operators Creating Multiple Table Queries
Common functions Creating Multiple Table Queries
Building Summary Queries A summary query calculates statistics about a group of records Use the Total row in the query grid to specify how records are grouped and summarized The datasheet of summary queries cannot be updated because each row represents several records Creating Multiple Table Queries
Building Summary Queries Totals button Total row Group By Sum Count Creating Multiple Table Queries
Aggregate Functions Creating Multiple Table Queries
Building Crosstab Queries Crosstab queries calculates statistics about a group of records using both a row and column heading Use the Crosstab Query Wizard to create a crosstab query Use the Total and Crosstab rows in the query grid to specify the crosstab settings Creating Multiple Table Queries
Building Crosstab Queries The Description field is the row heading field The Location field is the column heading field The Cost field is being summarized Creating Multiple Table Queries
Building Crosstab Queries The Location field is the column heading field The Description field is the row heading field The Cost field is being summarized Creating Multiple Table Queries
Other Query Wizards Find Duplicates Query Wizard finds whether a table contains duplicate values in one or more fields Find Unmatched Query Wizard finds records in one table that do not have related records in another table Creating Multiple Table Queries
Building PivotTables and PivotCharts Use the PivotTable or PivotChart View of any existing table, query, or form Changes made to either the PivotTable or PivotChart view are automatically applied to the other Creating Multiple Table Queries
Building PivotCharts Drag fields from the field list to the field locations on the PivotChart Creating Multiple Table Queries
Building PivotTables Last is in the filter area CourseID is in the column heading area Cost is summed for each CourseID and Location Location is in the row heading area Creating Multiple Table Queries
Comparing PivotTables, PivotCharts, and Crosstab Queries Creating Multiple Table Queries
Summary Select queries are the most common type of query Use select queries to: Select a subset of fields and records Sort data Create calculated fields Use summary, crosstab, PivotTable, and PivotCharts to show summarized information Creating Multiple Table Queries