0% found this document useful (0 votes)
19 views

M06-Operate Database Application

Ghhh

Uploaded by

moges tesfaye
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

M06-Operate Database Application

Ghhh

Uploaded by

moges tesfaye
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 95

Web Development and Database Administration

Level II
Based on March, 2022 Version-I

MODULE TITLE: Operating Database Application


MODULE CODE: EIS WDDBA2 M06 0322
NOMINAL DURATION: 48 Hours

Prepared by: - Ministry of Labor and Skill

September, 2022
Addis Abeba, Ethiopia
Table of Contents

Acknowledgment.........................................................................................................................................4
Introduction of module................................................................................................................................5
Unit one: Create database objects.............................................................................................................6
1.1. Introduction to database object.....................................................................................................7
1.2. Creating database object...............................................................................................................8
1.3. Modifying database object..........................................................................................................10
1.4. Create relationship......................................................................................................................12
Self-check 1...............................................................................................................................................14
Operation sheet 1.1: - Modifying database object................................................................................15
Lap test 1....................................................................................................................................................17
Unit Two : Customize basic setting...........................................................................................................18
2.1 Introduction to customizing Access............................................................................................19
2.2 Adjusting page layout.................................................................................................................19
2.3 . Opening and viewing different toolbars....................................................................................21
2.4 Formatting font as appropriate....................................................................................................24
Self-check 2...............................................................................................................................................25
Unit Three: Create reports....................................................................................................................25
3.1. Introduction to report......................................................................................................................26
3.2. Designing reports in a logical sequence or manner........................................................................26
3.4. Modifying reports...........................................................................................................................27
Self-check 3...............................................................................................................................................33
Operation sheet 3.......................................................................................................................................34
Operation sheet 3.1 Produces access database report................................................................................34
Operation sheet 3.2 Produces selected filed data report............................................................................37
Lap Test 3..................................................................................................................................................38
Unit four : Create Database Forms..........................................................................................................39
4.1. Introduction to forms..................................................................................................................40
4.2. Create a simple form...................................................................................................................41
4.3. Open existing database and modify records using a simple modified form...............................52
4.4. Rearranging objects within the form...........................................................................................57
Self-check 4...............................................................................................................................................62
Operation sheet 4.1 Procedures access database form...............................................................................64

Page 1 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Operation sheet 4.2 Modifying records using a simple modified form.....................................................66
LAP Test 4.................................................................................................................................................68
Unit Five: Retrieve information...........................................................................................................69
5.1. Introduction to retrieve information............................................................................................70
5.2. Access and locate existing database record................................................................................71
5.3. Retrieve information using simple query....................................................................................71
5.4. Retrieve information using multiple criteria...............................................................................73
5.5. Selecting data and display appropriately....................................................................................82
Self-check 5...............................................................................................................................................85
Operation sheet 5.1 retrieve information from access database................................................................86
Operation sheet 5.2 Retrieve information from access database...............................................................88
Lap Test 5..................................................................................................................................................90
Reference...................................................................................................................................................93

Page 2 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Acronym and abbreviations
TTLM Teaching, Training and Learning Materials

DB Database

EIS Economic Infrastructure

M06 module 06

TVET Technical and Vocational Education and Training

WDDBA

2 web development and database application level 2

Page 3 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Acknowledgment

Ministry of Labor and Skills wish to extend thanks and appreciation to the many representatives of
TVET instructors and respective industry experts who donated their time and expertise to the
development of this Teaching, Training and Learning Materials (TTLM).

Page 4 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Introduction of module
A database can best be described as a way of storing large amounts of information. The data can be
retrieved and we can even ask questions of the data and get answers. For example: You may want to
know how many Students enrolled in every occupational level. MS Access is a database management
tool that enables one to store relevant data. This also has the capabilities to retrieve, sort, summarize
and report results immediately and effectively. It can combine data from various files (tables) through
creating relationships, and can make data entry more efficient and accurate through the use of forms.
Generating stored files from the database using selecting query and preparing report based on selection
criteria.
To use the above function of the database the user must use Microsoft office access 2010 and above.
This module is designed to meet the industry requirement under the Web Development and Database
Administration occupational standard, particularly for the unit of competency: operating database
application
This module covers the units:
 Create database objects
 Customize basic settings
 Create reports
 Create forms
 Retrieve information
This guide will also assist you to attain the learning outcome stated in the cover page. Specifically, upon
completion of this Learning Guide, you will be able to: -
 Create database objects
 Adding and modify data in a table
 Customize database layout, format and viewing
 Design report
 Modify the report and distribute to other person
 Create form and rearranging objects within the form
 Retrieve information using different types of query language
 Retrieve information using multiple criteria

Page 5 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Unit one: Create database objects

This unit is developed to provide you the necessary information regarding the following content
coverage and topics:
 Introduction to database object
 Creating database object
 Modifying database object
 Creating relationship

This unit will also assist you to attain the learning outcomes stated in the cover page.
Specifically, upon completion of this learning guide, you will be able to:

 Define database object


 Create database object
 Modify database object
 Create relationship

Page 6 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
1.1. Introduction to database object

Database objects are components that save and query information. A database contains objects that are
used to store and display large, relational data.
 Important Terms and Basic Objects
Now in this Microsoft Access tutorial, we will learn about some important terms and basic objects in
MS Access:
 Database File:
It is a file which stores the entire database. The database file is saved to your hard drive or other storage
devices.
 Datatypes:
Datatypes are the properties of each field. Every field has one datatype like text, number, date, etc.
 Table: - A Table is an object which stores data in Row & Column format to store data.
 A Table is usually related to other tables in the database file.
 Each column must have Unique name
 We can also define Primary Key in a table.
 Query: - Queries answer a question by selecting and sorting and filtering data based on
search criteria.
 Queries show a selection of data based on criteria (limitations) you provide.
 Queries can pull from one or more related Tables and other Queries.
 Types of Query can be SELECT, INSERT, UPDATE, DELETE.
 Form: - A form is a database object that you can use to create a user interface for a
database application.
 Forms help you to display live data from the table. It mainly used to ease the
process of data entry or editing.
 Report: -A report is an object in desktop databases primarily used for formatting,
calculating, printing, and summarizing selected data.
 You can even customize the report’s look and feel.
 Macros: - Macros are simply shortcuts. If you've ever used macros in MS Word or Excel, then
you are already familiar with what they do. You can create a macro to execute a task that you
would otherwise execute with your keyboard or mouse.
Page 7 of 98 Ministry of Labor and Operating Database Version -1
Skills
Author/Copyright Application September , 2022
1.2. Creating database object

 Create database object


Before you can create objects such as tables and forms, you must first create the database file in which
they will be stored.
1. On the File tab select New.
2. Click on Blank database.
3. In the File Name box, type a name for your database.
4. Click on the browse button to the right of the File name box to browse for a location for your
database.
5. Click on Create.
A new database will be created with a new default Table.
6. Click on Design View to start working with this Table.

 Create table object


Tables are the fundamental objects in a database. Without any tables, no data can be stored. To create a
table, you need to follow these steps:
Page 8 of 98 Ministry of Labor and Operating Database Version -1
Skills
Author/Copyright Application September , 2022
1. Create the table object
2. Define the fields in the table including their name, data type and description
3. Set the properties for each field
4. Create appropriate indexes
5. Set the primary key
6. Save the table
 Create a table in design view
On the Create tab, click on Table Design. A new table will appear in design view.
There are three main parts to the design
view window.
Upper pane
For defining fields by name, data type and
description (optional).
Field properties (bottom left)
For defining specific properties for a field.
Help (bottom right)
As you move around the
design view window, context specific help
is provided here.
Defining fields before creating the fields in a table, the following information about naming, data types
and descriptions should be considered:
Field naming rules and conventions
The following conventions should be observed when naming fields:
 Field names are mandatory. They may contain up to 64 characters.
 Names may include embedded (but not leading) spaces and punctuation except full stops,
 exclamation marks and square brackets.
 You cannot assign the same field name to more than one field in the same table and it is good
 practice to use a unique field name for each field in the entire database.
 It is not good practice to include spaces in field names. Instead, use an underscore ( _ ) for spaces to
improve the readability of field names.

Page 9 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
 Minimizing the length of field names conserves resources and saves typing when you refer to the
field name in macros, etc.
 Avoid specifying a name for a field that could cause a conflict with a built-in Access function or
property names (e.g. ‘name’, ‘date’, etc.).

1.3. Modifying database object

It is possible to modify the design of your table and fields at any time by going to design view and
making the required changes. However, any changes made after data has been added to the table may
cause loss of data. Changes to field names, data types and properties may also impact on other objects
which are linked to or based on the table.
 Adding and removing fields
You can modify the structure of your table by adding and removing fields in design view. Note,
however, that using the cut, paste or delete functions will remove the field and any data in that field.
 Selecting fields
To select a field, click on the row selector to the left of the field name. To select multiple fields, click on
the row selector and drag the mouse down the selector symbols to select additional fields. The screen
capture below shows a table with two fields selected.
 Deleting fields
1. Select the field or fields to be deleted using the row selector.
2. Press the Delete key on the keyboard, select Delete Rows from the Design tab or right-click on

Page 10 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
the row selector and choose Delete Rows.
 Inserting fields

1. Click in the field above which you wish to insert a new row.
To insert multiple rows, select the required number of rows using the row selector.
2. Select Insert Rows from the Design tab or right click and choose Insert Rows.
 Moving fields
1. Select the field or fields to be moved.
2. Click on the selected field(s) and drag the mouse to the new location for the field(s). As you drag, a
bold black line will appear indicating where the fields will be moved to if you release the mouse button.
3. Release the mouse button in the appropriate location.
Helpful hint: Don’t use cut and paste to move fields if you have data in the table as this will delete the
data.
 Changing data type
