0% found this document useful (0 votes)
21 views10 pages

Ms Access (Queries) What Is Query?

The document discusses different types of queries that can be created in Microsoft Access including simple, crosstab, find duplicate, find unmatched, update, make table, delete, append, and parameter queries. It also provides steps to design a form in Access including using the form wizard or blank form, adding fields and controls, setting the tab order, and previewing the form.

Uploaded by

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

Ms Access (Queries) What Is Query?

The document discusses different types of queries that can be created in Microsoft Access including simple, crosstab, find duplicate, find unmatched, update, make table, delete, append, and parameter queries. It also provides steps to design a form in Access including using the form wizard or blank form, adding fields and controls, setting the tab order, and previewing the form.

Uploaded by

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

MS ACCESS (QUERIES)

What is Query?
 Query is data request
 Using a query, you can extract information from database table according to particular
condition or criteria
 You can use query to perform any action on data

Type of Query
You can create query using query wizard or query design

Query Wizard
 Simple query
 Crosstab query
 Find Duplicate query
 Find unmatched record

Query design
 Update query
 Crosstab query
 Summary query
 Delete query
 Append query
 Parameter query

Query Wizard
Simple query

The easiest way to create a query may be to use the Simple Query Wizard (although
you may find the Query Design view easy to use also)

STEP:1 Create a “Simple Query” from Rental attribute


STEP:2 Choose attribute “Rental” field in selected field.
STEP:3 choose attributes what u need
STEP:4 Run the query

(DESIGN VIEW) RESULT (DATASHEET VIEW)

Cross tab query


Crosstab queries allow you to summarize data and display it in a cross-tabulation
format, showing row and column headers.
STEP:1 Create a “cross tab query” from “Payment table”
STEP:2 Choose row attribute “Customer Id”
STEP:3 Choose column attribute “Payment type”
STEP:4 Choose calculation “Count”
STEP:5 Run the query

(DESIGN VIEW) RESULT(DATASHEET VIEW)

Find Duplicate query


Find duplicates queries help identify and list records that have duplicate values in one or more fields.

STEP:1 Create record query


STEP:2 Choose a find duplicate record query from “Payment” table
STEP:3 Choose attribute “Rental Id” in selected field inly want to see rental id duplicates
STEP:4 Click on finish

Here we can see Rental id 1120 repeats 2 times and 1124 repeats 3 times

Find unmatched record


Find unmatched queries identify records in one table that don't have corresponding records in
another table, helping you locate missing data.
STEP:1 Create a find unmatched record.
STEP:2 Add both Employees and Rental table to the query
STEP:3 Drag “ID” field in “Employee” table to “Employee Id” field to Rental table
STEP:4 In the join properties dialog, choose the option that include all the records from the
employee table and only matching record from the rentals table
STEP:5 Run the Query.

The result set will display the unmatched employees. These are the employees who exist in
the employees table but not having corresponding records in rental table based on employee’s
table

Query design
Update query
Update queries allow you to modify existing records in a table based on specified criteria.
You can change field values, add or remove data, and more.
STEP:1 Create a new query in the query design view
STEP:2 Add payment table to the query design
STEP:3 Add field “Payment Id”, “Customer Id”, “Payment type” and “Payment status” to
the query grid
STEP:4 In the criteria row the payment status enter “Pending”
STEP:5 Set update value in “updated to” row of the “payment status” field enter successful
STEP:6 Run the query

Make table query


Make-table queries create new tables based on the results of a select query. This can be useful
for creating summary tables or archiving data.
STEP:1 Create a new query in query design view
STEP:2 Add “Tape table”
STEP:3 In the query type group in design tab select make table
STEP:4 Enter a new name for table “Like new”
STEP:5 Design the query add the criteria in tape condition “Like new”
STEP:6 Run the make table query.

Delete Query
STEP:1 Create a new query design view
STEP:2 Add the “Rental” table to the query design
STEP:3 Choose delete query in design tab. Select delete field enter “Returned_late” this will
specify the condition for which record should be deleted
STEP:4 Run the query
Append Query
Append queries add records from one table to another. They're useful for consolidating data
from multiple sources into a single table.
STEP:1 Create a new query in design view
STEP:2 In the “Table name” field enter the name of new table you want to create
“Distributor Archieve”
STEP:3 Add “Distributor archieve” to query design
STEP:4 In the Append to “Row” of the design grid, map the field of from distributor table
corresponding to the field in Distributor archieve
STEP:5 Run the append query
Parameter Query
Parameter queries prompt the user for input when the query is run. They allow for dynamic
filtering of data based on user-defined criteria.
STEP:1 Create a new query in the query design view
STEP:2 Select Distributor table
STEP:3 Give Criteria
STEP:4 Run the query
Summary Query
Summary query, as opposed to a simple query, is used to extract aggregate of data items for a
group of records rather than a detailed set of records. This query type is of particular
importance in accounting because the accounting reports are based on summarisation of
transaction data.
STEP:1 Create a new query wizard in the create tab.
STEP:2 Select the Movie table.
STEP:3 Select the director and rating fields and click on next.
STEP:4 Select the summary option and check the count records checkbox in the prompt that
appears.
STEP:5 Click on next and save the query.
STEP:6 Run the query.
MS ACCESS (FORMS)

What is a form?
A form in Access is a database object that you can use to create a user interface for a database
application. A "bound" form is one that is directly connected to a data source such as a table
or query, and can be used to enter, edit, or display data from that data source.

Open Microsoft Access:

Steps to create Form Design


Choose a Form Design:
Access provides different ways to create a form. You can choose:
Form Wizard: Step-by-step wizard to guide you through form creation.
Add Fields to the Form: If you chose the blank form, add fields to the form by dragging
them from the Field List pane.
To open the Field List pane, click on the "Add Existing Fields" button.
Arrange and Format Controls:
Arrange the controls (fields) on the form.
Resize and align the controls as needed.
You can also format the controls, change fonts, colors, etc.
Add Labels:
Add labels for each field to make the form more user-friendly.
You can add labels from the "Design" tab by selecting the Label control.
Set Tab Order:
Ensure that the tab order is logical for users navigating through the form.
You can set the tab order from the "Design" tab.
Add Buttons and Other Controls:
Include buttons for actions like save, delete, or navigate through records.
Add other controls as needed, such as combo boxes or list boxes.
Apply Themes and Styles:
Access provides themes and styles to enhance the look of your form.
You can apply them from the "Design" tab.
Preview the Form:
Switch to Form View to preview how the form will appear to users.
Make any necessary adjustments.
Save the Form:
Save your form by clicking the "Save" button.
Close the Form:
Close the form design view when you're done.
Test the Form:
Open the form in Form View to test its functionality.
Ensure that data can be entered, modified, and saved correctly.

You might also like