Microsoft Access 2003 - Create a Query

See Microsoft Access Tutorial for a tutorial on a more recent version of Access.

A "query" refers to the action of instructing the database to return some (or all) of the data in your database. In other words, you are "querying" the database for some data that matches a given criteria.

For example, you might like to see a list of all individuals whose first name is "Homer". Or you might like to see a list of all users who have registered with your database over a given time period. To do this, you need to do a query.

Here's how to create a query in Microsoft Access:

  1. Ensuring you have the "Query" tab open, click "New"
  2. Select "Simple Query Wizard" and click "OK":
    MS Access 2003: Creating a query - step 1
  3. Choose the fields you'd like to be presented in the results of your query. To choose 1 field at a time, select it and click the ">" arrow. To choose all fields click the ">>" arrows. For now, just select the "FirstName" and "LastName" fields, then click "Next":
    MS Access 2003: Creating a query - step 2
  4. Choose a name for your query and click "Finish":
    MS Access 2003: Creating a query - step 3

The Result

You should now see something like this:

MS Access 2003: Creating a query - final result

At this stage, you may be thinking that there's not much difference between the results of our query and our table. We can still see all records from our table. The only difference is that we can only see 2 fields instead of all 4 fields.

Well if that's what you're thinking, you'd be right! In our next lesson, we're going to modify our query so that we can only see some of the results.


Update

Since this tutorial was written, there have been many subsequent updates to Access. Here's the latest Access tutorial.