1. If your table contains data, make a backup copy of the table before you change data types or field
sizes.
2. Open the table in design view.
3. Click the data type column of the field you want to change, click the drop down arrow, and select the
new data type.
4. Click the Save button on the Quick Access toolbar.
Helpful hint: If the data type conversion would result in lost values, Access displays a message telling
you that errors occurred during conversion before it actually saves the changes. Click Cancel to cancel
the changes. Click OK to continue and save the changes anyway.
In large tables, changing a Data Types might take a long time. If you want to cancel the conversion
process at any point while it is running, press Ctrl+Break, and then click OK.
 Changing field size
If you convert a large field size setting to a smaller one in a field that already contains data, you might
lose data in the field. For example, if you change the field size setting for a text data type field from 255
to 50, data beyond the 50 characters will be discarded.
If the data in a number data type field doesn't fit in a new field size setting, fractional numbers may be
rounded or you might get a null value. For example, if you change from single to integer data type,

Page 11 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
fractional values will be rounded to the nearest whole number and values greater than 32,767 or less
than -32,768 will result in null fields.

1.4. Create relationship

A relationship in Access helps you combine data from two different tables. Each relationship
consists of fields in two tables with corresponding data.
 Primary key
A primary key is a single field or combination of fields in a table that uniquely identifies each record in
that table. No two records can have the same value in the primary key field or combination of fields.
It is advisable to create the primary key before entering data in a table because Access will prevent
duplicate values being created in the designated field. It is particularly important to set a primary key
when creating relationships between tables as Access uses it to link tables together.
Helpful hint: Records are displayed in primary key order by default.
 Setting a primary key
1. Click on the appropriate field name and click the Primary key button on the Design tab.
2. The primary key symbol will appear on the button in the row selector box on the
appropriate row (see the screen capture on previous page).
 Setting a multiple field primary key
With a multiple-field primary Key, the combination of the contents of all fields included in the key must
be unique. For example, for a primary key based on the CourseID and CourseDate fields, the same
CourseID and CourseDate combination cannot appear in more than one record.
 A foreign key
A foreign key is a field (or fields) in one table that references the primary key in another table. The data
in the fields from both tables is exactly the same, and the table with the primary key record (the primary
table) must have existing records before the table with the foreign key record (the foreign table) has the
matching or related records. Like primary keys, you can define foreign keys in the table declaration by
using the CONSTRAINT clause.
There are essentially three types of relationships:
 One-to-one: - For every record in the primary table, there is one and only one record in the
foreign table.

Page 12 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
 One-to-many: - For every record in the primary table, there are one or more related records in the
foreign table.
 Many-to-many: For every record in the primary table, there are many related records in the
foreign table, and for every record in the foreign table, there are many related records in the
primary table.
 Referential integrity
Referential integrity is a system of rules that Access uses to make sure that relationships between
records in related tables are valid, and that you do not accidentally delete or change related data. You
can set referential integrity when all the following conditions are true:
 The matching field from the primary table is a primary key or has a unique index.
 The related fields have the same data type. There are two exceptions. An AutoNumber field
can be related to a Number field that has a FieldSize property setting of Long Integer, and
an AutoNumber field that has a FieldSize property setting of Replication ID can be related to
a Number field that has a FieldSize property setting of Replication ID.
 Both tables belong to the same Access database. If the tables are linked tables, they must be tables in
Access format, and you must open the database in which they are stored to set referential integrity.
Referential integrity cannot be enforced for linked tables from databases in other formats.

Page 13 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Self-check 1

Part I: - Select the best answer from the given alternative


_______1. which object is stores data in Row & Column format to store data.

A. Form C. Report
B. Table D. All

_______2. database object that you can use to create a user interface for a database application.

A. Macros C. Report
B. Form D. All

_______3. Which one is a single field or combination of fields in a table that uniquely identifies each
record in that table

A. Primary key C. Super key


B. Foreign key D. All

_______4. Which one is a field (or fields) in one table that references the primary key in another table

A. Foreign key C. Primary key


B. Referential integrity D. Super key

_______5. Which one of the following is used in access helps you combine data from two different
tables?

A. Foreign key C. Primary key


B. Referential integrity D. Relationship

Page 14 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Operation sheet 1.1: - Modifying database object
 Operation Title: creating database and table

 Purpose: - create and modify table filed


 Instruction: Using the figure below and given equipment. You have given 20 minute for the task
and you are expected to complete tasks.
 Tools and requirement:
 Computes
 MS office access 2016
 Use the following information
Database name Woreda one
Table name Customer
Filed name Data type size
Student name Short Text 50
Gender Short Text 8
Age Number Long Integer
Level Short Text 3
Grade Short Text 5
Registration Date Date
 Steps in doing the task
Step 1: - create database and table (open access 2016 and click on black desktop database)
Step 2:- Give database name and click on create

Page 15 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Step 3: - Right click on Table 1 and click on “save”
Step 4: Give table name and click on “ok”

Step 5:- Right click on table name customer and select design view

Step 6: - Insert the filed name in to table with datatype and size

Step 7: - Right click on table name and select datasheet view and click on “Yes”

Page 16 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
The last out but is like this

Quality criteria: - create modified datasheet view

Lap test 1

Based on the below information perform the following task

Database name College


Table name Employee
Filed name Data type Size
Employee name Short Text 50
Gender Short Text 8
Age Number Long Integer
Level Short Text 3
Salary Short Text Format (General Number)
Department Short Text 30

Task 1: - create database, table and save in desktop

Task 2:- Insert filed name with appropriate datatype and size or format

Task3:- Display the table in datasheet view

Page 17 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Unit Two : Customize basic setting

This unit is developed to provide you the necessary information regarding the following content
coverage and topics:
 Adjusting page layout
 Opening and viewing different toolbars
 Formatting font as appropriate

This unit will also assist you to attain the learning outcomes stated in the cover page.
Specifically, upon completion of this learning guide, you will be able to:

 Adjust page layout of access


 Open and view toolbars
 Format fonts

Page 18 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
2.1Introduction to customizing Access

You can set database options that can be used to modify the design of Access desktop database objects
by clicking File, Options, and then Object Designers. You can set design options for table, form,
report, and query designs from this centralized Access Options location, although most of the settings
are ignored in the table Datasheet and Layout views. You can also customize the selected error checking
settings from this category.
The Ribbon the strip across the top of the program window that contains groups of commands — is a
component of the Microsoft Office Fluent user interface. The Office Fluent user interface provides a
single home for commands in Access.
As you begin to build more advanced applications with Access, you might decide that you want to
customize the Office Fluent Ribbon in order to make an application easier to use. For example, you can
hide some or all of the default tabs so that users cannot use certain commands, and you can create new,
custom tabs that contain only the commands that you want to be available.

The three main components of the Access user interface are:

 The ribbon is the strip of tabs across the top of the program window that contains groups of
commands.

 The Backstage view is the collection of commands that you see on the File tab on the ribbon.

 The Navigation Pane is the pane on the left side of the Access program window that lets you
work with database objects.
2.2 Adjusting page layout

 Layout view

Layout view is the most intuitive


view to use for report
modification, and can be used for
nearly all the changes you would
want to make to a report in
Page 19 of 98 Ministry of Labor and Operating Database Version -1
Skills
Author/Copyright Application September , 2022
Access. In Layout view, the report is actually running, so you can see your data much as it will appear
when printed. However, you can also make changes to the report design in this view. Because you can
see the data while you are modifying the report, it's a very useful view for setting column widths, add
grouping levels, or performing almost any other task that affects the appearance and readability of the
report. The following illustration shows a student report in Layout view.
 Design view
Design view gives you a more detailed view of the structure of your report. You can see the header and
footer bands for the report, page, and groups. The report is not actually running in Design view, so you
cannot see the underlying data while working; however, there are certain tasks you can perform more
easily in Design view than in Layout view. You can:
 Add a wider variety of controls to your report, such as labels, images, lines, and rectangles.
 Edit text box control sources in the text boxes themselves, without using the property sheet.
 Change certain properties that are not available in Layout view.
The following illustration shows a student file report in Design view.

Figure 2. 2 Design view of report


2.3. Opening and viewing different toolbars

In this lesson, you will familiarize yourself with the Access environment, including
the Ribbon, Backstage view, Navigation pane, Document Tabs bar, and more. You will also learn
how to navigate with a navigation form, if your database includes one.
Access 2016 uses the Ribbon to organize commands, just like in Access 2013 and 2010. If you've used
these versions before, Access 2016 will feel familiar. But if you are new to Access or have more
Page 20 of 98 Ministry of Labor and Operating Database Version -1
Skills
Author/Copyright Application September , 2022
experience with older versions, you should first take some time to become familiar with the Access 2016
interface.
Note: - Click the buttons in the interactive below to become familiar with the Access interface.
 Ribbon
Access uses a tabbed Ribbon system instead of traditional menus. The Ribbon contains multiple tabs,
each with several groups of commands. For example, the Clipboard group on the Home tab contains
commands such as Cut, Copy, and Paste.

Figure 2. 3Access ribbon


Some groups also have a small arrow in the bottom-right corner that you can click for even more
options.

The Quick Access Toolbar, located above the Ribbon, lets you
access common commands no matter which tab you are on. By
default, it shows the Save, Undo, and Redo commands. If
you'd like, you can customize it by adding additional
commands.

Figure 2. 4 Quick Access Toolbar

Page 21 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Note that the Save command only saves the current open object. In addition, the Undo command will
not undo certain actions, like adding a record. Pay close attention to your information when using
the Undo command to make sure it has the desired effect.
 Backstage view
Backstage view gives you various options for saving, opening, and printing your database.
 To access Backstage view:

1. Click the File tab on the Ribbon. 2. Backstage view will appear

Figure 2. 5 Backstage view

 Navigation pane

The Navigation pane is a list containing every


