Ms Access 2010 tutorial: query


Query

I. What is Query?

Query is a second object in the 2010 Access. A query is used to append, update data in the table, delete, and retrieve data from a table or a query. You can create a query from a table or tables.

II. How to Create Query

In Microsoft Access 2010, you can create a query in two ways: create a query by using query wizard and create a query buy using query design.

II.1. How to Create a Query by using Query Wizard

In Query Wizard, you can create four types of query including Simple Query Wizard, Crosstab Query Wizard, Find Duplicates Query Wizard, and Find Unmatched Query Wizard. In this tutorial, we introduce you how to create a simple query wizard. To create a simple query wizard follow the steps:

If you are in the opened database

- Click Create tab

- Click Query Wizard

Microsoft Access 2010 Query Design 

A New Query dialog box appears:

Microsoft Access 2010 New Query dialog box 

Simple Query Wizard: Creating a query from the fields you choose.

Crosstab Query Wizard: Creating a query to display data in a two-dimensional format(like a spreadsheet).

Find Duplicates Query Wizard: Creating a query that finds duplicate records in a field of a table or query.

Find Unmatched Query Wizard: Creating a query to find the records in a table that do not exist in another table.

- Click Simple Query Wizard

- Click Ok

A Query Simple Wizard dialog box appears:

Microsoft Access 2010 simple query wizard 

- Click the arrow down of the combo box to select the table or query to create a simple query. Then select the fields that you want to make a query by using Microsoft Access 2010 select one field or Microsoft Access 2010 select all fields button

- Click Next

Another Query Simple Wizard dialog box appears:

Microsoft Access 2010 the last step of simple query wizard 

This dialog box allows you to name the query in the text box and select the options of opening the query to view information and modifying the query design.

Open the to view information: Opening the query in datasheet view.

Modify the query design: Opening the query in design view.

- Click Finish

The query opens in datasheet view if you do not change the default option of opening the query(first option).

Note: In Query Wizard, you can create a query from only one source(a table or query). If you want to create a query from many sources, using Query Design.

II.2. How to Create a Query by using Query Design

You can create many types of query in query design such as select, make table, append, crosstab, update, delete query...etc. To create a query follow the steps below:

If you are in the opened database

- Click Create tab

- Click Query Design

Microsoft Access 2010 Query Design 

A Show Table dialog box appears:

Microsoft Access 2010 Show Table dialog box 

- Click a table you want to create a query

- Click Add

- Click Close

You will see a query window as the figure below:

Microsoft Access 2010 query window 

- Double-click or drag and drop the field that you want to create a query as the figure below:

Microsoft Access 2010 add field to create a query  

- Click View see the result




Comments




This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages:
C, C++, C#, Java, VB.NET, Python, VBA,PHP & Mysql, SQL, JSP, ASP.NET,HTML, CSS, JQuery, JavaScript and other applications such as MS Excel, MS Access, and MS Word. However, we don't guarantee all things of the web are accurate. If you find any error, please report it then we will take actions to correct it as soon as possible.