0% found this document useful (0 votes)
64 views97 pages

MS Access 2016 Database Management Guide

Microsoft Access is a database management program that allows users to create, manage, and manipulate databases effectively, especially when dealing with large amounts of interconnected data. The document provides an overview of Access 2016, including its interface, features, and how to navigate and manage databases and their objects. It also includes laboratory exercises for practical application of the concepts learned.

Uploaded by

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

MS Access 2016 Database Management Guide

Microsoft Access is a database management program that allows users to create, manage, and manipulate databases effectively, especially when dealing with large amounts of interconnected data. The document provides an overview of Access 2016, including its interface, features, and how to navigate and manage databases and their objects. It also includes laboratory exercises for practical application of the concepts learned.

Uploaded by

Mel Pangal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Engr. Irene Cecile L.

Calaycay ACCS 211

Chapter 5

APPLICATION SOFTWARE: DATABASE


CONCEPT:

MS ACCESS

Microsoft Access is a powerful program that allows you to create and manage databases. A database
is used to describe a collection of “related” data or information found in computers. Databases allow
you to easily store, retrieve, manipulate, and summarize data from multiple files. Although the
previous chapter allowed you to organize, utilize, and analyze information using spreadsheets, when
there are large amounts of interconnected data, spreadsheets fall short of allowing us to conveniently
keep track of all the linked data.

5.1 Importance of a Database

Access 2016 is a program that allows you to create and manage databases. A database is a place where
you can store information related to a specific topic. How you intend to use the information will
determine whether you need an Access database or a different program to create and manage your
data.

Most often the word "database" is used to describe a collection of related "data" (information) stored.
The easiest way to understand a database is to think of it as a collection of lists on computers. Think
about one of the databases like: the database of patient information at a doctor's office, the database of
bank customers and their accounts, the database of ingredients and menu items in a restaurant, etc.

5.2 Getting Comfortable with MS ACCESS

To launch Access for the first time:

1. Click on the Start button.

2. Click on All Programs.

3. Select Microsoft Office from the menu options, and then click on Microsoft Access 2016.

When you open Access for the first time, the Access Start Screen will appear. From here, you'll be able
to create a new blank database, choose a template, and access your recently edited databases.

Page | 102 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

Figure 6-1: Acess 2016 Start Screen

Note: After Access has been launched for the first time, the Access icon will be located on the
Quick Launch pane. This enables you to click on the Start button, and then click on the Access icon
to launch the Access spreadsheet. Also, a shortcut for Access can be created on your desktop.

5.2.1 The Access 2016 Interface

1 Quick Access Toolbar 2 Title Bar 3 Ribbon 4 Account Access


5 File Tab
Account Access

Account Access

Account Access
6 Navigation
Pane

7 Document
Tabs Bar

8 Objects

9 Record 10 Record 11 Document Views


Navigation Bar Search Box

Account Account
Figure 5-2: ACCES 2016 Graphical User Interface
Access Access

Account Account
College of Engineering and Computer Studies
Access
(SY 2020-2021)
Access
Page | 103
NOTRE DAME UNIVERSITY
Account Account
Access Access
Engr. Irene Cecile L. Calaycay ACCS 211

Table 5-1: Parts of the ACCESS 2016 Interface

No. Part Description

1 Quick Access The Quick Access toolbar lets you access common commands no matter
toolbar which tab is selected.

By default, it includes the Save, Undo, and Redo commands. You


can add other commands depending on your preference.

2 Title Bar Displays the name of the application file.

3 Ribbon The Ribbon contains all of the commands you will need to perform
common tasks in Access. It has multiple tabs, each with several groups of
commands. It 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.

4 Account Access From here, you can access your Microsoft account information, view your
profile, and switch accounts.

5 File Tab The File tab has replaced the Office button. It helps you to manage the
Microsoft application and provide access to its options such as Open,
New, Save, As Print, etc.

6 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.

7 Document Tabs Contains all the objects that are currently open.
Bar

8 Objects These are the four major objects that can be found in the Document Tabs
Bar:

 Tables store your data in your database


 Queries ask questions about information stored in your tables
 Forms allow you to view data stored in your tables
 Reports allow you to print data based on queries/tables that you
have created

9 Record Navigation Used to navigate through records one at a time.


Bar

10 Record Search Box Used to search for a specific record.

11 Document Views An area which you can switch from Datasheet or Design View

Page | 104 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

5.2.2 The Backstage View

This view gives you various options for saving, opening, and printing your database.
To access Backstage view:
1. Click the File tab on the Ribbon.

1 Back to Access

2 Info

3 New

4 Open

5 Save and Save As

6 Print

7 Close

8 Account

9 Options

Figure 6-3: ACCES 2016 Backstage View

Table 5-2: Parts of the ACCESS 2016 Backstage View

No. Part Description

1 Back to Access You can use the arrow to close Backstage view and return to
Access.

2 Info The Info pane will appear whenever you access Backstage view. It
contains information on the current database and tools to help you
compact, repair, and encrypt the database.

3 New Click here to create a new database from scratch, or choose from a
selection of templates.

4 Open From here, you can open databases from your computer, including those
you've recently edited.

5 Save and Save As Use Save to save the current object. Use Save As to save a new version of
the current object or even the entire database.

6 Print The Print pane contains options for printing the current object in your
database.

College of Engineering and Computer Studies (SY 2020-2021) Page | 105


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

7 Close Click here to close the current database.

8 Account From the Account pane, you can access your Microsoft account
information, modify your theme and background, and sign out of your
account.

9 Options Here, you can change various Access options. For example, you can
choose a form to automatically display when your database is opened or
modify the default cell and font style.

5.2.3 The 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.

2. The Navigation pane will be minimized. Click the double arrow again to maximize it.

Page | 106 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

If you want to make the Navigation pane smaller without fully minimizing it, you can resize it.
Simply click and drag the right border of the Navigation pane. When it is the desired size, release
your mouse.

Object sorting in the Navigation pane

By default, objects are sorted by type, with tables in one group, forms in another, and so on.
However, if you want you can sort the objects in the Navigation pane into groups of your
choosing. There are four sort options:

Custom allows you to create a custom group for sorting objects. After applying the sort, simply
drag the desired objects to the new group.

Object Type groups objects by type. This is the default setting.

Tables and Related Views groups forms, queries, and reports with the tables they refer to.

Created Date or Modified Date sorts objects based on when they were created or last edited.

To sort objects in the Navigation pane:

1. Click the drop-down arrow to the right of All Access Objects, then select the desired sort
from the drop-down menu.

2. The objects in the Navigation pane will now be sorted to reflect your choice.

College of Engineering and Computer Studies (SY 2020-2021) Page | 107


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

To further customize the appearance of the Navigation pane, you can minimize groups of
objects you don't want to see. Simply click the upward double arrow next to the group name. To
show a group, click the downward double arrow.

Laboratory Exercise 1

Navigating through MS ACCESS

1. Download and open the practice database exercise given by your teacher.
2. Click through all of the tabs, and notice how the options on the Ribbon change.
3. Minimize the Ribbon, then Maximize it again.
4. Resize the Navigation pane to make it take up less room.
5. Re-sort the objects in the Navigation pane.

Page | 108 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

Note: In case of online classes, you are REQUIRED to record a video of your work. This will help you in
mastering the exercises while you work on it asynchronously. Set-up a fresh Google meet link, share
your screen and start recording the video. You could also use other platforms like Microsoft Teams,
Zoom, phone screen recording or any other application of your choice. This instruction is applicable to
all succeeding exercises. The videos you have created will be uploaded together with your raw ACCESS
files.

5.2.4 Creating a Database

Laboratory Exercise 2

Illustration of Database to be completed in exercise below:

Step 1. Start Access.


Step 2. Click on Blank desktop database.
Step 3. Under File Name type a name for the database LAST_NAME_FIRST_NAME_
MS_ACCESS_Laboratory1.
Example: CALAYCAY_IRENE_CECILE_MS_ACCESS_Laboratory1
Step 4. To change the location of where to store the database, click the folder icon and select a
location.
Step 5. Click Create.

Upload your raw file and video presentation in your google classroom or LMS.

College of Engineering and Computer Studies (SY 2020-2021) Page | 109


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