object in your database. For easier viewing, the
objects are organized into groups by type. You
can open, rename, and delete objects using
the Navigation pane.

To minimize and maximize the Navigation pane:


The Navigation pane is designed to help you manage all of your objects; however, if you feel that it
takes up too much of your screen space, you can minimize it.

1. To minimize the Navigation pane, click the double arrow in the upper-right corner.

Page 22 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
2. The Navigation pane will be minimized. Click the double arrow again to maximize it.

2.4 Formatting font as appropriate

Remarks. The FontSize property uses the following settings.


(Default for all reports and controls except command buttons)
The text is 8-point type.
The Short Text and Long Text (also called Memo) data types
do not have predefined formats. The Short Text data type has
only custom formats. The Long Text data type has both custom
and Rich Text formatting. If you don't specify a format, Access
left aligns all text in datasheets.
Typically, you apply custom formats to Short Text and Long
Text data types to make the table data easier to read. For
example, if you use a form to collect credit card numbers, and
you store those numbers without spaces, you can use a custom
format to add the appropriate spaces to make the credit card numbers easier to read.
Custom formats for Text fields can have up to two sections. Each section contains the format
specification for different data in a field.
Setting Description
8 (Default for all reports and controls except command buttons) The text is 8-point
Page 23 of 98 Ministry of Labor and Operating Database Version -1
Skills
Author/Copyright Application September , 2022
type.
10 (Default for command buttons) The text is 10-point type.
Other sizes The text is the indicated size.

Table 2. 1 Default value of text and buttons

Self-check 2

Part I: - Select the best answer from the given alternative

___1. Which one of the following in the maximize size of text data?
A. 256 C. 255
B. 1010 D. 1000

___2. Which one is a strip across the top of the program window that contains groups of
commands
A. Ribbon C. Folder
B. Toolbar D. File
___3. ____ is the pane on the left side of the Access program window that lets you work with
database objects.
A. Navigation Pane C. Backstage view
B. Ribbon D. All
___4. Which one is the most intuitive view to use for report modification
A. Layout view
B. Design view
C. Datasheet view
D. All
___5. Which one data type has both custom and Rich Text formatting.
Page 24 of 98 Ministry of Labor and Operating Database Version -1
Skills
Author/Copyright Application September , 2022
A. Long Text
B. Short Text
C. Number
D. All

Part II: - Give short answer for the following questions


1. List and explain types access environment?
2. Discuses types of datatype used in access 2016?
3. What is the main advantage of Quick Access toolbar?

Unit Three: Create reports


This unit is developed to provide you the necessary information regarding the following content
coverage and topics:
 Introduction to report
 Design reports in a logical sequence or manner
 Modifying reports
 Distributing reports to appropriate person in approved format

This unit will also assist you to attain the learning outcomes stated in the cover page.
Specifically, upon completion of this learning guide, you will be able to:
 Design reports to present data in a logical sequence or manner.
 Modify reports to include/exclude additional requirements.
 Distribute reports to appropriate person in an approved format.

3.1. Introduction to report

Page 25 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
The good news is reports in Access are just like any other reports you would create. Reports organize
and present information from your database in an attractive and easy-to-read format. You can print or
display these reports for yourself or to share with others. You can create single or multiple column
reports.
Reports are very similar to forms, but they are more static. You can think of a report as something that
would be a preview of a printout. Creating reports is similar to creating forms. A report can be based on
a table or query and we can have sub reports, just like with forms. In the sections that follow, we will
look at some examples of reports.
Different Views of report:
 Print Preview: -allows you see what the report would look like on a printed piece of paper
 Report View:-allows you to see the data without having to display it in Print Preview
 Layout View: - allows you make design changes while browsing your data
 Design View: - gives you a more detailed view of the structure of your report

3.2. Designing reports in a logical sequence or manner

A report can be created by selecting Create  Report on the ribbon. The table or query that is selected
in the object browser when we press Create Report will become the record source of the report. As
with forms, reports can be created in other ways (as blank reports or with the help of a wizard). In this
section we will just look at the simplest type which is a report based on one table. We can select the
table Student in the object browser and press Create Report on the ribbon. The new report will look
like this:

Page 26 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Figure 3. 1 Simple report View

3.4. Modifying reports

A report is an object in MS Access that is designed for formatting, calculating and printing selected data
in an organized way. It contains information from tables and also information that are there in the report
design. Reports are helpful as they allow you to present all information of your database in an easy-to-
read format.
Formatting reports is one of the strengths of reports is that you can modify their appearance to make
them look how you want. You can add headers and footers, apply new colors, and even add a logo. All
of these things can help you create visually appealing reports.
Let’s take an MS Access databases example of ‘Contact’ DB default report – ‘Phone Book.’
Step 1) Click on ‘Phone Book’ under ‘Report’ section. The system will open the inbuilt ‘Phone Book’
report. It will display Contact Name, Home, Business and Mobile name displayed for each record
present.

Page 27 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Step 2) Now suppose that we want to edit the report Heading from ‘Home’ to ‘Home
Number.’ Right click and click on ‘Design View.’

Figure 3. 2 Design view of report


The system will open the Report in Design view.

Step 3) Edit the name you want to update and Press ‘Ctrl+S’.

Page 28 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Step 4) Double click ‘Phone book’ under reports
Result: Label is updated from ‘Home’ to ‘Home Phone.’

 Report Wizard

This tool makes it easier to create reports from multiple tables and multiple queries.
In the Create tab Reports group Report Wizard :

Page 29 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Figure 3. 3 Report Wizard
Select the field you want to appear in the report  click the right arrow  click Next :

 Sort data in reports: - Click the arrow as


shown, select the name of the first field you
want to sort, then select the Ascending or
Descending sort on the right.
 You can arrange up to 4 fields, the sort will be
applied one by one from top to bottom, the
first sort will be main. When satisfied with the
layout you created, click Next.

 Choose layout and report title


 Click on the layout option to see what they look like, choose the one that’s suitable for use.
Page 30 of 98 Ministry of Labor and Operating Database Version -1
Skills
Author/Copyright Application September , 2022
 Select vertical or horizontal rotation for the report.

 When satisfied with the layout of your report, click Next, enter a title for the report, select whether
you want to preview or modify its design, and then click Finish.
3.5. Distributing reports to appropriate person in approved format
3.5.1. Distribute a report
Liberate your Access reports and distribute them far and wide. For example, email them to one or more
users, export them to SharePoint document libraries, and archive them on network folders. When you
distribute an Access report, you create a static report of data at a certain moment in time, such as daily,
weekly, or monthly. By doing so, you have a single point of truth that information workers can use to
make good business decisions, answer questions, find alternatives, determine best plans, evaluate risks,
and improve quality.

Figure 3. 4 Distribute a report

Note :- When you create the report, add a publication date. This helps users confirm the correct time
the report was created.

Steps to Send a report by using the Email command

Page 31 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
One of the fastest ways to distribute a report is by using the Email command. With just a few mouse
clicks, Access exports the report, and then creates a new e-mail message with the file attached to it.
1. In the Navigation Pane, select the report that you want to send.
2. Select External Data Email.

3. In the Send Object as dialog box, select the


output format that you want to use, such
as PDF, and then click OK.

Note:- Although there are a variety of formats you can select, consider using Portable Document
Format (PDF) which has become a defacto standard, preserves the layout and format of the original
Access report, and has built-in ways to customize the pages for viewing and printing.

4. Access opens a new e-mail message in Outlook with the file attached.
5. Type the recipients' e-mail addresses in the To and Cc boxes, a description in the Subject box, and a
message in the message area.
Tip By default, the file that you send by using this method is not saved on your computer. If you want
to save a copy of the file on your computer, right-click the attachment in the Attached box, and then
select Save As.
6. Select Send.

Self-check 3

Part I: - Select the best answer from the given alternative

Page 32 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
1. ____ is an object in desktop databases primarily used for formatting, calculating, printing, and
summarizing selected data.

A. Form C. Query
B. Report D. All

2. Which one of the fastest ways to distribute a report to other person?

A. Email command C. Gmail


B. Outlook D. All

3. Which one of the following is the advantage of design report?

A. Add header on the report C. Easily to read and view


B. Change the field of the report D. All

4. ___is one of the strengths of reports is that you can modify their appearance to make them look
how you want.
A. Formatting reports
B. Report view
C. Display view
D. All
5. How many fields are used for sorting access database data report
A. 5 Fields
B. 4 Fields
C. 3 Fileds
D. 1 filed
7. Which one of the following is the advantage of design report?
A. Add header on the report
B. Change the field of the report
C. Easily to read and view
D. All

Part II: - Give short answer for the following question


1. What is the advantage of report in access database?
2. What is the main purpose to use modification of report design in access?

Page 33 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Operation sheet 3

Operation sheet 3.1 Produces access database report

 Operation Title: create database report

 Purpose: To produce student report


 Instruction: Using the figure below and given equipment. You have given 30Minut for the task and
you are expected to complete tasks.
 Tools and requirement:
 Computes
 MS office access 2016
 Use the following data

Grad
Student name Gender Age Level e
Tolosa Mohammed M 20 V C
Biruk Teshome M 19 II NYC
Astir Getnet F 17 IV C
Chaltu Solomon F 18 I C
Kedir Mehamed F 18 I NYC
Note :- Give appropriate data type for the above field
 Steps in doing the task
Step 1: - Create database called college and table student
Step 2: - Insert the above given data

Page 34 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Step 3: - Click on create then click on Report
Step 4:- Press “CTRL + S” to save the report and give name “student report”.

Step 5:- Right click on report table name and select Report view then print preview

Page 35 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
 Quality Criteria: - produce student report

Operation sheet 3.2 Produces selected filed data report


