You can locate specific information stored in a table, or in multiple tables, by creating a query specifying the parameters of the information you want to find. For example, you might want to locate all your out-of-state customers who have purchased gloves within the last three months. You could find this information by sorting, filtering, and cross-referencing table data, but that would be a difficult and time-consuming task. It is far simpler to create a query that returns all records in the Customers table with billing addresses not in your state, whose customer IDs map to records that appear in the Transactions table within the past quarter and include item IDs that map to records in the Inventory table that are classified as gloves. That might sound complicated, but the process of creating a query to return the results described in this example is quite simple. Running a query (also called querying the database) displays a datasheet containing the records that fit your search criteria. You can use the query results as the basis for further analysis, create other Access objects (such as reports) from the results, or export the results to another format, such as an Excel spreadsheet or a Microsoft SharePoint list. If you will want to locate records matching the search criteria at any time in the future, you can save the query, and run it again from the Queries section of the Navigation Pane. Each time you run a query, Access evaluates the records in the specified table (or tables) and displays the current subset of records that match the criteria you have defined. Don't worry if this all sounds a bit complicated at the moment. When you approach queries logically, they soon begin to make perfect sense. You can easily create queries by using the Query wizard that is available to help you structure the query, and if you create a query that you are likely to run more than once, you can save it. It then becomes part of the database and is displayed when you click Queries in the Navigation Pane. See Also For more information about queries, see Chapter 6, "Locating Specific Information." In this exercise, you will explore two existing queries.
USE the 05_Queries database. This practice file is located in the Chapter01 subfolder under SBS_Access2007. OPEN the 05_Queries database.
CLOSE the Products By Category query without saving your changes, and then close the 05_Queries database. |