5.2.5 Understanding Views

There are multiple ways to view a database object. The two views for tables are Design View
and Datasheet View.

Table 5-3: Object Views.

Method Description

Design View is used to set the data types, insert or delete fields, and set the Primary Key

Datasheet View is used to enter and view the data for the records

Laboratory Exercise 3

Understanding Views

Step 1. Click the View arrow on the Home tab and click on either Datasheet View. Take a screen
shot of how it looks and paste it on the table below.
Step 2. Click the View arrow on the Home tab and click on either Design View. Take a screen shot of
how it looks and paste it on the table below.

View ScreenShot

Design View

Datasheet View

Step 3. Examine each view and take note of their differences. Write your observations in not less
than ten (10) sentences.

Upload your raw file and video presentation in your google classroom or LMS.

Page | 110 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

5.5.6 Managing Databases and Objects

Each Access database consists of multiple objects that let you interact with data. Databases can
include forms for entering data, queries for searching within it, reports for analyzing it, and
tables for storing it. Whenever you work with your database, you are working with many of
these objects at once. Fortunately, Access makes managing these objects pretty easy.

[Link] To open an existing database:


Before you enter data or modify your objects, you will need to open your database.

1. Select the File tab to go to Backstage view.

2. Clicking the File tab

3. Click Open.

4. The Open dialog box will appear. Locate and select the database, then click Open.

College of Engineering and Computer Studies (SY 2020-2021) Page | 111


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

5. One or more warning messages may appear when you open your database. If the database
contains customized functions, a yellow bar with a security warning may appear below the
Ribbon. If you trust the source of your database, click Enable Content for your database to
display correctly.

6. After enabling all content in the database, you may see a message asking if you want to
make the database a Trusted Document. Click Yes if you would like all content to be
automatically enabled each time you open the database.

Note: You may also be prompted to sign in to the database. Select your name from the
login list. If your name does not appear, click Add User to enter your information.

5.5.7 To close a database:

1. Select the File tab to go to Backstage view.

Page | 112 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

2. Select Close.

3. If you have any unsaved objects, a dialog box will appear for each one asking if you would like to
save it. Select Yes to save the object, No to close it without saving, or Cancel to leave your
database open.

5.5.8 Working with objects

It's helpful to think of your database as a large binder or folder in which you store your data. The
data itself is contained in database objects. Access treats each of these objects as separate
documents, which means you will have to open and save them individually in order to work with
them.

You may have noticed that this lesson contains no instructions for saving a database. This is
because you cannot save an entire database at once. Rather, you must individually save the
objects contained within the database.

To open an object:

1. In the Navigation pane, locate and double-click the desired object.


2. The object will appear as a tab in the Document Tabs bar.

Note: By default, the most recently opened object will appear in the main window as the
current object. To view another open object, click its tab in the Document Tabs bar.

College of Engineering and Computer Studies (SY 2020-2021) Page | 113


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

Saving objects

You'll need to save any changes you make to each object before closing your database.
Remember, saving early and often can prevent your work from being lost. However, you will
also be prompted to save any unsaved work when you attempt to close your database.

To save a new object:

1. Select the object you want to save by clicking its tab in the Document Tabs bar.
2. Click the Save command on the Quick Access Toolbar, or press Ctrl+S on your keyboard.

3. The first time you save an object, you will be prompted to name it. Enter the desired object
name, then click OK.

4. The object will be saved. Click the Save command again to save any changes to the object.

To close an object:

1. Select the object you want to close, then click the X to the right of the Document Tabs bar.

Page | 114 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

2. If there are any unsaved changes to the object, you will be prompted to save it. Select Yes to
save, No to close it without saving your changes, and Cancel to leave the object open.
3. You can also close an object by right-clicking its tab on the Document Tabs bar and selecting
Close. Select Close All to close all open objects.

To rename an object:

1. If the object you want to rename is open, close it.


2. In the Navigation pane, right-click the desired object, then select Rename.

3. Type the new object name, then press Enter on your keyboard.

College of Engineering and Computer Studies (SY 2020-2021) Page | 115


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

Laboratory Exercise 4

Managing Databases and Objects

Step 1. Open the practice database sent by your teacher.

Step 2. Open an object.

Step 3. Close the object.

Step 4. Rename the object.

Step 5. Close the database without saving your changes.

Upload your raw file and video presentation in your google classroom or LMS.

5.1.3 Understanding Tables

All tables are composed of horizontal rows and vertical columns, with small rectangles called
cells in the places where rows and columns intersect. In Access, rows and columns are referred
to as records and fields.

A field is a way of organizing information by type. Think of the field name as a question and
every cell within that field as a response to that question. In our example, the Last Name field is
selected, which contains all the last names in the table.

A record is one unit of information. Every cell on a given row is part of that row's record. In our
example, Quinton Boyd's record is selected, which contains all of the information related to him
in the table.

Page | 116 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

Each record has its own ID number. Within a table, each ID number is unique to its
record and refers to all of the information within that record. The ID number for a record cannot
be changed.

Each cell of data in your table is part of both a field and a record. For instance, if you
had a table of names and contact information, each person would be represented by a record,
and each piece of information about each person—name, phone number, address, and so on—
would be contained within a distinct field on that record's row.

1 The
Records
Command
Group 4 Text
Formatting
2 Find and Command Group
Replace
Button

3 Field
5 Record

6 Records Navigation Bar

College of Engineering and Computer Studies (SY 2020-2021) Page | 117


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

Table 5-4: Parts of a Table Tab

Part Description

The Records The Records command group on the Home tab contains a handful of commands for
Command Group working with records, including New Record, Save Record, and Delete Record.

Find and Replace The Find command allows you to search for any term in your table.

The Replace command allows you to search for any term in your table and replace it
with a new one. For example, you could replace the word Fall with the word
Autumn.

Text Formatting These formatting options allow you to make your table easier to read by adding an
Command Group alternate row color or modifying the gridlines that separate individual rows and
columns. You can access even more formatting options by clicking the arrow in the
bottom-right corner.

Field In Access, columns are referred to as fields. When you organize your data by
entering it into different fields, you are organizing it by type. Each field contains one
type of data. The type of data contained within a field is described by the title at the
top of each field.

Record In Access, table rows are referred to as records. A record is a unit of data that
includes every piece of information in a given row.

Record Navigation The Record Navigation bar allows you to navigate through records one at a time.
Bar Click the arrows to move from record to record, and navigate directly to a record by
searching for it with the record search box. You can also use the Record Navigation
bar to add a new record to the current table.

5.1.4 Understanding Fields and Their Data Types

A field is an element of a table that contains a specific item of information, such as a last name.
On the other hand a field’s Data Type determines what kind of data the field can store.

Table 5-5: Fields and Their Data Types

Page | 118 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

Format Use to display

Short Text Alphanumeric data (names, titles, etc.) - up to 255 characters

Center Center your content.

Long Text Large amounts of alphanumeric data: sentences and paragraphs – 64,000
characters

Number Numeric data

Date/Time Dates and times

Currency Monetary values

AutoNumber Unique value generated by Access for each new record

Yes/No Yes and No values and fields that contain only one of two values

OLE Object Pictures, graphs, or other ActiveX objects from another Windows-based application

Hyperlink A link address to a document or file on the Internet

Attachment You can attach files such as pictures, documents, spreadsheets, or charts; each
Attachment field can contain an unlimited number of attachments per record, up to
the storage limit of the size of a database file.

Calculated You can create an expression that uses data from one or more fields. You can
designate different result data types from the expression.

Lookup Wizard Displays either a list of values that is retrieved from a table or query, or a set of
values that you specified when you created the field. The Lookup Wizard starts and
you can create a Lookup field. The data type of a Lookup field is either text or
number, depending on the choices that you make in the wizard.

College of Engineering and Computer Studies (SY 2020-2021) Page | 119


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

Laboratory Exercise 5

Setting up Tables and Fields

To Create a Table in Design View:

1. Click on the Create tab


2. Click on Table

3. Note: By default, a blank database contains Table 1.


A new table, Table2 will be created.

4. Switch over to Design View on the Home tab

5. You will be prompted to save the table, Save it As Books and click on OK

Page | 120 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