Page 36 of 98 Ministry of Labor and Operating Database Version -1
Skills
Author/Copyright Application September , 2022
 Operation Title: create data report

 Purpose: To produce a report using some filed of the table


 Instruction: Using the figure below and given equipment. You have given 20Minut for the task and
you are expected to complete tasks.
 Tools and requirement:
 Computes
 MS office access 2016
 Use the following data

Grad
Student name Gender Age Level e
Tolosa Mohammed M 20 V C
Biruk Teshome M 19 II NYC
Astir Getnet F 17 IV C
Chaltu Solomon F 18 I C
Kedir Mehamed F 18 I NYC
Note :- Give appropriate data type for the above field
 Steps in doing the task
Step 1:- Use the above operation sheet of 4.1 steps 1 and 2
Step 2:- Select the table name and click on create Report wizard

Step 3: - select and move the field and click on Next Next Next  sort by “ID”

Page 37 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
S
tep 4:- Select the Layout “columnar, Tabular, Justified ’ and orientation “ portrait or landscape ”

Step 5: - Give report name and click on “Finish”.

Note :- This is the last output of the student using report wizard and using specific filed of the table
 Quality Criteria:- Create student report using Report wizard

Page 38 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Lap Test 3

Based on the below information prepare employee report


Database name
Table name Employee
Filed name Data type
Id No Number
Employee name Short Text
Gender Short Text
Age Number
Level Short Text
Salary Short Text
Department Short Text
Phone number Number

Id_No Employee name Gende Age Level Salary Department Phone number
r
Ep_01 Tale Ayemew M 34 B 8078 Auto 0912312231
Ep_02 Ayenalem Baye F 35 A 10231 ICT 0924535142
Ep_03 Dawit Slemon M 43 A 8012 GMF 0923234342
Task 1: - Create the above database and table and save on desktop
Task 2: - Insert the above data into your data
Task 3: - Using report wizard and use any three filed of the table prepare employee report

Page 38 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Unit four : Create Database Forms

This unit to provide you the necessary information regarding the following content coverage
and topics:
 Creating a form
 Modify database forms
 Rearrange object with form

This guide will also assist you to attain the learning outcomes stated in the cover page.
Specifically, upon completion of this learning guide, you will be able to:
 Use wizard to create a simple form
 Open and record existing database through a simple form modified
 Rearrange objects within the form to accommodate information requirements

Page 39 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
4.1. Introduction to forms

Forms can be used both for adding and editing data, as well as for browsing and presenting data.
In Access 2016, a form is an object that generally serves three purposes:
1. To allow users to perform data entry. Data can be inserted, updated, or deleted from a
table using a Form object.
2. To allow users to enter custom information, and based on that information perform a
task. For example, you may want to ask a user for parameters before running a report.
3. To allow users a method of navigating through the system. For example, you may
create a form where a user can select a form to load, a report to run, etc.
 Plus, to that of the above purposes a form is: -
 A form is a database object that you can use to create a user interface for a database
application.
 It mainly used to ease the process of data entry or editing.
 Data in a form can be selected from one or more tables.
 Forms can also be used to control access to data, like which fields or rows of data are
visible to which users.
 Forms have a Form View.
 Help you to display live data with easy creation of new data.
To create access 2016 database form you must select the create tab in the toolbar at the top of
the screen. Then click on the form design button in the forms group. To view the form property
of Access 2010 database, select the design tab in the toolbar at the top of the screen. Then click
on the property sheet button in the tools group. When the Property Sheet appears,
select Form from the drop down if it is not already selected. You should now see the properties
for the Form object.
It is also primarily being used to enter or display data in a database. You can also use a form as a
switchboard that opens other forms and reports in the database, or as a custom dialog box that
accepts user input and carries out an action based on the input.
 A data-entry form
 A switchboard form

Page 40 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
 A custom dialog box

4.2. Create a simple form

There are four primary ways to create the form as mentioned below:
1. Form Wizard 3. Multiple Item
2. Default Form 4. Split Form

Let’s have a look at each option to create the form, one by one:
1. Create using Form Wizard
The wizard lets you make decisions about certain aspects of a form's design and produces a form
based on your instructions. The form wizard gives you more control over your results than one-
click forms do. The wizard lets you make decisions about certain aspects of a form's design and
produces a form based on your instructions. To create a form based on a single table using the
Form Wizard, follow these nine steps.
Note: -This feature works the same in all modern versions of Microsoft Access: 2010, 2013,
and 2016.

This option allows the user to create the form with the wizard and select the column from the
available list of column form in legacy Select window format.
Step 1) Click on ‘Form Wizard.’

Page 41 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Figure 4. 1 Form Wizard
Step 2) System will display below the screen.

Step 3) Select the columns which you want to be there in final form.

Result: ID is selected

Page 42 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Step 4) Keep selecting all required column as explained in Step 3 above and then click ‘Next.’

Step 5) Layout selection box will appear which allows the user to select the different type of
form layout. Click ‘NEXT’

Step 6) Enter the name of the form as “Contact_Form” and click ‘Finish.’

Page 43 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Result: Contact_Form now exist with all column displayed which are there in step 4 in the
Selected column list.

Figure 4. 2 finale data insert form


To navigate and input records

2. Create using Form

Page 44 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
It is the simplest way to create the form which will:

 By default, populate all the column from the selected table in ‘form view,’
 The user can delete non-required column manually

Step 1) Select the table for which we want to create the form and click on ‘Form.’

Step 2) Below window will appear.

Step 3) Right-click on any cell which we don’t want to be part of final forms and click on
‘Delete.’

Page 45 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Result: ‘Fax Number ‘field does not exist now.

Step 4) Press ‘Ctrl+S’ and enter new Form Name as ‘Contact_Form2’. Click ‘OK’.

Result: New form with the name as ‘Contact_Form2’ exists under the “Forms” section.

Page 46 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
3. Create form by ‘Multiple Item.’
It is another type where in a ll the records already created will be displayed in Form with an
option to Add new record.
Step 1) From the ‘Create’ tab. Click on ‘More forms’ and select ‘Multiple Items.’

Result: Below Multiple lines, the window will appear

Step 2) Press ‘Ctrl+S’. Enter the new form name and click ‘OK.’
Page 47 of 98 Ministry of Labor and Operating Database Version -1
Skills
Author/Copyright Application September , 2022
Result: New Form with the name as ‘Contact_Form_Multiple_Item’ exists under the “Forms”
section.

4. Create form by ‘Split from’.


It is a mix of simple form and split form in a way that this form provides the view of Form and
datasheet in a split window.
Whatever the user enters in Form is visible directly in Datasheet view immediately and vice
versa.
Step 1) From the ‘Create’ tab, click on ‘More forms’ and select ‘Split Form.’

Page 48 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Figure 4. 3 Create form by Split from
Result: Below window will appear with the Form and data sheet together.

Step 2) Press ‘Ctrl+S’ and enter the new form name. Click ‘OK.’

Page 49 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Result: New Form with the name as ‘Contact_Form_Split’ exists under the “Forms” section.
4.3. Open existing database and modify records using a simple modified
form

4.3.1 Opening existing database


Different Views of form:
Form View: - this view allows you to view, create and edit records.

Layout View: - this view is similar to Design View but is more visually-
oriented in that each control displays real data. As a result, this is a very useful
view for setting the size of controls, or performing many other tasks that affect the visual
appearance and usability of the form.
Design View: - this view gives you a more detailed view of the structure of
the form. You can see the header, detail, and footer sections for the form.
You cannot see the underlying data while you are making design changes.
To open an existing form:
1. Open your database and locate the Navigation pane.
2. In the Navigation pane, locate the form you want to open.

Page 50 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
3. Double-click the desired form.
4. It will open and appear as a tab in the Document Tabs bar.

4.3.2 Add a record to a Form.


 Forms also give the flexibility to Add records.
 Again, this is a user-friendly and appealing way of adding records as compared to adding
records in a row form.
 Here, we will take the Microsoft Access databases example of Split from
‘Contact_Form_Split’ created above.
Step 1) Open ‘Contact_Form_Split’

Step 2) To Add record, click on ‘New (blank) Record Icon.’

Page 51 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Result: New record window appear in:

1. Form View and


2. Datasheet View.

Step 3) Manually fill the data from Form. Note that in split form all data will be automatically
reflected in below data sheet as well.

Page 52 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Step 4) Double Click on ‘Contact’ table.

Result: New Record updated to ‘Contact’ Table added from Form


‘Contact_Form_Multiple_Item’

Page 53 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
4.3.3 Modifying records using a simple modified form
 One of the features of forms is that we can edit the values and data directly from the
form.
 It is more user-friendly because as compared to row format in the table, forms have better
visibility of selected fields and the user can do the direct updates.
 These values updated from forms will also be reflected in original tables immediately.

Let’s have a look at how to edit value from the form:


Step 1) Click on ‘Contact Form’

Step 2) Update some values on ‘Contact_Form’ value

Step 3) Double Click on ‘Contact’ table.

Result: Updated value is present in the original table record.

Page 54 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
4.4. Rearranging objects within the form

The Rearrange objects commands make permanent changes in your form. Save a copy of your
form before making such changes. Rearranging the page order in the design form work screens.
Do one of the following: On the Arrange tab, in the Table group, click the layout type that you
want for the new layout (Tabular or Stacked).default, when you create a new form by using one
of the form tools on the Create tab, or when you add fields to a form while it is open in Layout
view, Access puts text boxes and other controls in guides called layouts. A layout, indicated by
an orange grid around the cons you align controls horizontally and vertically to give the form a
uniform appearance. The following illustration shows a "stacked" layout on a form that is open
in Layout view:
To move a field:
1. Locate the field you want to move, then hover your mouse over the bottom border of the field
header. The cursor will become a four-sided arrow. Hovering the mouse over the field.
2. Click and drag the field to its new location. Moving a field.
3. Release the mouse. The field will appear in the new location.
Although layouts can help you quickly create and modify a form, in some cases, you might
prefer having the ability to move and size controls
independently. This article describes how to remove controls
from layouts, after which you can move and resize them
without affecting other controls.

