Creating a Simple Query in Access 2013

Access Product Query screenshot
Access Product Query.

Have you ever wanted to combine information from multiple tables in your database in an efficient manner? Microsoft Access 2013 offers a powerful query function with an easy-to-learn interface that makes it a snap to extract exactly the information you need from your database. In this tutorial, we'll explore the creation of a simple query.
In this example, we will use Access 2013 and the Northwind sample database. If you're using an earlier version of Access, you may wish to read Creating Queries in Access 2010 or Creating Queries in Older Versions of Microsoft Access.

If you're using a newer version of Access than 2013, the steps should be the same or similar

Set Your Goal

Our goal in this tutorial is to create a query listing the names of all of our company's products, our desired target inventory levels and the list price for each item. Here's how we go about the process:

Follow These Steps

  1. Open Your Database: If you haven't already installed the Northwind sample database, be sure to do so before proceeding. Open that database.
  2. Switch to the Create Tab: In the Access ribbon, change from the File tab to the Create tab. This will change the icons presented to you in the ribbon. If you're not familiar with using the Access ribbon, read Access 2013 Tour: The User Interface.
  3. Click the Query Wizard Icon: The query wizard simplifies the creation of new queries. We'll use it in this tutorial to introduce the concept of query creation. The alternative is to use the Query Design view, which facilitates the creation of more sophisticated queries but is more complicated to use.
  4. Select a Query Type. Access will ask you to choose the type of query you wish to create. For our purposes, we will use the Simple Query Wizard. Select this and click OK to continue.
  5. Select the Appropriate Table From the Pull-Down Menu: The Simple Query Wizard will open. It includes a pull-down menu that should be defaulted to "Table: Customers". When you select the pull-down menu, you'll be presented with a listing of all the tables and queries currently stored in your Access database. These are the valid data sources for your new query. In this example, we want to first select the Products table which contains information about the products we keep in our inventory.
  6. Choose the Fields You Wish to Appear in the Query Results: You can do this by either double-clicking on them or by single-clicking first on the field name and then on the ">" icon. As you do this, the fields will move from the Available Fields listing to the Selected Fields listing. Notice that there are three other icons offered. The ">>" icon will select all available fields. The "<" icon allows you to remove the highlighted field from the Selected Fields list while the "<<" icon removes all selected fields. In this example, we want to select the Product Name, List Price, and Target Level from the Product table.
  7. Repeat Steps 5 and 6 to Add Information from Additional Tables, As Desired: In our example, we're pulling information from a single table. However, we're not limited to using only one table. That's the power of a query! You can combine information from multiple tables and easily show relationships. All you have to do is select the fields -- Access will line up the fields for you! Note that this works because the Northwind database has predefined relationships between tables. If you're creating a new database, you'll need to establish these relationships yourself. Read the article Creating Relationships in Microsoft Access for more information on this topic.
  8. Click On Next: When you're finished adding fields to your query, click the Next button to continue.
  9. Choose the Type of Results You Would Like to Produce: We want to produce a full listing of products and their suppliers, so choose the Detail option here and click the Next button to continue.
  10. Give Your Query a Title: You're almost done! On the next screen, you can give your query a title. Select something descriptive that will help you recognize this query later. We'll call this query "Product Supplier Listing."
  11. Click On Finish: You'll be presented with the query results shown in the illustration above. It contains a list of our company products, desired target inventory levels, and list prices. Notice that the tab presenting the results contains the name of your query.

Congratulations! You've successfully created your first query using Microsoft Access! Now you're armed with a powerful tool to apply to your database needs.