6. The changes will be saved in the Navigation Pane and Table Tab.

7. To rename misspelled tables, close the active table first on the table tab. Right click on the table
and choose Close.

8. Right click again on the Table name you wish to rename, in this case the Boks Table and rename
appropriately and hit Enter.

College of Engineering and Computer Studies (SY 2020-2021) Page | 121


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

9. Double Click to reopen your Books. This should be the final look of your renamed table.

10. Then Double click to activate Table1. In the File tab, click Save to name your table. Replace
Table1 with Customers and Click OK.

11. Add another Table and name it as Orders. Your Database should contain three tables at this
point.

12. Activate the Books table by clicking on Books on the table tab and you are now ready to add
fields.
13. Right click on the ID field and choose Rename Field, change it to Book ID and hit Enter.

Page | 122 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

14. The next Column Field will automatically highlight and choose another Field Type. Click Short
Text and add more fields such as Title, Author First, Author Last, and Category.

15. Your Books table fields should look like this.

Note: The order that you enter the field names is the order the fields will appear in the table

16. Click on the View Options and choose Design View. You should be able to see the Field Name
and the Data Type like the one on the right side.

17. Add another field named Price and set the Data Type into Currency.

18. Recreate Customer Table fields as shown in the Datasheet and Design Views below.

College of Engineering and Computer Studies (SY 2020-2021) Page | 123


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

19. Reorder the First Name and Last Name fields by locating the cross with arrows and dragging
them in the following manner.

20. Delete the Phone Number Field by right clicking on it and choosing delete field.

21. Add Fields in the Orders Table as shown in the Datasheet and Design Views below. You can also
change the Data Type in the Datasheet View in the Fields Tab via the drop down menu in the
Data Type. Choose Date/Date for the Order Date.

Page | 124 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

Video Resources: [Link]

Upload your raw file and video presentation in your google classroom or LMS.

5.1.5 Setting up Primary Keys

The Primary Key is the unique identifier for each record in a table. Access will not allow duplicate
entries in a primary key field. When creating a new table, Access automatically creates a field “ID”
with the autonumber data type, and assigns this as the Primary Key.

To Set a Primary Key:

1. In Design View, position your cursor in the field you wish to set as the Primary Key

2. Click the Primary Key button on the toolbar

3. Save the table Note: To turn off the Primary Key simply click on the Primary Key button again.

Note: To turn off the Primary Key simply click on the Primary Key button again.

Figure 6-4: How to setup Primary Key in Design View

5.1.6 Input Masks

College of Engineering and Computer Studies (SY 2020-2021) Page | 125


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

An input mask is used to pre-format a field to “look/act” a certain way when a user inputs data.
Examples: Social Security Number input mask automatically inserts the dashes; phone numbers
automatically insert the parentheses and dashes. The input mask data can either be stored in
the table or simply displayed and not stored.

To Create an Input Mask for a Field:

1. In Design View, click in a field for which you’d like to apply an input mask

2. In the Field Properties section at the bottom of the screen, click in the Input Mask line and notice the
Build button that appears at the right end of the line (see below):

Figure 5-5: The Input Mask Line in Design View

3. Click the Build button to start the Input Mask Wizard (shown below).

Figure 5-6: The Input Mask Wizard

Page | 126 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

5.1.7 Understanding the Relationship Map

The relationship map lists all of the tables that were selected to relate, as well as all of the fields
that were previously set up for that table. Notice that the first field has a key icon next to it. This is
the primary key for the table.

[Link] Primary and foreign keys

A primary key is the first field in each table of the database. You may recall that this field
auto-numbers by default, so every record in the table has its own unique number to identify it.
Access uses this number to quickly pull information together when you run queries or reports,
which are covered later.

In the example above, the primary key for the Customers table is Customer ID, the primary
key for the Orders table is Order ID, and the primary key for the Books table is Book ID.

A foreign key is a field that is the primary field in its own table but that shows up in another
table. If you look closely at the Orders table, the fields Customer ID and Book ID appear there, as
well as in their own respective tables. These fields are the primary key in their own tables, but in
the Orders table, they are considered foreign keys.

5.1.8 Understanding types of relationships

There are several different types of relationships allowed in Access 2016. These include:

One-to-One
One-to-Many
Many-to-Many

The relationship type you will come across most frequently—and the one created in our
bookstore scenario—is the One-to-Many relationship.

One-to-Many

College of Engineering and Computer Studies (SY 2020-2021) Page | 127


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

The One-to-Many relationship means data for that field will show up a single time in one table
but many times in the related table.

For example, let's look at one of the book titles in our bookstore. The Book ID for the book
should appear only once in the Books table because this table lists every title stocked in the
store. But it will probably appear many times in the Orders table because we hope it gets
ordered by many people many times.

The symbols for the One-to-Many relationship look like this:

5.1.9 Enforcing Referential Integrity


In the Edit Relationships dialog box, an option to Enforce Referential Integrity appears.

You should click Enforce Referential Integrity to make sure you never have an order for a book
that doesn't appear in the Books table. Selecting this option tells Access to check for these
things when someone is working with your data records.

5.1.10 Editing existing relationships

Access 2016 allows you to edit relationships that already exist. This can be done using the Edit
Relationships command on the Ribbon. However, a much simpler way is to simply double-click
the link that appears in the relationship map. Either method brings up the Edit Relationships
dialog box, where you can change your settings.

Laboratory Exercise 6

Building Relationships

Page | 128 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

To establish a relationship between tables:

1. Click the Relationships command in the Show/Hide group on the Database Tools tab in the
Ribbon.

NOTE: Tables must be closed in order to establish relationships.

2. When the Show Table dialog box appears, select each table name, then click Add for the
tables you want to relate.

3. When you're done, close the Show Table dialog box. You should now see a relationship map
that contains all of the tables that were selected.

4. To move a table that appears in the relationship map, place your mouse over the table you
want to move.
5. Hold down the left mouse button, then drag the table to a new location.
6. Release the mouse button to drop the table in its new place.

College of Engineering and Computer Studies (SY 2020-2021) Page | 129


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

7. Relate your tables by drag and drop method by selecting a field name from one table by
holding down the left mouse button.
8. Drag the field name from one table to the other table in the desired relationship.
9. Drop the first field name onto the field name you want to relate by releasing the left mouse
button.
10. You should select the Book ID field from the Books table and drag and drop it on the Book
ID field in the Orders table. An Edit Relationships Dialog Box will pop up and you should
check referential integrity.

You should have the same output as the image shown:

11. Do the same for the Customer ID field from the Customers table and drag and drop it on the
Customers ID field in the Orders Table. Again, check referential integrity in the Edit
Relationships Dialog Box. Your output should be the same as the one shown below.

Page | 130 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

Laboratory Exercise 7

Adding and Eduting Data in Tables

To add records in the new record row:

Open the Books Table in DataSheet View.

Click the record row with the asterisk that appears at the bottom of the table.

There’s no need to input a number in the field Book ID as Access will automatically assign a
number to it. Input these two entries in your database.

Adjust the column widths by clicking this arrow between rows to see the entire title of the book.

Next step is tosetup data validation in the fields to make sure that right data will be entered in your
database.

Click on the View icon and set to Design View.

College of Engineering and Computer Studies (SY 2020-2021) Page | 131


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

In the Price field check go to Validation Rule. Put a greater than 0 (>0) so that the Price should always be
greater than that number.

In the Validation Text type in “Must be a a dollar value higher than $ 0.00”.

In the required propertty Select “Yes”. Sothat the user will be required to enter a price for every book
added to the database.

Click on Operators

In the “Category Field” setup a Valdation Rule by clicking the ellipsis. The Expression Builder Command
will pop up.

Key in = "Fiction" Or "Non-Fiction" Or "Kids" Or "History" Or "Technology" Or "Home and Garden" Or


"Travel" Or "Food" to setup those rules.

Page | 132 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

In Validation Text key in Must be Fiction, Non-Fiction, Kids, History, Technology, Home and Garden,
Travel or Food to setup those rules.

Save all changes.

Add at least 20 books with different categories to your Books table.

Add at least 20 customers with different addresses to your Customers table.

Add at least 20 orders with different dates to your Orders table.

