An exciting part of working with a database is extracting information from the table. This is referred as querying the database. This is where databases become very powerful since this allows one to extract the information you want from a database with thousands of records. We will start by setting up a very simple query.
This example query is based on a specific database: click here to open the example database.
For the first query , you wanted to find all the students whose overall progress was a Pass.
First click on the " Queries " button and " Create query by using wizard "

Once the wizard opens , move all the available fields from the box on the left into selected field s (box on the right) by using the arrow buttons as shown in the following screenshots.


Click on Next button (keeping all default settings) until you come to a window which will ask you to save the query.Give the query the title of "progress query" since you are going to use this to search for all student who have an overall progress of pass . Also check the button which says "Modify the query design" and then click on Finish .

You should now see a window as shown in the screen shot below. The query is opened in a "design view". This view allows you to enter the search criteria . You will notice that all the field names appear in the first row. The table from which these field names come from (which is student detail) in the second row. The third row allows you to sort the results. The fourth row "Show" is a tick box which allow to you hide or unhide a field and the final row "Criteria" allow you enter your search criteria.

To search for all students who have passed, enter the word " pass " in the search criteria row under the field name "overall progress" as shown below.

To search for the information, you have to " run " the query. This is done by clicking on the exclamation symbol in the toolbar which will run the query. This should return a result with 3 students as shown in fig. 20. You have just completed your first simple query. In principal, you could have searched information from thousand of records using the same method.

You can also combine searches and set up a second query which will search for all students who have had an overall pass and have also returned their book . Set up a query exactly as down above, save it as " progress books " and enter the search criteria as shown below.

Run the query and you should have 2 records returned once the query has been run as shown below.

|