Module 3
Module 3
Lesson Objectives:
Overview:
o Explain what Microsoft Access is: a database management
system (DBMS) that allows users to store, manage, and
retrieve data efficiently.
o Discuss the key differences between a spreadsheet (e.g., Excel)
and a database (e.g., Access).
Key Concepts:
o Database: A structured set of data held in a computer,
especially one that is accessible in various ways.
o Table: The primary building block of a database that stores
data in rows and columns.
o Query: A way to search and retrieve specific data by applying
filters or criteria.
o Form: A user-friendly interface for data entry and navigation.
o Report: A formatted output of database queries, typically used
for presenting data.
Real-World Applications:
o Highlight examples of how businesses use Microsoft Access for
managing customer data, inventory, and sales tracking.
Creating a Table:
o Explain how to define fields (columns) with data types (Text,
Number, Date/Time, etc.).
o Discuss primary keys and their importance in uniquely
identifying records.
Entering Data:
o Demonstrate how to enter data directly into a table and how to
navigate between records.
Modifying Table Structure:
o Show how to add, delete, and modify fields.
o Discuss field properties (e.g., field size, format, input mask).
Creating a Form:
o Explain the purpose of forms in data entry and data
management.
o Walkthrough on creating a form using the Form Wizard and
Design View.
Customizing Forms:
o Show how to add controls like text boxes, buttons, and combo
boxes.
o Discuss formatting options to enhance the form's usability.
Creating a Report:
o Guide students through creating a report using the Report
Wizard.
o Explain how to organize data in a report for printing and sharing.
Customizing Reports:
o Demonstrate how to adjust layout, add headers/footers, and
format text and numbers.
Hands-on Activities:
Steps:
Steps:
Objective: Learn how to create tables, define fields, and enter data.
Steps:
1. Create a Table:
o Go to the Create tab and click on “Table.”
o Access will create a new table in Datasheet View, which is a
spreadsheet-like view for data entry.
o Explain the default ID field, which is automatically set as the
primary key. You can rename this field to “BookID” by double-
clicking on the column header.
2. Define Fields:
o Click on the “Click to Add” column header to add new fields
(columns) to your table. Choose the appropriate data type for
each field:
Title (Short Text)
Author (Short Text)
Genre (Short Text)
YearPublished (Number or Date/Time, depending on
preference)
o To rename a field, right-click on the column header and select
“Rename Field.”
3. Set Primary Key:
o The BookID field should already be set as the primary key,
indicated by a key icon next to it. If not, right-click on the
BookID field and select “Primary Key.”
4. Enter Data:
o Begin entering data directly into the table by clicking in the cells
under each column. Enter at least 10 records with relevant
information about books.
5. Save the Table:
o Click on the “Save” icon in the Quick Access Toolbar (top left)
or press Ctrl + S.
o Name the table “Books” and click “OK.”
Objective: Learn to create and run a simple query to retrieve specific data.
Steps:
1. Create a Query:
o Go to the Create tab and select “Query Design.”
o In the Show Table dialog, double-click on “Books” to add it to
the query design grid, then close the dialog.
2. Select Fields:
o In the query design grid, double-click on each field you want to
include in the query results (e.g., BookID, Title, Author,
YearPublished).
o The selected fields will appear in the lower part of the grid.
3. Set Criteria:
o Under the YearPublished field, in the “Criteria” row, type
>2015 to filter the results to show only books published after
2015.
4. Run the Query:
oClick the “Run” button (red exclamation point) on the Ribbon to
execute the query.
o The query results will display only the books published after
2015.
5. Save the Query:
o Save the query by clicking on the “Save” icon or pressing Ctrl +
S.
o Name the query “BooksAfter2015” and click “OK.”
Steps:
1. Create a Form:
o In the Create tab, click “Form Wizard.”
o In the Form Wizard dialog, select the “Books” table.
o Move all fields (BookID, Title, Author, Genre, YearPublished) to
the selected fields list and click “Next.”
2. Choose a Layout:
o Choose a layout for the form, such as “Columnar” or “Tabular,”
and click “Next.”
3. Name the Form:
o Name the form “BooksEntryForm” and click “Finish.”
o The form will open in Form View, allowing you to enter new
records into the “Books” table.
4. Customize the Form:
o Switch to Design View (right-click on the Form tab and select
“Design View”).
o Add controls such as text boxes, combo boxes, and buttons by
using the tools in the Design tab.
5. Save the Form:
o Save your customized form by clicking on the “Save” icon or
pressing Ctrl + S.
Steps:
1. Create a Report:
o In the Create tab, select “Report Wizard.”
o In the Report Wizard dialog, select the “Books” table.
o Move all fields to the selected fields list and click “Next.”
2. Grouping and Sorting:
o Choose to group by “Genre” to organize books by genre.
o Click “Next” and then choose to sort by “Title” in ascending
order.
3. Select Layout:
o Choose a layout style (e.g., “Stepped” or “Block”) and click
“Next.”
4. Name the Report:
o Name the report “BooksByGenreReport” and click “Finish.”
o The report will open in Print Preview, showing the formatted list
of books grouped by genre.
5. Customize and Save the Report:
o Switch to Design View to customize the report layout if needed.
o Save the report by clicking on the “Save” icon or pressing Ctrl +
S.