- Computers & Software»
- Computer Software»
- Office Software Suites
How to Create Queries Using Microsoft Access 2003
Creating Queries In Access
How to Create Queries Using Access
We have already tackled the introduction to Microsoft Office Access and also seen how to create a database. We are now going to learn how to create queries using Microsoft Access 2003. This tutorial will also help those who are working with Access 2007 or even higher versions, there is no much difference in the principles applied.
Creating Queries in Access
Queries are like questions. We use them to query the database for the information we want. In this way, you are able to display the information you want and in an efficient way. This is the process to follow to create a query.
- Under the objects, select queries.
- Click on new.
- Select design view method, though you can create queries using simple query wizard, crosstab query wizard, find duplicates, and find unmatched query wizard. Then click okay to proceed.
- On the show table dialog box, select the tables, queries, or both option to define what you want to use to make your query. For instance if you want to use a table to make a query, select the table name and click on add, then click on close.
Creating Queries in Access 2003
Creating Queries in Access Database Program
- The select query dialog box appears. Now, here there are two ways of coming up with a query, you can add the fields you want by double clicking on them, or you can create a query with all the fields. The easiest way to add all the fields is to double click on the blue area to select all of then, then dragging and dropping them on where it is written 'field'.
- After dragging the fields you want, click on query menu and click on run. This option allows you to display what you wanted to see from your database.
- To revert to design view of your query, simply go to view and select design view. In design view, you can modify the query the way you want.
To save your query, you can use the option file save as and then give the query a name, or click on close and the computer will prompt you to save your query.
Defining the Source of Your Query Data
Turning Your Data Into Meaningful Information
Using your query, you can be able to manipulate your data the way you want:
- You can drag only specific fields you want to the design grid leaving out the ones you do not want.
- Using the sort option you can be able to sort different fields of your data either in ascending or descending order.
- Using the show button, you can opt not to show some of the fields by deselecting the show button.
- You can use the criteria option which allows you to limit or specify the records which are included in the results of a query.
Select Query in Access 2003
Using Criteria in Access 2003
You can use the criteria for instance to display names starting with a certain character. So on criteria under the names;
- Type J* - this will display all names starting with letter J
- Type *A* - this will display any name with character A anywhere
- Type *Y – this will display any name ending with character Y
If you want to display a specific country, on the criteria under country type for instance Kenya. Once you run your query, this will display only patients from Kenya.
Running a Query
Types of Queries You Can Create
To come up with these types of queries you create a normal select query and then in design view you go to query menu and select the query type you want.
- Select query – this type of query allows you to select the information you want. Any new query you create is a select query.
- Crosstab query – this a query that can be used to calculate a sum, average, count, or other type of total on records.
- Make table query – this type of query helps you to create a new table out of your query.
- Update query – this query type updates records in the object used to create the query.
- Append query – this query type appends or adds records to specified table.
- Delete query – as you can guess, this type of query will delete specified records from one or more tables.
Was this tutorial helpful
© 2012 Patrick Kamau