Microsoft Access 2002 Queries

 

Introduction

Entering Criteria

Using a Number in a Criteria

Sorting Data in a Query

Using Computed Fields in a Query

WHAT ARE QUERIES?

In a database queries are used to return data that meets specific criteria, which allows the user to search, view, and modify data from single or multiple tables.  Queries provide a source of data for forms and reports based on specific fields required by the user.

For our purposes, we will be using a database called Queries to answer some of the following questions in our examples.

  1. What are the billed and paid amounts for each client?
  2. Which clients’ names begin with Ka?
  3. Which clients are located in Scranton?
  4. What is the outstanding amount (accounts payable minus accounts receivable) for each client?
  5. Which clients of Client Rep 1003 have an outstanding bill of $300 or more?

CREATING A QUERY

  1. Open the Queries database located on the diskette.  When the database opens click Queries under the Object menu, and then click “Create query by using wizard”. 
  2. This opens the Simple Query Wizard.  From the table Clientele select the fields Client ID, Name, and Client Rep.
  3. Click next.  Except the suggested name Clientele Query and then click Finish.  Access automatically runs the query and displays it in Datasheet View.  The query you created is known as a simple query. Close the query.