Selecting Data Using Queries in Microsoft Access 2013
- 3/15/2013
- Selecting all columns from a table
- Selecting individual columns from one or more tables
- Joining tables to see unmatched or missing records
- Filtering by single and multiple combinations of choices
- Adding calculations with the expression builder
- Returning the top matched records
- Eliminating duplicate values
- Creating a summary calculation
- Prompting to filter data with parameters
- Creating a crosstab query with the Query Wizard
- Simplifying a problem with a query by using other queries
- Adding two sets of query results together
- Resolving ambiguous outer joins
- Creating an additional query to resolve a problem with mixed joins
Selecting individual columns from one or more tables
Selecting individual columns has the advantage of enabling you to see exactly what is being selected. It also simplifies filtering and sorting because you can apply the criteria and sorting against the selected columns.
If you use the * to include all columns in a table and need to sort by a column, you must add the column for sorting to the query (because you cannot sort against the *), but clear the check marks in the row titled Show when adding the column because you are already showing the column as part of the *, which selects all columns.
Select individual columns
In design view, double-click a column to add it to the grid (or drag it into the grid).
Sort by selected columns
Below one or more selected columns, choose either Ascending or Descending from the sorting drop-down list. To sort by a group of columns, put the columns in the order you want by dragging them as needed. Sorting is applied from left to right.
Join multiple tables
Click Show Table on the Design tab of the ribbon.
In the Show Table popup window, click a second related table to add to the query grid.
Click Add. (Note that the relationship is automatically shown in the grid.)
Click Close to close the Show Table popup window.
Select fields to display from more than one table.