Page 55 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
 Move layouts
After splitting one layout into two, the two layouts might overlap. To move a layout:
1. Select any control in the layout.
2. Press and hold the CTRL key.

3. Drag the layout by using the layout selector at the upper-left corner of
the layout.

4.4.1 Command buttons for form


Access offers several options that let you make your forms look exactly the way you want. While
some of these options like command buttons are unique to forms, others may be familiar to you.

If you want to create a way for users of your form to quickly perform specific actions and tasks,
consider adding command buttons. When you create a command button, you specify an action
for it to carry out when clicked. By including commands for common tasks right in your form,
you're making the form easier to use.
Access offers many different types of command buttons, but they can be divided into a few main
categories:

 Record Navigation command buttons, which allow users to move among the
records in your database.
 Record Operation command buttons, which let users do things like save and print
a record.
 Form Operation command buttons, which allow users to quickly open or close a
form, print the current form, and perform other actions
Page 56 of 98 Ministry of Labor and Operating Database Version -1
Skills
Author/Copyright Application September , 2022
 Report Operation command buttons, which offer users a quick way to do things

like preview or mail a report from the current record.

 To add a command button to a form:


1. In Form Layout view, select the Design tab, then locate the Controls group.
2. Click the Button command.

3. Choose the desired location for the command button, then click the mouse.

4. The Command Button Wizard will appear. In the Categories pane, select the
category of button you want to add. We want to find a way to move more quickly
to specific records, so we'll choose the Record Navigation category.
5. The list in the Actions pane will update
to reflect your chosen category. Select
the action you want the button to
perform, then click Next. In our
example, we'll choose Find Record.

6. You can now decide whether you want


your button to include text or a picture. A live preview of your button appears
on the left.
Page 57 of 98 Ministry of Labor and Operating Database Version -1
Skills
Author/Copyright Application September , 2022
7. To include text, select
the Text option, then type
the desired word or phrase
into the text box.

8. To include a picture, select


the Picture option. You can
decide to keep the default
picture for that command
button or select another
picture. Click Show All
Pictures to choose from
another command button
icon or Browse to choose a
picture from your computer.

9. When you are satisfied with the appearance of


your command button, click Next.
10. Type a name for the button. This name won't
appear on the button, but knowing the name will
help you quickly identify the button if you ever
want to modify it with the Property Sheet. After
adding the button name, click Finish.

Page 58 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Self-check 4

Part I: - Select the best answer from the given alternative


___1. The new record window appears in in the form of?

A. Form View and Datasheet View C. Query form


B. Report form D. Ala

___2. Which of the following is a types of form create?

A. Form Wizard C. Multiple Item


B. Default Form D. Split Form

___3. Which of the following is an object of form?


A. To allow users to perform data entry
B. To allow users to enter custom information
C. To allow users a method of navigating through the system
D. All
___4. ___is a database object that you can use to create a user interface for a database application.

A. Form C. View
B. Design D. All

___5. Which one of the following statement is true when your data record is modifying?
A. The existing data is replaced by the new one
B. The existing data is store in other location
C. The old and new data is store in the same table
D. All
Page 59 of 98 Ministry of Labor and Operating Database Version -1
Skills
Author/Copyright Application September , 2022
Part II: - Give shore answer for
1. What is the main purpose of using form in access database?
2. List and explain the way of creating form?
3. Write down the steps the open the existing access database form?

Operation sheet 4.1 Procedures access database form

 Operation title: create database form

 Purpose: To create access database form


 Instruction: Using the figure below and given equipment. You have given 30Minut for the
task and you are expected to complete tasks.
 Tools and requirement:
5. Computes
6. MS office access 2016
 Steps in doing the task
Step 1: - Open MS office access database
Step 2: - Give appropriate database name and click on create

Page 60 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Step 3: - Based on the following information create student table
Filed name Datatype
Std_ID AutoNumber
Stud_name Short Text
Age Number
Gender Short Text
Department Short Text
Phone number Number

 Right click on table name and select design view


 Then give the above filed name based on the given information

Step 3: - Click on “Create” tape


Step 4: Click om “Form”

Step 5: - Click here or select all textbox and resize the text box and level

Page 61 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
 Quality Criteria:- Create student register form

Operation sheet 4.2 Modifying records using a simple modified form

 Operation title: Modifying records


 Purpose: To update data using form
 Instruction: Using the figure below and given equipment. You have given 30 Minut for the
task and you are expected to complete tasks.
 Tools and requirement:
 Computes
 MS office access 2016
 Stud_ID
Steps Stud Name
in doing the task Age Gender Department
1 Alemu Kebed 23 M ICT
2 Chale Tolesa 45 M DATABASE
3 Alemitu abebe 34 F HNS
4 Toles Database 55 M HNS
Step 1: - Create the above table called student
Step 2: Create form using all filed of the table
Step 3: Insert all data using the above created form

Page 62 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Step 4: - modify Alamitu data into your name, age gender, and department using form

Step 5:- Click on the normal table name and view the modified data

 Quality Criteria: Insert the given data and modify the existing data using form

Page 63 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
LAP Test 4

Use the following data to perform below task


Emp_ID emp Name Age Gender Office Phone number Salary
1 Alemu Kebed 23 M ICT 0911212122 56870
2 Fatuma mamo 56 f Finance 0976765343 78940
3 Chale Tolesa 45 M DATABASE 0987876545 12389
4 Alemitu abebe 34 F HNS 0934532313 3290
5 Toles Database 55 M HNS 0998765326 6780
6 Yonase Tola 54 M Registrar 0954645434 5634

Task 1: - Create access database called college and the table name employee

Task 2: - Create form using all filed


Page 64 of 98 Ministry of Labor and Operating Database Version -1
Skills
Author/Copyright Application September , 2022
Task 3: - Insert all data using the above created form

Task 4: - Modify the last two employee salary into 7000 and 6000 respectively.

Unit Five: Retrieve information


This unit is developed to provide you the necessary information regarding the following content
coverage and topics:
 Introduction to information retrieve
 Existing database is accessed and required records located
 Simple query is created and required information retrieved
 Query with multiple criteria is developed and required information retrieved
 Data are selected and appropriately displayed

This unit will also assist you to attain the learning outcomes stated in the cover page.
Specifically, upon completion of this learning guide, you will be able to:

 Define information retrieve


 Access and locate existing database record
 Retrieve information using simple query
 Retrieve information using multiple criteria or field of the table
 Display the selected data in appropriate format

Page 65 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
5.1. Introduction to retrieve information

A query is what you will use to retrieve information from your database. It consists of questions
of which Access will give you the answers in the form of data from tables within your database.
Queries are what make it easy to find data, then create new tables based on the queries.
Queries are a fundamental means of accessing and displaying data from tables. Queries used to
view, update, and analyze data in different ways. Queries can access a single table or multiple
tables. For example, you want to view a list of employee id and name, but you do not want to see
phone number and other data, you can create a query that displays the employee’s id and name
only.
Queries answer a question by selecting and sorting and filtering data based on search criteria.
Queries show a selection of data based on criteria (limitations) you provide. Queries can pull
from one or more related Tables and other Queries. Types of Query can be SELECT, INSERT,
UPDATE, DELETE.
Queries show a selection of data based on criteria (limitations) you provide. Queries can pull
from one or more related Tables and/or other Queries. The Datasheet View of a Query looks like
a Table. All data added or modified in a Query, will be saved in the Table. The Design View is

Page 66 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
where the structure of the Query is created. This is where we choose the record sources and
fields, and set the sort order and criteria.

5.2. Access and locate existing database record

A query is a derived item in the database meant to answer specific questions that relate to the
information in the database. Queries are handy during data processing.
To find and retrieve just the data that meets conditions that you specify, including data from
multiple tables, create a query. A query can also update or delete multiple records at the same
time, and perform predefined or custom calculations on your data.
A query requests data from the database. At its simplest, a query merely fetches all data from
a single table. But as you create more complex (and more typical) queries, you can assemble
exactly the data you want (i.e. unique sets of data that you require at any given time).
Queries can also be used to execute mathematical and logical functions to obtain certain
information in the database.

Queries are derived from and linked to tables or other queries. (Due to these linkages, they
tend to largely inflate the size of the database and should thus only be used to execute the
intended functions, and stored only if updated information is to be retrieved).

Page 67 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
5.3. Retrieve information using simple query

There are various types of queries for different uses but for this session we will just focus on the
Select queries:
Select queries :- A select query is the most common type of query. It retrieves
data from one or more tables and displays the results in a datasheet where you can
update the records (with some restrictions). You can also use a select query to
group records and calculate sums, counts, averages, and other types of totals.
Example: Select all student’s information
Step 1: - Select or click on table name
Step 2: click on queries wizard then
select simple queries wizard and ok

Step 3: - Move all filed from available fields into selected fields by clicking “>>” and Finish

Page 68 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
This is the last selected data
 Parameter queries - A parameter query is a query that when run displays its own dialog box
prompting you for information, such as criteria for retrieving records or a value you want to
insert in a field. You can design the query to prompt you for more than one piece of
information. To generates the parameter box we use square parakeet “[ ]” inside the parakeet
you can wright down the declaration what you find.

For Example: - We could create a


parameter query with variable criteria in
the Date field. This way, each time we run
the query a dialog box will appear
prompting us to enter the date we want our

query to search for.

Parameter queries are also handy when used as the basis for forms, reports, and data access
pages. For example, you can create a monthly earnings report based on a parameter query. When
you print the report, Access displays a dialog box asking for the month that you want the report
to cover. You enter a month and Access prints the appropriate report.
Crosstab queries :- You use crosstab queries to calculate and restructure data for
easier analysis of your data. Crosstab queries calculate a sum, average, count, or
other type of total for data that is grouped by two types of information one down
the left side of the datasheet and another across the top.
Action queries