5.1.11 Entering, Navigating and Sorting Data in a Table

Entering Data in a Table:

1. In Datasheet View, start typing the data into the table by pressing the tab key to move to the next cell

2. When you have completed the record (row), press Enter

College of Engineering and Computer Studies (SY 2020-2021) Page | 133


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

3. You can also click on the New record icon on the Home tab in the Records group

Figure 6-7: The New Record Button


Navigating in a Table:

Use the arrows at the bottom of the table to navigate among records.

Figure 6-8: The Record Navigation Bar


Sorting Records in a Table:

1. Position your cursor in the field that you wish to sort by clicking on any record in the table

2. Click either the Sort Ascending or Sort Descending icon on the Home tab in the Sort & Filter group

Figure 6-9: The Sort and Filter Group

To add records with the

New Record navigation button:

 Click the New Record button in the navigation bar. The navigation bar is located in the
bottom-left corner of the open object pane.

 Type data into the appropriate fields.


 Hit Enter or the Tab key to move to the next field.

Page | 134 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

To add records with the New Record command:

 Click the New Record command in the Records group in the Ribbon.

 Type the data into the appropriate fields.


 Hit the Enter or the Tab key to move to the next field.

Editing records in tables

Sometimes it is necessary to edit records in the database. Like with every other task in Access 2007, this
can be done several different ways.

To edit a record directly:

 Scroll through the records, or use the navigation buttons on the navigation bar to find
the record to edit.

 Click the cell containing the information that must be edited. A pencil icon appears to
indicate edit mode.

 Type the new information into the field.


 Click outside of the record row to apply the change.

College of Engineering and Computer Studies (SY 2020-2021) Page | 135


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

To edit a record using Find and Replace:

 Click the Find command in the Find group on the Ribbon.

 The Find and Replace dialog box opens.

 Tell Access what to find by typing it into the Find What: area.
 Type the replace term in the Replace With: area.
 Tell Access where to look with the Look In: drop-down list. The first choice in the drop-
down list is the field you were last in within the table.
 Tell Access what to Match: Any part of the field, the whole field, or just the start of the
field.
 Tell Access how to Search: Up finds records above the cursor, Down finds records below
the cursor, and All searches all records.

 Click one of the action options:


o Find Next will find the next instance of the word in the table.
o Replace will put the new word into the table, overwriting what is currently
there.
o Cancel stops the editing process.
CAUTION: DO NOT use Replace All because it will overwrite every instance of the Find term in the table,
which can have a serious impact on your data.

Page | 136 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

To copy and paste a pecord:

 Select the record you want to copy. Right-click, then select Copy.
 Select the new record row. Right-click and select Paste. The record information appears
with a new record ID number.

To delete a record:

 Select the record you want to delete, then right-click and select Delete Record.

 A dialog box appears, telling you the action cannot be undone and asking if you are sure
you want to delete the record.

There may be other records that rely on the record you are trying to delete. DO NOT delete a record
without knowing how it will impact the rest of your database.

College of Engineering and Computer Studies (SY 2020-2021) Page | 137


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

When you delete a record, the record number is permanently deleted from the database table. If you
delete the last record from a table and then add a new record, your new record numbers will appear to
be out of sequence.

Laboratory Exercise 8

Creating and Using Forms

Another way to populate a database is with the use of forms. An Access 2013 form helps you know
exactly what data to enter. In this lesson, we'll address the benefits of using forms with a database, and
we'll show you how to set up a basic form for your Access 2013 database, as well as how to use the
form to populate or edit data in the database. You'll also learn how to enhance a basic form with a
drop-down list.

In real life, a form is piece of paper you fill out so someone can collect and keep track of specific
information about you. Only one record—your record—is captured with any given paper form.

Page | 138 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

Access 2013 forms work in a similar way.

In previous lessons, you saw that you can populate a database by entering records into the tables
themselves. If the database has hundreds of records and many fields to populate for any given record, a
table can be overwhelming to a user entering data. An Access form lets you enter data one record at a
time, without having to see the entire table.

An Access 2007 form also lets you know exactly what information to enter and can even tell you what
that information should look like. Adding certain control components to a form—like a drop-down
menu—can dramatically increase the integrity of the data that is held in a database.

A database owner wants to control the levels of access other database users have to the data; the fewer
the amount of people who are interacting with the data, the lower the chances are of the data
becoming compromised. Forms are one more way a database owner can limit the actions of other
users. Form properties can be set so users can only enter records or just view records.

Creating a form

College of Engineering and Computer Studies (SY 2020-2021) Page | 139


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

Access 2013 has several automatic tools for creating forms. These tools are located in the Forms group
on the Create tab in the Ribbon, as seen below:

Access 2007 forms tools include:

 The Form command makes a basic form, showing a single record at a time.
 The Split Form command creates a form showing one record on top and includes the
Datasheet view of the entire source table on the bottom.
 The Multiple Items command creates a form that shows all records at once, which looks
similar to the source table in Datasheet view.
 The Form Wizard is hidden under the More Forms command. It walks you through the
process of creating more customized forms.

To create a form using the Form command:

The basic Form command is the one we suggest because it allows you to see just one record at a time. It
also includes all of the fields in your source table for you, and you can modify the layout of the basic
form to hide fields or add controls:

 Begin by highlighting the table you want to use as a source table.


 With the source table highlighted, select the Form command from the Forms command
group in the Create tab on the Ribbon.
 The new form is created and opens in the object pane.

The newly created form has the same name as the source table by default. You can give the form a new
name by saving the form. You will be prompted to give the form a name.

Using forms to enter data

Populating a database is easy once you have a basic form in place. Record navigation works the same
way for forms as it does for tables. The navigation bar is located in the bottom-left of the object pane.

Page | 140 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

The navigation buttons work the same way as they do for tables. The picture below shows the
navigation buttons for a form.

To add a record using a form:

 Navigate to a new record, either by using the New Record navigation button or by using
the New command in the Records group on the Ribbon.
 Add the new data.
 Save the record.

Your data must be entered using an acceptable format. The acceptable formats were established when
the field properties were set.

Save by using either the Save command on the Ribbon or by progressing to another record using
the New (Blank) Record navigation button. Moving to a new record saves the most recently entered
record. However, it may be necessary to refresh the table in Datasheet view to see the newest record.

College of Engineering and Computer Studies (SY 2020-2021) Page | 141


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

To edit records using a form:

Just like in a table, database users can edit records from a form using the Find and Replace command.
This command works exactly the same way in a form as it does in a table.

Creating a drop-down list

Using a drop-down list on a form can increase the integrity of the data in the database because drop-
down lists force form users to select one of the preset options in the list to populate the field. These
types of form controls are relatively easy to set up using the Combo Box.

To create a drop-down list using a Combo Box control:

 With the form opened in Design view, select the Combo Box command in
the Controls group on the Design tab in the Ribbon.

 Drag and drop the combo box sizing tool to create the combo box where you want it to
be on the form.

Page | 142 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

 The Combo Box Wizard appears.

 Choose the desired option from the wizard, and click Next.
 Because the middle option was selected in the example above, the wizard progresses to
the next step, which asks for the values to be typed into a small table.

 Next, the wizard asks what to do with the entered values. Access can either remember
the values for later use, or it can populate a field with the entered values. Use the drop-
down list to select which field Access should use to store the values.

College of Engineering and Computer Studies (SY 2020-2021) Page | 143


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

 Once the desired option has been selected, click Next.


 Finally, the wizard gives the combo box a generic name, which can be meaningful to you
later if there's ever a need to adjust the properties of this or another combo box. If you
want, give the combo box a name, then click Finish.

Whatever name is entered will appear as a label on the form. This label can be deleted if you want.

Switch to Form view to see how the combo box works. The Category drop-down list appears on the
Books form, as seen in the image below.

 Scroll through the customer records using the Customers form.

Page | 144 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

 Create a basic Books form using the Form command.


 Use the new Books form to enter and save the following data:
o Title: The Secret Streets of Savannah
Author: Amy Little
Category: Travel
Price: $34.99
o Title: Cars and Trucks
Author: Jonathon Bradley
Category: Kids
Price: $14.99
 Using the Combo Box command, create a drop-down list on the Books form for the
