Queries

This page is created to help you create the queries described in the Access homework.

=__To create a query__:= 6. Depending on what you are asked for, you may need to //sort//, //total//, //show/hide//, or //modify// your information. 7. Once you've entered in all of you information, **save your work**. 8. Finally, click the "**Run**" button under the "**Results**" group on the "**Design**" tab.
 * 1) Go to the "**Create**" tab.
 * 2) In the "**Other**" group, click on the "**Query Design**" button.
 * 3) Select the table(s) that your query needs to be based on and click "**Add**."
 * 4) Once you've chosen the table(s) you need to work with, click "**Close**."
 * 5) Now, from the table(s) you've chosen, you need to choose the information you've been asked to display. To do this, find the information that you need to display and double click on each one; another option would be to click on the information and drag it down to "**Field:**"
 * If you're asked to **sort** your information, you would go to "**Sort**:" under the required field value and select "//Ascending//" or "//Descending//," depending on what is asked.
 * If you're asked to **perform a certain mathematical function** (sum, min, max, avg, etc.), you first click the "**Totals**" button in the "**Show/Hide**" group on the design tab. Next, under "**Totals**:" you select the function that you want the computer to perform, from the drop down menu.[[image:http://i13.photobucket.com/albums/a290/oHhsoOseduCtive/pic62.jpg]]
 * If you're asked to **show or hide certain fields**, simply click on the box with the **check mark** in the "**Show**:" section, under the field you want to hide. When the **check mark is visible**, that field's information will be shown.[[image:http://i13.photobucket.com/albums/a290/oHhsoOseduCtive/pic63.jpg]]
 * To **modify** your query results so that specific information is displayed, choose the field in which you need specific information. Next click in the "**Criteria**:" section under the field you chose. Next, type in the specific information that you want displayed.[[image:http://i13.photobucket.com/albums/a290/oHhsoOseduCtive/pic64.jpg]]

=Parameter Queries:=

Parameter queries are a little different than regular queries because they provide information based on a user's input.

__To create a parameter query__:
I hope I've helped!!!
 * 1) //Follow the same steps as creating a regular query// **__except__**:
 * In the "**Criteria**:" section under the field that you have chosen, you need to **ask the program a question**. All parameter questions must be written within __square brackets__ **[ ]**.
 * For //example//:
 * 1) Under the field labeled "**State**," I would type //[What State?]// in the "**Criteria**:" section. By doing so, I can search for client contracts by which state they live in.[[image:http://i13.photobucket.com/albums/a290/oHhsoOseduCtive/par1copy.jpg]]
 * 2) Once you've typed in your question, click on the "**Run**" button to check that your paramter query works.[[image:http://i13.photobucket.com/albums/a290/oHhsoOseduCtive/par21.jpg]]
 * A box should pop up labeled "//Enter Parameter Value//" and includes your parameter question-- in this case, //What State?//. Type in the information that you want to search for-- in this case I chose "//NJ//." Click "**OK**."[[image:http://i13.photobucket.com/albums/a290/oHhsoOseduCtive/par22.jpg]]
 * Your results will show up based on the information that you type in.[[image:http://i13.photobucket.com/albums/a290/oHhsoOseduCtive/par23.jpg]]

by Marianne Diogo INFO273-07