0% found this document useful (0 votes)
12 views6 pages

Computer (Queries in Ms - Access) Summary

The document provides a comprehensive guide on creating and managing queries in MS Access, detailing methods such as using query design view and query wizard. It explains how to perform single table queries, sort data, and apply logical operators for filtering records. Additionally, it outlines steps for saving queries and includes a glossary of key terms related to querying in Access.

Uploaded by

mahika1812
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views6 pages

Computer (Queries in Ms - Access) Summary

The document provides a comprehensive guide on creating and managing queries in MS Access, detailing methods such as using query design view and query wizard. It explains how to perform single table queries, sort data, and apply logical operators for filtering records. Additionally, it outlines steps for saving queries and includes a glossary of key terms related to querying in Access.

Uploaded by

mahika1812
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

CHAPTER-QUERIES IN MS- ACCESS

Queries are fundamental means of accessing and displaying data from


tables.
 Queries can access single or multiple tables
 You can use a query to view a subset of your data or to answer
questions about your data.
 A query can be based on tables or on other queries

CREATING A QUERY
Creating a query can be accomplished by using query design view
or query wizard.

CREATING A QUERY USING QUERY DESIGN VIEW


1) Click on create tab and then click on query design view
2) Open the table in which you are going to create a query in
query design view.
3) Then use the show table dialog box to add the tables or
queries to the query design
4) Use the options in design view to create your query
5) Then click on run button to display the results
6) You can save the query for later use
SINGLE TABLE QUERIES
Single table queries are useful to gain the view of the data in table that:
 Only displays certain fields in output
 Sorts the record in a particular order
 Performs some statics on the record such as calculating the
sum of the data values in a column or counting the no.of
records
 Filters the record by showing only those records that match
some criteria. For Ex- show only those customers who live in
GA
CREATING QUERY USING QUERY WIZARD
1) Click on create tab
2) Then click on Query Wizard button
3) When the new query wizard dialog box appears, select
simple query wizard option and then click on OK.
4) The first step in simple query wizard is to specify the table
for the query and which fields should be displayed in the
query output.
 Three main sections of the step are:
1) Tables/Queries- A pick list of tables or queries you have
created
2) Available fields -only fields created in the table will be
displayed
3) Selected fields- those fields selected from the available
fields will be displayed
 From the list of available fields on the left move the fields you
want over to the selected fields area on the right
 Highlight one of the fields and then click on add field button in
the center between the two areas. Repeat this for each of the
fields to be displayed
 Click on the next button to move to the next and final step in
the simple query wizard
 At this point the wizard will create the new query with the
option either:
1) open the query to view information.
OR
2) modify the query design.
You should select one of these
 Click on finish button
Change from Datasheet view to query design view
After you run a query you can easily come back to the query
designer even make modification to your query or create a new
query
To change to query design view:
 Activate the home tab
 Click the down arrow below view in the views group a menu
appears
 Click on the design view. Access changes to query design view
You can modify your query now.
You can also click the design view button in the lower right corner
of the access window to change to design view.
The query design has two major sections
1) In the top section, the tables used for the query are displayed
along with the available fields
2) In the bottom section, those fields that have been selected for
the use in the query are displayed
Each field has several options associated with it:
 Field - the name of the field from the table
 Table - the table the field comes from
 Sort- the order in which to sort on this field(ascending
descending are not sorted)
 Show -whether or not to display this field in the query output
 Criteria -indicate how to filter the records in query output
 Run the query by clicking on the run button in the results group of
the design tab
 The output will appear
 Finally save and close this query to return to the access main
screen
Modifying query
Modifying query helps to modify the query.
Sort a query
when creating a query, you can sort the rows you retrieve in
ascending or descending order by choosing the option you want to
sort a row in query design.
To perform a sort:
1) Open a table or query in query design view
2) Click the feelings you want to retrieve in order
3) Under the field you want to sort click the down arrow and
choose ascending or descending
4) click the run button access retrieves the columns you chose
and displace the Rows in the order you specified.
You can use logical operators such as =(equal), <>(not equal),
>(greater than), <(less than) etc.
Some important logical operators
LOGICAL OPERATORS
OPERATOR MEANING
= Equal to
<> Not equal to
> Greater than
>= Greater than or equal to
< Less than
<= Less than or equal to
In Equal to any item on the list
Not In not equal to any item on the
list
Between between two values greater
than or equal to one and
less, than or equal to the
other
Not Between not between two values
Is Null the value is missing from
the field
Is not null the value is not missing
from the field
Like like a specified pattern
Not like Not like a specified pattern

To retrieve specific records


 open a table or query in query design view
 choose the field you want to retrieve an order
 choose the field names you want to sort, in the order
 under the field you want to sort, choose ascending or descending
 deselect the show button for columns you do not want to display
 enter your selection criteria on the criteria line
 click the run button. access retrieved in columns you choose and
displace the roles in the order you specified
steps to save a query
 Click on the save button on the quick access toolbar. access is
declining unless you are saving it for the first time. if you are saving
for the first time, save the save as dialog box appears
 Type the name you want to give for your query
 Click OK. Access save your query. You can now access the query by
using the Navigation Pane.
Glossary
a) subset - a part of a larger group of related things
b) wizard - A help feature of a software package that automates
complex tasks by asking the user a series of easy to answer questions
c) Sort - the arrangement of data in prescribed sequence
d) retrieve - to locate and get information
REVISION
 To create a query, click on the creative and then click on query
without button
 To run a query, click on the run button in the results group of design
tab
 You can sort the rows you retrieve in ascending or descending order
by choosing the option you want to sort role in query design view
 To save a query, click on the save button on the quick access toolbar

You might also like