How to Create a Simple Query in Microsoft Access 2007

How to Create a Simple Query in Microsoft Access 2007
Page content

What is a Query?

The whole purpose of taking the time to design and enter information into a database is so that information can be retrieved, reviewed, and analyzed at a later date. While it is possible to perform these tasks in Access by looking at the full tables that hold the data, this method usually is neither efficient nor overly useful, especially if the tables in question contain a great deal of information.

Instead, a better way to find and analyze data stored in an Access table is to use a query. With a query, you can restrict your data so that only the information you need for analysis is present, making it much easier to answer questions and create future action plans.

There are several types of queries that can be formulated in Access, but for now, we’ll concentrate on the most basic of these and look at how to develop a simple query.

How to Create a Simple Query

Step 1: Open the database containing the table(s) you want to query in Microsoft Access.

Step 2: On the Create tab of the Access ribbon, click the Query Wizard button.

Step 3: Select Simple Query Wizard. Click OK to continue.

Choose Simple Query Wizard

Step 4: From the Tables/Queries drop down list, select the table or query that contains the fields you wish to use in the query.

Tables Drop Down List

Step 5: From the list of Available Fields, select each field that you want included in your query and add it to the Selected Fields list by clicking the “>” button. As a shortcut, if you want to add all fields, click the “»” button. Click Next to continue.

Select Fields to Use in Query

Step 6: In the next screen of the Simple Query Wizard, choose whether you want to run a Detail or Summary query. A Detail Query will return a listing of every record, whereas a Summary Query will, as its name implies, return a summarized version of the results.

Choose Detail or Summary Query

If you choose to perform a Summary query, you’ll also have to decide how you want the information summarized. To do this, click the Summary Options button and check which items should be summarized. Also, if you want a count of how many items are included in each category of your summary, put a check in the box next to Count Records. Click OK to exit the Summary Options window.

Summary Options

Click Next to continue. Skip to Step 8 if you chose to run a Detail Query.

Step 7: If you’re running a Summary Query, the next step in the wizard may ask you to choose how you want to group the records in your query. Make your selection and click Next to continue.

Select Grouping Options for Summary Query

Note: This step may not appear in every Summary Query. Whether it does or not depends on what fields you have chosen to be displayed when performing the query.

Step 8: Choose a name for your query and click Finish.

Name the Query

The new query can now be viewed in Access.

Query Open in Access

For more tips and tutorials, take a look at the other items in Bright Hub’s collection of Microsoft Access user guides. Learn how to create a new form as well as how to add fields to existing forms, or get advice on general database design strategies. New articles are added to the collection on a regular basis, so don’t forget to bookmark the page and check back often.