|
![]() |
![]() ![]() ![]()
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
The most common type of query performed is the select query. As mentioned before, select queries are created with one or more tables/queries and with one ore more fields selected from the tables/queries involved. To begin, select the New button with the Query tab in the foreground or alternatively select the New Query button from the drop-down New Object button. The dialog box that appears allows you to add tables and/or queries. After each selection, hit the add button and the table and/or query will be in the window that looks like the relationship window. An example can be seen below.
To select fields, begin by selecting a field name within the table/query and drag it into the Field name row. Fields can also be selected by selecting the Table Name and Field Row name in the indicated rows of the grid. With these fields indicated, a pull of every row will be the result of the query. To be more particular in your query pull, information will be needed in the criteria fields. When criteria only needs to be set up for one field, all that is needed is to place the criteria under the intended field name. Criteria can take the form of a specific word to pull (e.g. "Brown"), or a combination of wildcards (e.g. "Bro*", "195#", etc.), or it can even be an expression (e.g. ">30", "=1234", etc.). However, when you begin to set criteria for multiple fields, you need to concern yourself with the placement of the criteria. Placement is critical because of the boolean logic statement. If all the criteria is the same row it is considered an AND statement, while if the criteria is split in multiple rows it is considered an OR statement. The following illustration should help in the criteria explanation.
Two more options allow for formatting of your query. In the Show row, any un-checked box will not show that column in the query. In the Sort row, one of the columns can be sorted in ascending or descending order. |
|||||||
![]() Access is a copyright of Microsoft, Inc. No infringement of those rights is intended. Questions or comments -- Contact the author |