following categories:
o Fiction
o Nonfiction
o Kids
o History
o Technology
o Home & Garden
o Travel

o Food
 Add another record to the database using the Books form with the drop-down category
selector.
 Use the Find and Replace command to change the price of all books that are $14.99 to
$16.99.

College of Engineering and Computer Studies (SY 2020-2021) Page | 145


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

Laboratory Exercise 9

Making Forms More Usable

You've already seen how a combo box control can make a form more user friendly. In Access 2007,
there are several additional ways you can modify forms to make them easier to use while also increasing
the integrity of the database. In this lesson, we'll explain how to use form properties to limit the actions
your form users can take. We'll also walk you through hiding fields on a form and adding command
buttons to the form.

Making forms more useable

You already know that forms can help you increase the integrity of your data by limiting what you see
and how you can enter data. You saw that using a drop-down list can make data entry easy. Now it's
time to think about the design of your forms from a form user's perspective.

Let's look at the Orders form in our bookstore scenario. The basic form, which was created with
the Form command, looks like this:

This form is where we would want our user—the store employee—to pair a customer with a book to
complete an order. Let's look at the form from the user's point of view:

 The employee would be adding new orders, not editing existing ones, so we'll set form
properties to limit this action.

 The user will also never need to enter the Order ID number because this is the number
the database assigns each order record to differentiate it from other orders. We'll hide
this field.

Page | 146 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

 The Customer ID field and the Book ID field are not too useful as they are because the
employee would have to know each customer's ID number and every Book ID number
to be able to enter the data in the format we need. We'll make these fields more
useable by creating combo boxes that help users select the correct customer and book.

 Our user will not need to enter the Order Date because we want the database to auto-
populate this field in the database using today's date. We'll set field properties to make
this happen.

Setting form properties

Access 2013 allows you to set several form properties. Form properties are options that are set in
Design view on the Property Sheet, like the one shown below. These options control how the form
looks, works, and interacts with the rest of the database.

To set form properties:

 View the form in Design view.


 Select the Property Sheet command from the Tools group on the Ribbon, as seen
above.

College of Engineering and Computer Studies (SY 2020-2021) Page | 147


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

Note: The form Property Sheet is also accessible by right-clicking anywhere on the form
in Design view and selecting Properties from the menu.

 When the property sheet opens:


o Make sure Form is selected in the Selection type drop-down list.

o Set the desired form properties.

Tip: Use the tabs to find the specific property you want to set. Use the help available to you in the
bottom-left corner of the Access window to know what each property setting does.

Hiding fields on a form

There will be times when a field will not be needed on a form. Access 2007 allows you to hide fields by
setting the Visible field property in Design view.

To hide a field on a form:

 In Design view, open the Property Sheet.


 Change the Visible property setting to No, as seen below.

Page | 148 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

 Switch to Form view to verify that the field is hidden.

CREATING COMBO BOXES

For the New Orders form in our bookstore example, we created user-friendly drop-down lists using
the Combo Box command. These drop-down lists help our users identify a specific customer and specific
book using more useful information than the Customer ID and Book ID numbers, as seen below.

College of Engineering and Computer Studies (SY 2020-2021) Page | 149


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

SETTING FIELD PROPERTIES

Sometimes it may be necessary to set field properties from the form itself. For example, on the New
Orders form for our bookstore shown below, we want to set up the Order Date field to auto-fill with the
current date each time an order is entered. This way, our employees will not have to worry about
entering a date on the form because the form will do it for them.

To set field properties from a form in Design view:

 Highlight the appropriate field on the form.


 Open the Property Sheet.
 Verify that the Field Name appears in the Selection type drop-down list.
 Set the desired field property.

In our example, we want to set the Order Date field to auto-fill with the current date. Refer to the
picture below. Notice that we have the Order Date field highlighted on the form itself. On the Property
Sheet, we have Order Date showing in the Selection type drop-down list.

Page | 150 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

Because we want the Order Date to auto-fill, we must set the default value to always enter the current
date.

To set a field to auto-fill with the current date:

 Open the Data tab on the field's Property Sheet.

College of Engineering and Computer Studies (SY 2020-2021) Page | 151


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

 Set the Default Value property by clicking on the Expression Builder button.
 Use Expression Builder to enter the expression for the current date. It looks like the
image below.

The Expression Builder contains many commonly used expressions for database
functions. Explore them by clicking the various files in the left hand column.

Creating command buttons

Another way to make a form more user friendly is by adding command buttons to the form. Command
buttons are a quick way for form users to take a specific action. These command buttons are grouped
into categories of actions, including:

 Record Navigation command buttons, which easily allow users to move among the
records in your database
 Record Operation command buttons, which let users do things like save and print
records
 Form Operation command buttons, which let users quickly open or close a form, print
the current form, and perform other actions
 Report Operation command buttons, which offer users a quick way to do things such as
preview or mail a report

Page | 152 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

To add a command button to a form:

 Click the Button command in the Controls group on the Ribbon.

 When the Command Button Wizard opens:


o Select the type of command you want from the Categories list.
o Select the specific action you want the command button to perform from
the Actions list.
o Click Next.

 In the next wizard step:


o If you want text to appear on the button, enter it in the Text box.
o If you want a picture to appear on the button, select one using
the Browse button.

o Click Next.

College of Engineering and Computer Studies (SY 2020-2021) Page | 153


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

 In the next wizard step:


o Give the button a meaningful name. Note: Access will give your button a
default name. Renaming it with a more useful name may help later if you
have several buttons on a form and want to change the properties of one.

o Click Finish.

The command button should be operational and appear on the form in Form view.

 Open the Orders Form, and change the form properties so it limits users to adding
records only.

 Hide the Order ID and Order Date fields.


 Set the Order Date field property to have a Default Value of the current date.
 Create drop-down lists for the Customer ID and Book ID fields, making sure they
contain helpful information for users and correctly populate the database with ID
numbers.

Page | 154 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

 Add a command button to the form.

Introduction

Now that you know how to make forms work better, it's time to think
about what a form looks like. In this lesson, we'll address the various ways to modify a form layout,
including how to add a logo and apply an Auto Format to the form. We'll also cover using and
formatting titles, as well as moving and applying borders to objects.

Laboratory Exercise 10

MAKING FORMS ATTRACTIVE

Making forms more attractive

Because others will be using the forms in your database to enter data, you may want to make the forms
more visually appealing. These types of changes are done to the form in Layout view.

In Layout view, you see the form as it will appear to the user in Form view, so it's useful for setting the
size of controls and other objects on the form, as well as for changing the font, colors, and borders on
the form.

To switch to Layout view:

There are three ways you can open the form in Layout view.

 Right-click the Form tab or the form name in the object list, then select Layout
View from the list.
 Select Layout View in the Views group on the Ribbon.

 Click the Layout view icon in the bottom-right corner of the Access 2013 window.

College of Engineering and Computer Studies (SY 2020-2021) Page | 155


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

Adding a logo

Access 2007 automatically puts a form icon, like the one below, in the header area of every form you
create.

One way to customize the look of your forms is to remove the icon and replace it with a logo. This is
easy to do using the Logo command.

To replace the icon with a logo:

 Delete the form icon.


 Select the Logo command from the Controls group on the Ribbon.

 Use the Insert Picture dialog box to locate the picture file you want to use as the logo,
then click OK. The new logo should appear.

You can move and resize the logo as well. Moving and resizing objects on a form is covered later in this
lesson.

Page | 156 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

Applying a style with AutoFormat

Another simple way to dramatically change the way your form looks is to apply a style with the
AutoFormat command. You could modify the color for each part of the form on your own, but Access
has already combined colors in several attractive styles. These styles are available under the AutoFormat
command.

To apply an AutoFormat:

 Click the AutoFormat command on the Ribbon.

 Select the desired format. The change will appear when the mouse button is released.

Working with titles

One of the easiest things to change on the form is the title, which appears in the form header with the
icon or logo.

To change the form title:

 Click the Title command in the Controls group on the Ribbon.

College of Engineering and Computer Studies (SY 2020-2021) Page | 157


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

 When the title highlight appears, type the new title, then hit the Enter key on your
keyboard.

Note: The title does not affect the name of the form, and vice versa.

Changing text on the form