Page 69 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
An action query is a query that makes changes to or moves many records in just one operation.
There are four types of action queries:
Delete Queries: - A delete query deletes a group of records from one or more
tables. For example, you could use a delete query to remove products that are
discontinued or for which there are no orders. With delete queries, you always delete
entire records, not just selected fields within records.
Update Queries: - An update query makes global changes to a group of
records in one or more tables. For example, you can raise prices by 10 percent
for all dairy products, or you can raise salaries by 5 percent for the people within a certain
job category. With an update query, you can change data in existing tables.
Append Queries: - An append query adds a group of records from one
or more tables to the end of one or more tables. For example, suppose
that you acquire some new customers and a database containing a table of information on
those customers. To avoid typing all this information into your own database, you'd like
to append it to your Customers table.
Make-Table Queries: - A make-table query creates a new table from all
or part of the data in one or more tables. Make-table queries are helpful
for creating a table to export to other Microsoft Access databases or a
history table that contains old records.
5.4. Retrieve information using multiple criteria

In order to control which records are displayed, you must define criteria in a query. The most
common type of query is the Select Records query which will be discussed below.
To Define Criteria for Your Query:
1. Position your cursor in the criteria row in the field for which you wish to define the
criteria
2. Type the criteria

Example: To find all Excel courses:


3. Position your cursor in the criteria row of the Course ID field

Page 70 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
4. Type Excel (Access adds the quote marks to the criteria automatically when you tab to
the next column)

5. Click the Run Query button


To Save the Query:
7. Click the Save icon
8. Enter a name for the query
9. Click OK
5.4.1. Criteria for Text, Memo, and Hyperlink fields
A criterion that you specify for a Hyperlink field is, by default, applied to the display text portion
of the field value. To specify criteria for the destination Uniform Resource Locator (URL)
portion of the value, use the HyperlinkPart expression. The syntax for this expression is as
follows: HyperlinkPart([Table1].[Field1],1) = "http://www.microsoft.com/", where Table1 is
the name of the table containing the hyperlink field, Field1 is the hyperlink field, and
http://www.microsoft.com is the URL you want to match.
To include records Use this Query result
that... criterion
Exactly match a value, " Ethiopia " Returns records where the Country Region field is set to
such as Ethiopia Ethiopia.
Do not match a value, Not " addis Returns records where the Country Region field is set to a
such as addis Ababa Ababa " country/region other than addis Ababa.
Begin with the Like U* Returns records for all countries/regions whose names
specified string, such as start with "U", such as UK, USA, and so on.
U
Note: When used in an expression, the asterisk (*)
represents any string of characters — it is also called a
wildcard character. For a list of such characters, see the
article Access wildcard character reference.
Do not begin with the Not Like U* Returns records for all countries/regions whose names
specified string, such as start with a character other than "U".
U

Page 71 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
To include records Use this Query result
that... criterion
Contain the specified Like Returns records for all countries/regions that contain the
string, such as Korea "*Korea*" string "Korea".
Do not contain the Not Like Returns records for all countries/regions that do not
specified string, such as "*Korea*" contain the string "Korea".
Korea
End with the specified Like "*ina" Returns records for all countries/regions whose names end
string, such as "ina" in "ina", such as China and Argentina.
Do not end with the Not Like Returns records for all countries/regions that do not end in
specified string, such as "*ina" "ina", such as China and Argentina.
"ina"
Contain null (or Is Null Returns records where there is no value in the field.
missing) values
Do not contain null Is Not Null Returns records where the value is not missing in the
values field.
Contain zero-length "" (a pair of Returns records where the field is set to a blank (but not
strings quotes) null) value. For example, records of sales made to another
department might contain a blank value in the
CountryRegion field.
Do not contain zero- Not "" Returns records where the Country Region field has a
length strings nonblank value.
Contains null values or "" Or Is Null Returns records where there is either no value in the field,
zero-length strings or the field is set to a blank value.
Is not empty or blank Is Not Null Returns records where the CountryRegion field has a
And Not "" nonblank, non-null value.
Follow a value, such as >= " addis Returns records of all countries/regions, beginning with
addis Ababa, when Ababa " addis Ababa and continuing through the end of the
sorted in alphabetical alphabet.
order
Fall within a specific Like "[A-D]*" Returns records for countries/regions whose names start
range, such as A with the letters "A" through "D".
through D
Match one of two "USA" Or Returns records for USA and UK.
values, such as USA or "UK"
UK
Contain one of the In("Amhara", Returns records for all countries/regions specified in the
values in a list of "Oromia ", list.
values "Afare ",
Page 72 of 98 Ministry of Labor and Operating Database Version -1
Skills
Author/Copyright Application September , 2022
To include records Use this Query result
that... criterion
"SNNP ")
Contain certain Right([Country Returns records for all countries/regions where the last
characters at a specific Region], 1) = letter is "y".
position in the field "y"
value
Satisfy length Len([CountryR Returns records for countries/regions whose name is more
requirements egion]) > 10 than 10 characters long.
Match a specific Like "Chi??" Returns records for countries/regions, such as China and
pattern Chile, whose names are five characters long and the first
three characters are "Chi".

Note: The characters ? and _, when used in an expression,


represent a single character — these are also called
wildcard characters. The character _ cannot be used in the
same expression with the ? character, nor can it be used in
an expression with the * wildcard character. You may use
the wildcard character _ in an expression that also
contains the % wildcard character.
Table 5. 1 Criteria for Text, Memo, and Hyperlink fields

5.4.2. Criteria for Number, Currency, and AutoNumber fields


The following examples are for the UnitPrice field in a query that is based on a table that stores
products information. The criterion is specified in the Criteria row of the field in the query
design grid.
To include records Use this Query Result
that... criterion
Exactly match a value, 100 Returns records where the unit price of the product is $100.
such as 100
Do not match a value, Not 1000 Returns records where the unit price of the product is not $1000.
such as 1000
Contain a value smaller < 100 Returns records where the unit price is less than $100 (<100). The
than a value, such as <= 100 second expression (<=100) displays records where the unit price is
100 less than or equal to $100.
Contain a value larger >99.99 Returns records where the unit price is greater than $99.99 (>99.99).
than a value, such as >=99.99 The second expression displays records where the unit price is
99.99 greater than or equal to $99.99.

Page 73 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
To include records Use this Query Result
that... criterion
Contain one of the two 20 or 25 Returns records where the unit price is either $20 or $25.
values, such as 20 or 25
Contain a value that >49.99 and Returns records where the unit price is between (but not including)
falls with a range of <99.99 $49.99 and $99.99.
values -or-
Between 50 and
100
Contain a value that <50 or >100 Returns records where the unit price is not between $50 and $100.
falls outside a range
Contain one of many In(20, 25, 30) Returns records where the unit price is either $20, $25, or $30.
specific values
Contain a value that Like "*4.99" Returns records where the unit price ends with "4.99", such as $4.99,
ends with the specified $14.99, $24.99, and so on.
digits
Note: The characters * and %, when used in an expression,
represent any number of characters — these are also called wildcard
characters. The character % cannot be used in the same expression
with the * character, nor can it be used in an expression with
the ? wildcard character. You may use the wildcard character % in
an expression that also contains the _ wildcard character.
Contain null null (or Is Null Returns records where no value is entered in the UnitPrice field.
missing) values
Contain non-null values Is Not Null Returns records where the value is not missing in the UnitPrice field.
Table 5. 2 Criteria for Number, Currency, and AutoNumber fields

5.4.3. Criteria for Date/Time fields


The following examples are for the OrderDate field in a query based on a table that stores Orders
information. The criterion is specified in the Criteria row of the field in the query design grid.

To include records Use this Query result


that ... criterion
Exactly match a value, #2/2/2006# Returns records of transactions that took place on Feb 2, 2006.
such as 2/2/2006 Remember to surround date values with the # character so that
Access can distinguish between date values and text strings.
Do not match a value, Not #2/2/2006# Returns records of transactions that took place on a day other
such as 2/2/2006 than Feb 2, 2006.
Contain values that < #2/2/2006# Returns records of transactions that took place before Feb 2,
fall before a certain
Page 74 of 98 Ministry of Labor and Operating Database Version -1
Skills
Author/Copyright Application September , 2022
To include records Use this Query result
that ... criterion
date, such as 2/2/2006 2006.

To view transactions that took place on or before this date, use


the <= operator instead of the < operator.
Contain values that > #2/2/2006# Returns records of transactions that took place after Feb 2, 2006.
fall after a certain date,
such as 2/2/2006 To view transactions that took place on or after this date, use
the >= operator instead of the > operator.
Contain values that >#2/2/2006# and Returns records where the transactions took place between Feb 2,
fall within a date range <#2/4/2006# 2006 and Feb 4, 2006.

