Back To Top


Queries For MS Access 2000, 2002, 2003, 2007

The Access query builder is a powerful tool. With it you build a query visually and run it. Pretty much all versions from Access 97 to 2007 the query builder looks the same. In Access 2007 there are some differences, mainly creating an empty Query. For the most part this article will be dealing with MS Access 2000-2003. We will now build a Query using the following MS Access Query Example.
Go here for a Specific MS Access 2007 Query Tutorial
Go here for MS Access Queries in PDF Format

 

Assuming you have a Table called CUSTOMERS and Fields named CNT(data type AUTONUMBER), NAME(data type Text), ADDRESS(data type Text), CITY(data type Text), STATE(data type Text), ZIP(data type Text) we will go through designing a query in MS Access. By the way, the MS Access Data Type menu sets the Data Type to Text by default.

 

To design the query visually using the Query Builder simply click "Objects" in your left hand menu and then "Queries".

You will be given a choice between "Create query in Design view" and "Create query by using wizard".

This article will only deal with "Create query in Design view". Now double click "Create query in Design view" to create your access query. You will immediately be presented with a window called "Show Table", in it will be your table named CUSTOMERS. Click ADD and then Close.

MS Access Query Show Table
 

Now you will be in the Query builder Aptly named Query1. You will see this in the top left corner followed by a colon and "Select Query". Select queries, when ran ,will not modify your data by themselves. They will allow you to view your data and in some cases to MANUALY edit it if you so choose..

Now that your table is in the query builder we can begin making our query. Starting simple drag the * from the table in the top section to the bottom section. The * represents a wild card to get all fields. Click the Red "!" to run the Query. The "All Fields Wild Card" or * will show all fields when you run the query. This is the easiest access query to build.

MS Access Query design view.

If your table is empty like mine you will see all your fieldnames and "Autonumber" under the CNT field. You can if you like edit your table contents from here by typing in the blank fields.

MS Access view.


If your table is empty go ahead and add a few records. You can then click the view button to return to design mode. Later we will discuss more complicated queries involving a second table without creating a new table.


For further help or suggestions go here: MS Access tutorials, Tables, Queries and later: Forms

You may post this tutorial on your website or in a forum. If you do please maintain a Link to Eraseve AP.



For further MS Access tutorials go here: MS Access tutorials or Click NEXT

 

Did you find what you were looking for?
What would you suggest?
mail@eraserve.com
Your Name:
Your Message:
Your Email:

    

 

Custom Search