Access, like all Microsoft Office 2007 products, allows you to change the font style, text size, text color,
and alignment. It also lets you apply bold, italics, or underline to the text. All of this is done from the
Ribbon, as seen in the diagram below.

Page | 158 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

To modify text:

 Highlight the text.


 Apply the desired format by doing one or more of the following:
o Select the desired font style from the font face drop-down list.
o Set the size of the text using the font size selection list.

o Choose a color for the text using the font color selector.
o Apply either the bold, italics, or underline style.

Additional text formatting options are available in the Font group. The above list includes the most
common text modifications.

Working with objects on a form

Other ways to modify the way a form looks in Access 2007 include resizing and repositioning the objects
that appear on the form, and applying borders to objects on the form. All of these tasks are easily done
in Layout view.

To move objects on a form:

 Highlight the object by clicking it.

 Move the object by dragging and dropping it in a new location.

To resize objects on a form:

 Highlight the object by clicking it.


 When the crosshair cursor appears, hold down the left mouse button and drag the edge
to the preferred size.
 Release the mouse button to apply the change.

To apply a border to objects on a form:

 Highlight the object by clicking it.


 Select a width using the Line Width command.

 Select a style using the Line Style command.


 Select a color using the Line Color command.

College of Engineering and Computer Studies (SY 2020-2021) Page | 159


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

 Open the Orders Form in Layout view and change the form by:
o Adding a picture using the Logo command
o Giving the form a new title
o Modifying some text on the form
o Applying one of the AutoFormat options
o Moving or resizing an object on the form

o Applying a border to an object on the form

Introduction

Once a database is populated, it's time to think about how to look at—or
analyze—the data. One basic way to analyze data is to sort it. Sorting data is easy with Access 2007. In
this lesson, we'll show you how to sort text-based and numerical data using common sorting
commands, as well as how to clear sorts.

Page | 160 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

Laboratory Exercise 11

SORTING RECORDS

Sorting records

Sorting is probably the simplest way to look at data because it keeps similar things together. In our
bookstore database, for example, we could sort our data a few ways:

 We could sort orders based on the order date.


 We could sort customers by the state in which they live or by their zip codes.
 We could sort our books by author, category, or price.

Access 2007 allows you to sort the records in your database tables based on a field or value that is either
text—like an author's last name—or numerical—like a customer's zip code or a book's price. Depending
on the type of value, Access offers different sorting options.

Sorting on text values

When Access 2007 sorts on a text value, it offers the two options described in the table below:

Sort Option Also Called Description

A to Z Ascending Values closest to A are displayed first

Z to A Descending Values closest to Z are displayed first

To sort based on a text value:

 Click the drop-down arrow at the top of the field you want to sort.

College of Engineering and Computer Studies (SY 2020-2021) Page | 161


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

 When the menu appears, select either the Sort A to Z or the Sort Z to A option.
o With A to Z, the records will be sorted based on the chosen field's value with
the value closest to A at the top of the table, as seen below.

o With Z to A, the records will be sorted the using the chosen field's value with
the value closest to Z at the top of the table.

The sort command section in the Sort group on the Ribbon is another way to begin a
sort.

Sorting on numerical values

Access 2007 also offers two options when sorting based on a numerical value. These options are
described in the table below:

Sort Option Also Called Description

Smallest to Largest Ascending Values closest to 1 are displayed first

Largest to Smallest Descending Values farthest from 1 are displayed first

To sort based on a numerical value:

 Click the drop-down arrow at the top of the field you want to sort.

Page | 162 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

 When the menu appears, select either the Lowest to Highest or the Largest to
Smallest option.

o With Smallest to Largest, records will be sorted based on the chosen field's
value, with the value closest to 1 at the top of the table.
o With Highest to Lowest, records will be sorted the using the chosen field's
value, with the value farthest from 1 at the top of the table, as seen below.

College of Engineering and Computer Studies (SY 2020-2021) Page | 163


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

 The sort commands in the Sort & Filter group on the Ribbon can also be use to begin a
sort.

 To clear a sort:

o Click the Clear Sort command in the Sort & Filter group on the Ribbon.

.
 Open the Customers table and the Books table.
 Sort the Last Name field in the Customers table from Z to A.
 Sort the Books table according to Price using the Lowest to Highest option.
 Clear your sorts

Page | 164 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

Introduction

Another useful way to look at—or analyze—the data in a database is


by filtering it. Filtering groups your data together based on one or more criteria for a given field, then
displays only the records that contain those specified values and criteria. Filtering data is easy with
Access 2007. In this lesson, we'll show you how to filter records using common filter commands. You'll
also learn how to use the toggle button to switch between filtered and unfiltered results, as well as how
to perform advanced filters and save the filtered results.

Laboratory Exercise 12

FILTERING RECORDS

Filtering records

When you tell Access 2013 to filter your records, you are asking it to:

 Search all of the records in one table


 Find every record in that table that meets the criteria you set
 Display the results for you in the table by hiding records that do not meet the criteria

You can filter data using what Microsoft calls the Filter by Field and Filter by Selection methods.
Additionally, Access 2013 can perform an Advanced Filter, which is essentially a small query that is run
on only one table. These options are described in the table below.

College of Engineering and Computer Studies (SY 2020-2021) Page | 165


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

Method Description

Lists all of the values that have been entered in a specified


field so you can choose which value or values you want
Filter by Field Access to find

Offers the ability to search records based on the value that is


currently selected in a table; you can ask it to find records
that:

 Equal the value


 Do not equal the value
 Contain the value
Filter by Selection  Do not contain the value

Narrows filtered results further by performing additional


filters or sorts
Advanced Filter

Filtering by field

When you Filter by Field, Access 2013 finds all of the values that have been entered in the specified
field. Access lists all of these values for you so you can choose which value or values you want Access to
find for you within that field. Once you choose which value to filter by, Access returns the results to you
as a subset of records in the table.

To use the Filter by Field feature:

 Highlight the column for the field you want to use as a filter. In the example below, we
are filtering using the State field.

 In the Sort & Filter group on the Ribbon, click the Filter command (it looks like a
funnel).

Page | 166 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

 When the dialog box appears, select the value you want to use as the filter value:
o Checking Select All will return every record in the table. However, clicking
this option when all values are checked will clear the selections.
o Checking Blank will find only records in which the field is empty.

o Check as many of the values as you want to see returned in your results.
 Click OK.

College of Engineering and Computer Studies (SY 2020-2021) Page | 167


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

The results will appear in the table. In the example above, the results are showing all records for
customers living in North Carolina (NC). Notice that all other records are hidden from view but that the
table name is still Customers.

To toggle between filtered and unfiltered results:

As with most actions in Access, you can toggle between your filtered results and unfiltered tables in a
variety of ways:

 Use the label that appears in the navigation bar, as seen above
 Use the Toggle Filter button on the Ribbon

Filtering by selection

Page | 168 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

When you Filter by Selection, Access 2007 returns the results to you as a subset of records in the table.
It assumes that your current selection is what you want to use as your filter value, or criteria.

To use the Filter by Selection feature:

 Place your cursor in the cell that contains the value you want to use as your filter value.
 Click the Selection command in the Sort & Filter group on the Ribbon.
 When the list appears, choose one of the options:
o Equals will return all records that have exactly the same value as your
selected value. In the example below, this option would return records for
the City of Raleigh only.
o Does Not Equal will return every record that does not have the same value as
your selected value. In the example below, this option would return all
records except for the ones with Raleigh as a city.
o Contains will return every value that has your selected value somewhere in it.
In the example below, choosing Contains would return records with a City
value of Raleigh, Caraleigh, or Raleighville.
o Does Not Contain will not return records with the selected value anywhere
within the search field. In the example below, clicking Does Not
Contain would return all records except for records that have Raleigh in the
city name—Raleigh, North Raleigh, and Raleighville, for example, would not
show up in the results.

Sorting or filtering the filtered results

Access 2007 lets you narrow the filtered results further by applying another level of sorting or filtering.
To do this:

College of Engineering and Computer Studies (SY 2020-2021) Page | 169


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

 In the table showing your filtered results, select the field or value you want to use as the
basis for a deeper sort or filter.
 Apply the additional filter or sort.