You can also use the Between operator to filter for a range of
values, including the end points. For example, Between
#2/2/2006# and #2/4/2006# is the same as >=#2/2/2006# and
<=#2/4/2006# .
Contain values that <#2/2/2006# or Returns records where the transactions took place before Feb 2,
fall outside a range >#2/4/2006# 2006 or after Feb 4, 2006.
Contain one of two #2/2/2006# or #2/3/2006# Returns records of transactions that took place on either Feb 2,
values, such as 2006 or Feb 3, 2006.
2/2/2006 or 2/3/2006
Contain one of many In (#2/1/2006#, Returns records where the transactions took place on Feb 1, 2006,
values #3/1/2006#, #4/1/2006#) March 1, 2006, or April 1, 2006.
Contain a date that DatePart("m", Returns records where the transactions took place in December of
falls in a specific [SalesDate]) = 12 any year.
month (irrespective of
year), such as
December
Contain a date that DatePart("q", Returns records where the transactions took place in the first
falls in a specific [SalesDate]) = 1 quarter of any year.
quarter (irrespective of
year), such as the first
quarter
Contain today's date Date() Returns records of transactions that took place on the current day.
If today's date is 2/2/2006, you see records where the OrderDate
field is set to Feb 2, 2006.
Contain yesterday's Date()-1 Returns records of transactions that took place the day before the
date current day. If today's date is 2/2/2006, you see records for Feb 1,
2006.
Contain tomorrow's Date() + 1 Returns records of transactions that took place the day after the
date current day. If today's date is 2/2/2006, you see records for Feb 3,
2006.

Page 75 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
To include records Use this Query result
that ... criterion
Contain dates that fall DatePart("ww", Returns records of transactions that took place during the current
during the current [SalesDate]) = week. A week starts on Sunday and ends on Saturday.
week DatePart("ww", Date())
and Year( [SalesDate]) =
Year(Date())
Contain dates that fell Year([SalesDate])* 53 + Returns records of transactions that took place during the last
during the previous DatePart("ww", week. A week starts on Sunday and ends on Saturday.
week [SalesDate]) =
Year(Date())* 53 +
DatePart("ww", Date()) –
1
Contain dates that fall Year([SalesDate])* Returns records of transactions that will take place next week. A
during the following 53+DatePart("ww", week starts on Sunday and ends on Saturday.
week [SalesDate]) =
Year(Date())*
53+DatePart("ww",
Date()) + 1
Contain a date that fell Between Date() and Returns records of transactions that took place during the last 7
during the last 7 days Date()-6 days. If today's date is 2/2/2006, you see records for the period
Jan 24, 2006 through Feb 2, 2006.
Contain a date that Year([SalesDate]) = Returns records for the current month. If today's date is 2/2/2006,
belongs to the current Year(Now()) And you see records for Feb 2006.
month Month([SalesDate]) =
Month(Now())
Contain a date that Year([SalesDate])* 12 + Returns records for the previous month. If today's date is
belongs to the DatePart("m", 2/2/2006, you see records for Jan 2006.
previous month [SalesDate]) =
Year(Date())* 12 +
DatePart("m", Date()) - 1
Contain a date that Year([SalesDate])* 12 + Returns records for the next month. If today's date is 2/2/2006,
belongs to the next DatePart("m", you see records for Mar 2006.
month [SalesDate]) =
Year(Date())* 12 +
DatePart("m", Date()) + 1
Contain a date that fell Between Date( ) And A month's worth of sales records. If today's date is 2/2/2006, you
during the last 30 or DateAdd("M", -1, see records for the period Jan 2, 2006. to Feb 2, 2006
31 days Date( ))
Contain a date that Year([SalesDate]) = Returns records for the current quarter. If today's date is
belongs to the current Year(Now()) And 2/2/2006, you see records for the first quarter of 2006.
quarter DatePart("q", Date()) =
DatePart("q", Now())
Contain a date that Year([SalesDate])*4+Dat Returns records for the previous quarter. If today's date is
Page 76 of 98 Ministry of Labor and Operating Database Version -1
Skills
Author/Copyright Application September , 2022
To include records Use this Query result
that ... criterion
belongs to the ePart("q",[SalesDate]) = 2/2/2006, you see records for the last quarter of 2005.
previous quarter Year(Date())*4+DatePart
("q",Date())- 1
Contain a date that Year([SalesDate])*4+Dat Returns records for the next quarter. If today's date is 2/2/2006,
belongs to the next ePart("q",[SalesDate]) = you see records for the second quarter of 2006.
quarter Year(Date())*4+DatePart
("q",Date())+1
Contain a date that Year([SalesDate]) = Returns records for the current year. If today's date is 2/2/2006,
falls during the current Year(Date()) you see records for the year 2006.
year
Contain a date that Year([SalesDate]) = Returns records of transactions that took place during the
belongs to the Year(Date()) - 1 previous year. If today's date is 2/2/2006, you see records for the
previous year year 2005.
Contain a date that Year([SalesDate]) = Returns records of transactions with next year's date. If today's
belongs to next year Year(Date()) + 1 date is 2/2/2006, you see records for the year 2007.
Contain a date that Year([SalesDate]) = Returns records of transactions with dates that fall between Jan 1
falls between Jan 1 Year(Date()) and of the current year and today. If today's date is 2/2/2006, you see
and today (year to date Month([SalesDate]) <= records for the period Jan 1, 2006 to to 2/2/2006.
records) Month(Date()) and
Day([SalesDate]) <= Day
(Date())
Contain a date that < Date() Returns records of transactions that took place before today.
occurred in the past
Contain a date that > Date() Returns records of transactions that will take place after today.
occurrs in the future
Filter for null (or Is Null Returns records where the date of transaction is missing.
missing) values
Filter for non-null Is Not Null Returns records where the date of transaction is known.
values

Table 5. 3 Criteria for Date/Time fields

5.4.4. Criteria for Yes/No fields


As an example, your Customers table has a Yes/No field named Active, used to indicate whether
a customer's account is currently active. The following table shows how values entered in the
Criteria row for a Yes/No field are evaluated.

Page 77 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Field value Result
Yes, True, 1, or -1 Tested for a Yes value. A value of 1 or -1 is converted
to "True" in the Criteria row after you enter it.
No, False, or 0 Tested for a No value. A value of 0 is converted to
"False" in the Criteria row after you enter it.
No value (null) Not tested
Any number other than 1, -1, or No results if it's the only criteria value in the field
0
Any character string other than Query fails to run due to Data type mismatch error
Yes, No, True, or False
Table 5. 4 Criteria for Yes/No fields

5.4.5. Criteria for other fields


 Attachments
In the Criteria row, type Is Null to include records that do not contain any attachments. Type Is
Not Null to include records that contain attachments.
 Lookup fields
There are two types of Lookup fields: those that look up values in an existing data source (by
using a foreign key), and those that are based on a list of values specified when the Lookup field
is created.
Lookup fields that are based on a list of specified values are of the Text data type, and valid
criteria are the same as for other text fields.
The criteria you can use in a Lookup field based on values from an existing data source depend
on the data type of the foreign key, rather than the data type of the data being looked up. For
example, you may have a Lookup field that displays Employee Name, but uses a foreign key that
is of the Number data type. Because the field stores a number instead of text, you use criteria that
work for numbers; that is, >2.
If you do not know the data type of the foreign key, you can inspect the source table in Design
view to determine the data types of the field. To do this: -
1. Locate the source table in the Navigation Pane.
2. Open the table in Design view by either:
 Clicking the table, and then pressing CTRL+ENTER
Page 78 of 98 Ministry of Labor and Operating Database Version -1
Skills
Author/Copyright Application September , 2022
 Right-clicking the table, and then clicking Design View.
3. The data type for each field is listed in the Data Type column of the table design grid.

 Multivalued fields
Data in a multivalued field are stored as rows in a hidden table that Access creates and populates
to represent the field. In query Design view, this is represented in the Field List by using an
expandable field. To use criteria for a multivalued field, you supply criteria for a single row of
the hidden table. To do this:
1. Create a query containing the multivalued field, and open it in Design view.
2. Expand the multivalued field by clicking the plus symbol (+) next to it — if the field is already
expanded, this is a minus symbol (-). Just below the name of the field, you will see a field
representing a single value of the multivalued field. This field will have the same name as the
multivalued field, with the string. Value appended.
3. Drag the multivalued field and its single value field to separate columns in the design grid. If you
want to see only the complete multivalve field in your results, clear the Show check box for the
single value field.
4. Type your criteria in the Criteria row for the single value field, using criteria that is appropriate
for whatever type of data the values represent.
5. Each value in the multivalued field will be individually evaluated using the criteria you supply.
For example, you may have a multivalued field that stores a list of numbers. If you supply the
criteria >5 AND <3, any record where there is at least one value greater than 5 and one value less
than 3 will match.
5.5. Selecting data and display appropriately

Select Create > Query Wizard. Select Simple Query, and then OK. Select the table that
contains the field, add the Available Fields you want to Selected Fields, and select Next. Choose
whether you want to open the query in Datasheet view or modify the query in Design view, and
then select Finish. Access offers several options for making your queries work better for you. In
addition to modifying your query criteria and joins after you build your queries, you can choose
to sort and hide fields in your query results.

Page 79 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
When you open an existing query in Access, it is displayed in Datasheet view, meaning you will
see your query results in a table. To modify your query, you must enter Design view, the view
you used when creating it.
There are two ways to switch to Design view:
 On the Home tab of the Ribbon, click
the View command. Select Design View from
the drop-down menu that appears.

 In the bottom-right corner of your


Access window, locate the
small view icons. Click the Design
View icon, which is the icon farthest
to the right.
Once in Design view, make the desired changes, then select the Run command to view your
updated results.

 Input masks
An input mask is used to provide some control over what values can be entered. They are
primarily used in Text and Date/Time fields, but can also be used in Number or Currency fields.
Input Mask are used when data is entered in a fixed pattern of numbers, letters, spaces etc., such
as a National Insurance number but is unsuitable where the pattern varies (e.g. postcode or
telephone number). When you click in the input mask area, a build button appears on the right.
Clicking this button will enable the Input Mask wizard, which will help you select an appropriate
input mask for your field.

Page 80 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Character Allows Required/Optional
0 0-9 only Required
9 Digit or space Not required
# +/-, digit or space Not required
L Letters A-Z Required
? Letters A-Z Optional
A Letter or digit Required
a Letter or digit Optional
& Any character or space Required
C Any character or space Optional
> All following characters converted to uppercase
< All following characters converted to uppercase
\ Displays the following characters as type
Table 5. 5 Input Mask validation
For example: an input mask for an NI Number would be: >LL000000>L Entry will be restricted
to two letters, followed by six numbers, followed by one letter. The > symbol converts the letters
to uppercase.
Note: - To find out more about how to create input masks, click in the Input Mask area and press
F1

Page 81 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Self-check 5

Part I: - Select the best answer from the given alternative


2. Which one of the following is used to retrieve information from your database?

A. Report C. Query
B. Form D. Al

3. Which one is retrieves data from one or more tables and displays the results in a
datasheet

A. Update query C. Select query


B. Delete query D. All

4. Which one is returns records where no value is entered in the field.

A. Is Null C. Like
B. Is Not Null D. All

5. Which one is Returns records where the value is not missing in the give field.

A. Is Null C. Like
B. Is Not Null D. All

6. Which types of filed is used based on the values from an existing data source depend
on the data type of the foreign key
A. Attachment
B. Lookup fields
C. Multivalued fields
D. All

Page 82 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Operation sheet 5.1 retrieve information from access database

 Operation title: select data


 Purpose: - Retrieve data using simple query
 Instruction: Use the figure below, given equipment and task. You have given 30 Minut for
the task and you are expected to complete tasks.
 Tools and requirement:
7. Computes
8. MS office access 2016
9. Create database called TVET and Student_file table based on the below table.
Give appropriate data type for each field
Task 1: - create database, table and insert the data
Task 2: - select all student information
Task 3: Save the query under Desktop called “Student_filesas Query”
Gende
Student name r Age Level Grade Registration date
Tolosa Mohammed M 20 V C 8/10/2022
Biruk Teshome M 19 II NYC 8/24/2022

Page 83 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Astir Getnet F 17 IV C 8/17/2022
Chaltu Solomon F 18 I C 8/10/2022
Kedir Mehamed F 18 I NYC 8/17/2022

Step 1: - Create database and table

Step 2: - Select table name


 Click on create
 Click on query
wizard
 Select simple query
wizard
 Ok

Step 3:- Move all filed from available fields into selected fields by clicking “>>” and Next

Page 84 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Step 4:- click on Next click on NextGive file name and click on “Finish”

Operation sheet 5.2 Retrieve information from access database

 Operation title: select data


 Purpose: - Retrieve data using multiple criteria
 Instruction: Use the figure below, given equipment and task. You have given 40 Minute for
the task and you are expected to complete tasks.
 Tools and requirement:
10. Computes
11. MS office access 2016
Page 85 of 98 Ministry of Labor and Operating Database Version -1
Skills
Author/Copyright Application September , 2022
12. Use the above operation sheet database and table
Task 1: - select all student information having grade is “C” and gender is”F”
Task 2: Save the query under Desktop called “Student multiple criteria”
Task 3: Update grade is “NYC” into “C”

Step 1: - Select table name


 Click on create
 Click on query design

Step 2: - select table name and click on “Ok” then click “close”

Step 3: - Double click on the field of the criterial to select data from the table
Step 4: - write down the criteria or “C” on grade and “F” on gender

Step 5: click on
 Right click on query name and save as
 Give name on file and OK

Page 86 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
 select data by using multiple criteria is like this

Task 3:- Update grade is “NYC” into “C”


Step 1:-Use the above steps up to” step 3”
Step 2:- Duple click on “Grade” field and click on Update
Step 3: - write down “C” on update to and criteria on “NYC”. And click on Run

Step 4: - Click on “OK”

Quality criteria: - This is the last output of update

Page 87 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Lap Test 5
Task 1: Under this task you should create a database called "My_school " an save it on desktop
Task 2: Create the following table under My_School Database and save it by the name Student.
Task 3: Set appropriate data, field property the following for design view of the student table.
Field Name Data type

Page 88 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Student_first_name
Student_Middle_name
Student_last_name
Student_Id
Age
Gender
Registration_date
City
Nationality

3.1. Set an appropriate primary key for the student table.


3.2. Set the following field properties For City Field.
 Default Value: Gonder.
 Validation Rule: Gonder, Woliso, Jimma, Adama or Harar.
 Validation text: Enter only Gonder, Woliso, Jimma, Adama or Harar.
3.3. Set the following field properties For Sex field:
 Default value: M
 Validation rule: M or F
 Validation text: Please type either M or F.
Task 4: -Set the following field properties for age field is greater than twenty five.
Task 5: -Set the following the default field properties For Nationality field is Ethiopian.
Task 6: - Create the following table under My_School Database and save it by the name course.
Task 7: - Set appropriate data type, field property the following for design view of the course
table.
Field Name Data type
Course_name
Course code
Contact_Hr
7.1. Set an appropriate primary key for course table.
7.2. The contact hr should not accept grater 4.
Task 8: - Create the following table under My_School Database and save it by the name grade.
Task 9: - Set appropriate data, field property the following for design view of the grade table.
Page 89 of 98 Ministry of Labor and Operating Database Version -1
Skills
Author/Copyright Application September , 2022
Field Name Data type
Student_id
Course code
Contact_Hr
Grade
Grade point
8.1 Set an appropriate primary key for the above grade table.
8.2. The grade value only accepts A, B, C, D and F.
8.3. The grade point should not accept greater than 12 and less than 0
Task 9: - Enter the following data into student table
Student_first Student_Middle_na Student_last Student_Id Age gender Regstration cit nationality
_name me _name _date y
Mulu Alemu Facil YA/001/15 23 M 13/01/15 Ha Ethiopia
Milion Solomon Sime YA/004/15 25 M 24/01/15 Ad
rar Ethiopia
Hana Dawit Worku YA/003/15 36 F 22/10/15 Ji Ethiopia
Helen Yonas Abera YA/011/15 44 F 22/11/15 W
m Ethiopia
Tigist Worku Solomon YA/001/15 36 F 22/10/15 W
oli Ethiopia
Task 10: -Enter the following data into course table oli
Course_name Course code Contact_Hr
Operate Personal Computer ICT ITS 06 4
operate database application ICT ITS201 4
Access and Use Internet ICT ITS204 2
Administer Network Hardware ICT ITS202 3
Work in Team Environment ICT ITS206 2
Work in Team Environment ICT ITS106 4
Task 11: -Enter the following data into grade table
Student_Id Course code Contact_Hr Grade Grade point
YA/001/08 ICT ITS1 06 4 c 8
YA/004/08 ICT ITS2 01 4 B 12
YA/003/13 ICT ITS2 04 2 A 8
Task 12:-Create the relationship among the table
Task13: -Create data enter form the course table and give appropriate form name.
Page 90 of 98 Ministry of Labor and Operating Database Version -1
Skills
Author/Copyright Application September , 2022
Task 14:-Enter the following data into course table by using the form.

Course_name Course code Contact_Hr


Apply Quality Standards ICT ITS1 07 3
Work with Others ICT ITS1 08 4
Task 14: - Retrieve the information that has the grade value is A or B. The queries should
Include Course_name , Course code, Grade, Grade point ,Full name of student.
Task 15:-Create select queries by specific Course_name, The queries should Include
Course_name , Course code, Grade, Grade point ,Full name of student
Task 16: -Create Update queries the Contact_Hr from 3 into 4.
Task 17: - Create Update Queries the course name is Operate Personal Computer and
Contact_Hr is 4 into administrate network and 6 respectively.
Task 18: -Create the delete queries the student first name letter is H and age is 44.
Task 19:- Create the report the Contact_Hr is four. The queries should Include Course_name ,
Course code and Contact Hr
Task 20: - Create the report the student grade is A. The report s should include name of student,
Course_name, Course code, Contact Hr and Grade point.
Task 21: -Create the report by specific course name. The report s should include name of
Course_name, Course code, Contact Hr and student full name.
Task 22:- Print the equation 19 and 20.

Page 91 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Reference

1. MS Access - Objects (tutorialspoint.com)


2. Microsoft Access Tutorial: MS Access with Example [Easy Notes] (guru99.com)
3. https://www.databaseprimer.com/pages/table-relationships/ Steve's PC Tutorials
(oneil.com.au)
4. https://www.google.com/url?
sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwjP_O61zej3AhU9
gf0HHZ5TBmkQFnoECAMQAQ&url=https%3A%2F%2Ffanyv88.com%3A443%2Fhttp%2Ficvcollege.edu.in%2Fsites%2Fdefault
%2Ffiles%2FIT%2520notes%2520for
%2520commerce4.pdf&usg=AOvVaw3WUvi4jElZlO38zciV8Iqd
5. https://edu.gcfglobal.org/en/access2013/introduction-to-objects/1/
6. https://support.microsoft.com/en-us/office/create-a-new-database-32a1ea1c-a155-43d6-
aa00-f08cd1a8f01e
7. https://support.microsoft.com/en-us/office/create-edit-or-delete-a-relationship-dfa453a7-
0b6d-4c34-a128-fdebc7e686af
8. https://www.webucator.com/article/how-to-create-a-form-with-the-form-wizard-in-micro/
9. https://www.customguide.com/access/create-a-form-with-the-form-wizard
10. https://www.customguide.com/access/create-a-report
11. https://support.microsoft.com/en-us/office/create-a-query-form-or-report-in-access-04eb597f-
cb77-

Page 92 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022
Participants of this Module (training material) preparation

No Name Qualificat Field of Study Organization/ Mobile E-mail


ion Institution number
(Level)
1 ERKYHUN AZEZE B Information Technology Finote Damot PTC 0969082669 [email protected]

2 YINEBEB TAMIRU B Computer Science Akaki PTC 0936325182 [email protected]

3 EZRA A Computer Science Hosana PTC 0912243860 [email protected]


ALEMAYEHU
4 ALEMAYEHU ABERA A Computer Science Bahidar PTC 0903124653 [email protected]
m

Page 92 of 98 Ministry of Labor and Operating Database Version -1


Skills
Author/Copyright Application September , 2022

You might also like