Whenever you run a query ...
You can browse through the recordset, select from it, sort it, and print it. Typically, the recordset you produce with a query isn't saved, but the query structure and criteria you used to get the results are saved.
[top]
[top]
[top]
[top]
The Wizard can do simple queries by asking you questions and creating a query based on your answers.
[top]
[top]
A select query retrieves data from one or more tables and displays the recordset in a datasheet.
You can also use a select query to group data, and to calculate sums, counts, averages, and other types of totals, which we will cover in a subsequent session.
1. From the Tables/Queries drop-down list, choose the table/query that contains the fields you want to include in the query
2. Select the fields you want to include and move them into the Selected Fields column
3. If the fields selected include a number field, you have a decision to make.
4. Name your query and save it
[top]
A select query can be built to return data that meets certain criteria. This is easily seen in the design view. Say, for example, we wish to see a list of all authors whose names begin with B as well as the titles of their books ...
Other select queries allow you to add Boolean "and" and "or" criteria to the query and to sort the response.
[top]
A parameter query displays a dialog box when it runs, prompting the user to enter information to use as criteria for the query. You can design a parameter query to prompt for more than one piece of information. For example, you can design it to prompt for something from one table as well as from another.
When the Enter Parameter Value dialog box opens, enter an appropriate value and click OK
[note: the parameter entered into the dialog box must be an exact match
for the data in the fields you are searching.
In this case, you must enter the exact value that the database holds in order to return anything.]
A parameter query allows you to design a query to return data in accordance with specific criteria you enter as you run the query.
[top]
All queries are built using the Structured Query Language, or SQL, and you can review how the Wizard-built or the Design-built query is expressed in SQL. It is one of the views under the View icon in the Query Tools Design ribbon.
[top]
From Serena Fenton's INLS261 class notes
Microsoft's "Get Answers with Queries"
[top]