Another way to do this is to use the Advanced Filter command.

Using advanced filters

An Advanced Filter is similar to a multilevel sort in Microsoft Excel. An Advanced Filter can help you
further narrow your records. This is like running a miniature query on only one table. It uses a screen
that's similar to the query design screen, and it can even save your results as a query so you can use
them again later.

To apply an Advanced Filter:

o Click the Advanced command in the Sort & Filter group on the Ribbon.
o From the menu that opens, select the Advanced Filter/Sort option.
o The design screen will open so you can set up your filter criteria and/or
sorting order for the various fields in the table.

Page | 170 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

o To sort or filter another field, drag the field name from the table at the top of
the screen to the design portion of the screen in the bottom half of the
window. Then:
 To sort the new field:

 Click in the Sort cell for the field.


 Choose the sort option you want to use from the drop-
down list that appears.
 To filter the new field:
 Click in the Criteria cell for the field.
 Enter your criteria by directly typing it into the cell.
Access will put quotation marks around your criteria,
showing that it is searching for that exact value.

Important: Access will perform the sorts left to right, according to the way they are displayed on the
Advanced Filter design screen. Once all of the sorts are complete, Access will perform filter functions.
Similar to sorts, Access filters from left to right based on the order displayed on the Advanced Filter
design screen.

To view the results, click the Toggle Filter button on the Ribbon.

Your filtered results will appear in a new table. You can save the advanced filter so you can run it again
later if you want.

To save the Advanced Filter:

 Right-click the Advanced Filter design tab.

 Select Save.

College of Engineering and Computer Studies (SY 2020-2021) Page | 171


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

 If the Save as Query dialog box comes up, you must give the advanced filter a name.
This dialog box will only appear the first time you save.

Access 2013 saves Advanced Filters as queries because they are simple queries run on only one table.

 Use the Filter by Field method to filter the Customers table to find all customers from
NC.
 Use the Filter by Selection method to filter the Customers table, looking for all NC
customers NOT in Raleigh.
Hint: Use the Does Not Equal option.
 Practice toggling between the filtered results and the unfiltered tables.
 Apply an Advanced Filter on the Books table to find all of the Kids books, sorted by
price with the highest price first.
 Save your Advanced Filter with whatever name you choose.

Page | 172 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

Introduction

The real power of an Access 2007 database lies in its ability to pull data
for quick analysis, which is what happens when you run a query. Queries allow you to retrieve
information from one or more tables based on a set of search conditions you define. Access 2007 will
display your results in their own table, which you can then further analyze and manipulate. In this
lesson, we'll explain how to plan a query using a three-question planning process. You'll also learn how
to use the Query Design command to run a query, as well as how to modify the query to hide fields or
other information in your query results. Finally, you'll learn how to save the query for later use.

Laboratory Exercise 13

Creating and Using Queries

Using queries

Queries retrieve information from one or more tables based on a set of search conditions you set up
and then combine that information in a way that's easy for you to analyze. If you've used an Advanced
Filter in Access 2007, then you've already run a basic query on only one table. If you want to pull data
from more than one table, though, you'll need to use either the Query Design command or the Query
Wizard.

Before using the Access 2013 query tools, it's important to plan out the query using a logical process.
Otherwise, you may not get the results you expect.

Planning a query

College of Engineering and Computer Studies (SY 2020-2021) Page | 173


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

There are three questions you need to answer when planning a query:

 What do you want the results to look like? Identify every bit of information—or field—
you want included in the results.

 Where is the information stored in the database? List which tables—and/or queries—
hold the information you want to see.
 What conditions do you want the data to meet? This helps determine how to set the
criteria so Access can search the records properly.

Planning: Which customers ordered technology books?

Let's think about this process for our bookstore database scenario. We have a new technology series
coming out soon, and we want to send coupons to customers who have ordered technology books from
us in the past. A query can help us answer the question, Which customers have ordered technology
books from us already? Let's use the three-question process to plan this query.

 What fields do we want to see in the results? We need a list of customer names and
addresses in order to mail the coupons to our customers, so we'll need the results to
show the categories below:

 In which tables is the information stored? For this query, we'll need:
o The Customers table to get customers' names and addresses
o The Books table to know which books are technology books
o The Orders table to know which customers ordered those books
 What is the condition we want the data to meet? We want Access to look for only the
books where the book's category is technology.

Page | 174 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

Using the Query Design command

Once you've planned out your query, you can build and run it using Access 2007's query tools.

To build a query using the Query Design command:

 Select the Query Design command from the Create tab on the Ribbon.

 Use the Show Table dialog box to select which tables and/or queries to include in the
query. Our plan called for all three tables.

College of Engineering and Computer Studies (SY 2020-2021) Page | 175


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

 Drag and drop the fields you want to see in your results to the bottom portion of the
query design screen.

Page | 176 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

 Enter the condition in the Criteria row for the condition field. For our query, we
typed Technology in the cell labeled Criteria for the Category field. As seen above,
Access 2007 puts quotation marks around the term to show that it is looking for exactly
that term within the designated field.

 Once the condition is set, click Run! in the Results group on the Ribbon.

 View your results to determine if they match your desired results.

Hiding fields or other information in the results

Sometimes the results of a query will include information that is seemingly unnecessary to you. Access
2007 allows you to easily hide these fields.

To hide part of the query result:

 In the query design window, deselect the Show option by clicking it.

College of Engineering and Computer Studies (SY 2020-2021) Page | 177


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

 When you run your results, the field you chose will be hidden, as seen below.

Saving the query

Sometimes you will not need to save your results or your query design, and other times you may want
to keep it to run again later or to modify it slightly. Saving a query is easy to do.

Page | 178 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

To save a query:

 Right-click the Query tab.


 When the Save As dialog box opens, give your query a meaningful name.

 Click OK.
 The query will now be listed in the object list on the left side of the Access window.

Plan a query to find out which customers order a certain category of books.
 Use the Query Design command to set up the query.
 Run the query, and view your results.
 Save the query.
 Modify the query to hide a field.

Introduction

You already know how to plan and run a basic query. This lesson will
show you how to run a query that includes a Totals function to group and count the records in the
results. It will also deal with ways to further sort and filter via your query design to further refine your
results.

College of Engineering and Computer Studies (SY 2020-2021) Page | 179


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

Using totals in a query

Sometimes you may want to see your query results grouped or counted in some way. Access 2013 offers
several options to make these functions possible. Perhaps the easiest of these is the Totals command,
whose optional functions are similar to the functions used in Microsoft Excel. These functions include:

 Sum, which is used to add a column of numbers


 Average, which is used to find the average of a column of numbers
 Maximum, which returns the highest value in a field
 Minimum, which returns the lowest value in a field
 Count, which is used to count the number of same values in a query

One of the most useful totals functions to use in queries is the Count function.

Using Count and Group By functions in a query

When you use the Totals command in a query, Access will automatically group every field by the values
in each field. This means it will look for repeating values and group like values together so they appear
as one record rather than as many records. This is called the Group By function.

Let's use our bookstore database as an example. If we run a query to see the information for every book
that has been ordered, we'd get a list that looks like this:

Page | 180 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

Notice that we get a record back for every order of each book that has been ordered.

In our bookstore example query, we want to see these titles grouped together so we see each ordered
title only one time. To do this, we use the Count and Group By options.

To use the Count and Group By options in a query:

 Click Totals in the Show/Hide group on the Ribbon.

The Total row will instantly appear in the bottom portion of the query design screen.

College of Engineering and Computer Studies (SY 2020-2021) Page | 181


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

 Click in the Totals row for the field you want to count. We want to count the number of
times the same Book ID appears in the Orders table.
 From the list of optional Totals functions, select Count.

 Click Run! to see your results. Notice that each title, author, price, and category is now
listed only one time for each book, with an extra column that indicates the number of
times the Book ID appeared in the Orders table.

Page | 182 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

Sorting and filtering query results

Once you have the results looking how you want them, you can sort and filter them to further narrow
your results. This can be done using the methods of sorting and filtering covered in earlier lessons, or by
applying a sort and filter in the query design itself.

To sort via the query design:

 Click the Sort row for the field you want to sort. A drop-down list will appear:

 Choose one of the options:


o Ascending will show the results sorted with the lowest numerical value or the
text value closest to A first.
o Descending will show the results with the highest numerical value or the text
value farthest from A first.
o (not sorted) will keep your records grouped but will not sort them.
 Click Run! to see the results.

To filter via the query design:

 Click the Criteria row in the query design.


 Add your filter criteria by typing the value in the cell, as in the example below:

 Click Run! to see the results.


 Create a query that uses the Count and Group By options.

College of Engineering and Computer Studies (SY 2020-2021) Page | 183


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

 Modify a query design to include a sort.


 Run the query, and view your results.
 Save the query.
 Modify a query design to include filter criteria.

 Run the query, and view your results.


 Save the query.

Introduction

Now that you know how to use queries to analyze the data in a
database, it's time to find out how to create a report that will make the data meaningful to someone
else. In this lesson, we'll show you how to create a report using the Report command, as well as how
to use grouping options and query limits to make the report easier to read and how to identify
several report formatting and layout options that can be set in Layout view. Finally, you'll learn how to
use Print Preview and save the report.

Laboratory Exercise 14

Creating and using Reports

As you know, queries make the data in a database meaningful to you. Sometimes, though, you need to
share that data with someone else. A report is an effective way to present your data using an attractive
layout. The text can be formatted in an Access report similar to how it can be done in Word documents.

Access 2007 offers tools that allow you to create and format a report. The Report Wizard walks you
through the steps of creating a report. The Report command, however, is much easier to use, and all of

Page | 184 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

the formatting options are still available to you in Layout view once the report is created. With these
tools, you can create a report based on a table or query.

Creating a report based on a table

One of the easiest ways to create a report is by using a table as the source of the report. For example, in
our bookstore scenario we have a table that lists all of the books in our inventory. We want to create a
Book Price List report that lists all of the details for each book in our store's inventory.
The Report command makes this incredibly easy because it automatically includes every field in the
source table in the report.

To create a report based on a table using the Report command:

 Choose the table you want to use as the source of your report. To do this, you can
either open the table or highlight the table name in the navigation pane. In our
example, we used the open Books table to create the report.

 Select the Report command on the Create tab on the Ribbon, as seen above.
 The report is automatically generated and includes every field in the table in order of
their appearance in the table. This can be seen in the example below, which was
created from the table above.

College of Engineering and Computer Studies (SY 2020-2021) Page | 185


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

The layout and formatting of the report can be manipulated in Layout view.

Creating a report based on a query

Access 2007 can also create a report using a query as the source. The process for creating a report based
on a query is identical to the process for creating a report based on a table, which was outlined on the
previous page. And just like when making a report from a table, every field and record that appears in
the query results will appear on the report.

It's possible to limit the number of records in a report, but only if the report was based on a query. The
limit is set in the query itself, using the query design screen.

To limit the number of records in a report:

 Open the query in Design view.


 Use the Return option in the Query Setup command group to set the number of
records you want to see in the query results and in the final report.

Page | 186 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

 Click Run! to make sure the query results look like you want the report to look.
 Create the report using the Report command on the Create tab.
 Format the report as desired.

Grouping items on a report

Grouping items on a report can make it much more readable. Access 2007 offers a quick and easy way
to add grouping to a report.

To add grouping to a report:

 With the report open, select the Group & Sort command from the Grouping &
Totals command group on the Format tab on the Ribbon.

 This opens a Group, Sort, and Total dialog box in the lower portion of the window.

College of Engineering and Computer Studies (SY 2020-2021) Page | 187


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

 In the Group, Sort, and Total dialog box, select Add a group.
 Select the field you want to group by from the drop-down list. We chose to group our
list by Category.

 When you release the mouse button, the report will now appear with items grouped.
Our report is grouped on Category now, as seen below.

Page | 188 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

The Group, Sort, and Total dialog box will remain open until you close it.

Formatting a report in Layout view

Access 2013 opens the created report in Layout view so you can easily make modifications. In Layout
view, you can change the look of your report in many different ways, including:

 Deleting columns and other report elements


 Moving and resizing columns
 Adding a logo
 Changing the title and other text on the report headings

 Applying a report style with AutoFormat


 Modifying the page layout

To delete a column or other report element

 Highlight the element by clicking it.

College of Engineering and Computer Studies (SY 2020-2021) Page | 189


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

 Hit the Delete button on your keyboard.

To move a column or other report element:

 Highlight the element by clicking it.


 Drag and drop the element to a new location on the report.

To resize a column or other report element:

 Highlight the element by clicking it.

 Drag and drop the edge of the element to the new size on the report.

To add a logo to the report:

 Click the Logo command on the Format tab on the Ribbon.

 When the Insert Picture dialog box opens, find the picture file.

Page | 190 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

 Click OK.

To modify the title of a report:

 Click the Title command on the Format tab on the Ribbon.

 When the highlight appears, type the new title.

To modify text in report headings:

If you don't like the standard font face and size Access used to create your report, you can modify them
using common Microsoft Office text formatting commands. You can modify the size, font face, font
color, alignment, and much more. They all work basically the same way.

 Highlight the text you want to change.

 Select the formatting option you want from the lists that appear when you click a
command.

 The change appears when you release the mouse button.

To apply an AutoFormat style:

Like with forms, Access 2013 offers a variety of report styles in the AutoFormat command. To apply a
style:

 Click the AutoFormat command on the Ribbon.

College of Engineering and Computer Studies (SY 2020-2021) Page | 191


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

 Select a format from the drop-down list. The change is applied instantly.

To change the page layout:

When a report is created, it opens in Layout view, like the one in the picture below. The dotted lines are
showing where the edge of the page will be in Report view.

To change the page layout options:

 Switch to Print Preview using the Views command on the Ribbon.

Page | 192 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

 Select the layout option you want to alter from the Page Layout command group on the
Ribbon.

All of the standard Microsoft page layout options are available, including:

Page Layout Option Description

Margins To set the margins for narrow, wide, or normal

To select either
Orientation a portrait or landscape orientation

Size To set paper size

Saving a report

When you have created and modified a report and try to close it, Access 2007 will prompt you to name
and save the report. If you do not need this report again, you do not need to save it. However, if you
think you may want to publish it again, it is best to save.

College of Engineering and Computer Studies (SY 2020-2021) Page | 193


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

To save a report:

 Right-click the Report tab.


 Choose Save from the list that appears.
 When the Save As dialog box opens, give the report a name.

 Click OK.

Challenge!

If you haven't already done so, save the sample Ready2Read database to your computer.
 Create a report based on a table.

 Create a report based on query.


 Modify the layout of a report by:
o Resizing or moving columns
o Deleting report elements
o Giving the report a new title

o Applying an AutoFormat style to the report


o Using groups, sorts, or totals in a report

Page | 194 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

Laboratory Exercise 15

Supplemental Laboratory Exe Importing Data

1. Importing Records.
Open the attached Excel file (Library [Link] and Student [Link]), and make changes to it so
that each worksheet will import successfully.
A. Import the Library Books worksheet into a new table of the same name. Select Book ID as your
primary key and check that you have 93 records:

Index or Primary key cannot contain a Null value Error. In case you encountered this error, click OK,
then Open your newly created Library Books table.

College of Engineering and Computer Studies (SY 2020-2021) Page | 195


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

Scroll down to the 93rd row and observe that there are empty cells. Highlight the empty
records and hover your mouse on the lower right corner of the selected cells and
select delete record.

Click Yes.

Page | 196 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY
ACCS 211 Engr. Irene Cecile L. Calaycay

Continue the deletions until you reach the asterisk and you are left with 93 records.

College of Engineering and Computer Studies (SY 2020-2021) Page | 197


NOTRE DAME UNIVERSITY
Engr. Irene Cecile L. Calaycay ACCS 211

Delete unnecessary columns if applicable.

This should be the final status of your Library Books Table. An asterisk should follow the
93rd record.
In the design view, do the following:
Set the Field Size field property of the field Book ID to Double.
Set the Indexed field property of the field Book ID to Yes (No Duplicates).
Set the field Book ID as the primary key.

Page | 198 College of Engineering and Computer Studies (SY 2020-2021)


NOTRE DAME UNIVERSITY

You might also like