In Access queries let you retrieve information from one or more tables on a set of defined search conditions. Learn how to use queries in Access here.
The real power of an Access 2007 database lies in its ability to pull data for quick analysis, which is what happens when you run a query. Queries allow you to retrieve information from one or more tables based on a set of search conditions you define. Access 2007 will display your results in their own table, which you can then further analyze and manipulate. In this lesson, we'll explain how to plan a query using a three-question planning process. You'll also learn how to use the Query Design command to run a query, as well as how to modify the query to hide fields or other information in your query results. Finally, you'll learn how to save the query for later use.
Watch the video! (5:22min)
Download the example to work along with the video.
Queries retrieve information from one or more tables based on a set of search conditions you set up and then combine that information in a way that's easy for you to analyze. If you've used an Advanced Filter in Access 2007, then you've already run a basic query on only one table. If you want to pull data from more than one table, though, you'll need to use either the Query Design command or the Query Wizard.
Before using the Access 2007 query tools, it's important to plan out the query using a logical process. Otherwise, you may not get the results you expect.
There are three questions you need to answer when planning a query:
Let's think about this process for our bookstore database scenario. We have a new technology series coming out soon, and we want to send coupons to customers who have ordered technology books from us in the past. A query can help us answer the question, Which customers have ordered technology books from us already? Let's use the three-question process to plan this query.
Once you've planned out your query, you can build and run it using Access 2007's query tools.
Sometimes the results of a query will include information that is seemingly unnecessary to you. Access 2007 allows you to easily hide these fields.
Sometimes you will not need to save your results or your query design, and other times you may want to keep it to run again later or to modify it slightly. Saving a query is easy to do.
If you haven't already done so, save the sample Ready2Read database to your computer.
- Plan a query to find out which customers order a certain category of books.
- Use the Query Design command to set up the query.
- Run the query, and view your results.
- Save the query.
- Modify the query to hide a field.