Access 2019 - Level 1 - Student Reference Guide - AOLCC
Access 2019 - Level 1 - Student Reference Guide - AOLCC
Level 1
Student Reference Guide
Please note:
The images in this reference guide are based on running Microsoft Access 2019 Professional
Plus edition on a Windows 10 platform. If your computer is running a different version of
Access or a different version of Windows, the location of some commands and features may
differ from what is shown.
DISCLAIMER
While Academy of Learning Career College takes great care to ensure the accuracy and quality of
these materials, all material is provided without any warranties or representations of any kind or
with respect to use or performance thereof, whether expressed or implied, statutory or arising from
otherwise in law or from a source of dealing or usage in trade, including but not limited to implied
warranties or conditions of merchantable quality or fitness for the particular purpose of the User.
Trademark Notices: Academy of Learning Career College and the Academy of Learning Career College logo are
registered trademarks of LaunchLife International Inc. Microsoft is a registered trademark, and Windows, Word,
Excel, and Access are trademarks of Microsoft Corporation. All other product names and services identified
throughout this book are trademarks or registered trademarks of their respective companies. They are used throughout
this book in editorial fashion only and for the benefit of such companies. No such use, or the use of any trade name,
is intended to convey endorsement or other affiliation with the book.
Copyright ©2022 LaunchLife International Inc. This publication, or any part thereof, may not be reproduced or
transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, storage in an
information retrieval system, or otherwise, without the prior written permission of Academy of Learning Career
College.
Student Reference Guide Microsoft Access 2019 - Level 1
Table of Contents
Course Overview .......................................................................................................................................... 1
Course Objectives ........................................................................................................................................ 4
Module 1 - Introduction to Microsoft Access 2019 ..................................................................................... 2
Learning Objectives.................................................................................................................................. 2
Submodule A – Starting Access ................................................................................................................ 3
What is Access 2019?........................................................................................................................... 3
Just the Facts ....................................................................................................................................... 3
Starting Access ..................................................................................................................................... 3
Components of the Access 2019 Window ........................................................................................... 6
Types of Databases .............................................................................................................................. 7
Submodule B – Using Database Templates ............................................................................................. 8
Using Database Templates................................................................................................................... 8
The Welcome Screen ......................................................................................................................... 10
Submodule C – Creating, Saving, and Renaming Databases .................................................................. 11
Opening, Saving, and Renaming Databases ....................................................................................... 11
Submodule D – The Access Workspace and Backstage ......................................................................... 17
Recent and Pinned Databases ........................................................................................................... 17
The Access Workspace ....................................................................................................................... 18
The Access 2019 Navigation Pane...................................................................................................... 20
Navigation Pane Forms ...................................................................................................................... 22
The Access 2019 Backstage................................................................................................................ 24
Submodule E – Online Help and Tell Me What You Want To Do ........................................................... 28
Accessing Online Help ........................................................................................................................ 28
Accessing Contextual Help ................................................................................................................. 29
Tell Me What You Want To Do .......................................................................................................... 30
Module 2 - The Ribbon and Toolbars......................................................................................................... 31
Learning Objectives................................................................................................................................ 31
Submodule A – Working with the Ribbon.............................................................................................. 32
Ribbon Components .......................................................................................................................... 32
Contextual Ribbons and Other Functionalities .................................................................................. 34
Submodule B – The Quick Access Toolbar ............................................................................................. 36
Course Overview
This course provides an overview and introduction to the different features available in the
Access 2019 database management application.
Microsoft Access is a popular database management application that helps you store and
manage large amounts of information for referencing, reporting, and analysis.
In this course, you’ll learn the core features
of Access, and you'll get to try out the
concepts you learn by practicing the
processes directly with the software, just as
you would in a work environment. You’ll be
given opportunities to explore and practice
the techniques covered in the course so
that you’ll feel ready and capable of using
the software in any setting.
We hope you enjoy the course!
This course consists of nineteen modules of
content. Below is a summary of the course
content in each module.
Module 1
Module 1, Introduction to Microsoft Access 2019, explores the fundamentals of using Access, including
starting Access, the elements of the Access 2019 workspace, the functions of the commands in
Backstage area, and the various ways to get help. You’ll also learn how to create a database using an
existing template, and how to open, save, and rename a database file.
Module 2
Module 2, The Ribbon and Toolbars, looks at how to use the ribbons, the Quick Access Toolbar, and the
Status bar. You'll learn how to identify ribbon components, customize ribbons, add commands to the
Quick Access Toolbar, and explore contextual menus.
Module 3
Module 3, Keyboard Shortcuts and Key Tips, looks at how to use the keyboard to work with Access
2019. You’ll learn how to access keyboard shortcuts and use Key Tips.
Module 4
Module 4, Access Options, explores how to use Access Options to modify the Access environment to
your preference.
Module 5
Module 5, Tables, explores the use of tables. You’ll learn how to create a table, add fields and set field
properties, index a field and add data, create lookup fields using the Lookup wizard, and add number
into tables.
Module 6
Module 6, Importing Data, examines different ways of importing data into the Access 2019 database.
You’ll learn how to import data from Excel and from a text file.
Module 7
In Module 7, Backup, Compact, and Repair, you’ll learn how to back up a copy of a database and
explore the Compact and Repair command.
Module 8
Module 8, Datasheet View, you’ll look at using Datasheet View to modify fields, create filters and sort
records, and modify data.
Module 9
Module 9, Relationships Between Tables, explores how to create a Link Table and set up relationships
between tables.
Module 10
Module 10, Forms, examines how to create and design forms. You’ll create a form, modify forms in
Layout View, work with forms in Design View, and customize form design.
Module 11
Module 11, Subforms, looks at how to work with subforms. You’ll learn to create a simple subform,
prevent editing of a subform, and link subforms with other database objects.
Module 12
Module 12, Queries, looks at creating queries, creating joins in a query, using the Query Wizard and the
Query Builder.
Module 13
Module 13, Expressions, looks at expressions used in an Access database. You’ll learn how to set up
validations using the Expression Builder and how to calculate using expressions.
Module 14
Module 14, Reports, explores creating and designing reports. You’ll learn to create basic and complex
reports and format reports in Design View.
Module 15
Module 15, Printing and Print Properties, explores different aspects of printing in Access. You’ll learn
how to create an object definition, explore print properties, and how to access print and print options.
Module 16
Module 16, More Data Types, looks at creating fields with Yes/No and Attachment data types and using
Check Box and Attachment controls is forms.
Module 17
Module 17, More About Forms, explores forms in greater detail. You’ll learn how to use specific form
controls, customize forms using themes, and how to create and format Navigation forms.
Module 18
Module 18, Exporting Databases, examines the different export options in Access. You’ll learn how to
export an Access object to Excel and to a PDF.
Module 19
In Module 19, Additional Backstage Features, you’ll explore additional ways to customize Access using
Access Options and the Info tab in the Backstage area.
Course Objectives
Upon completion of the Microsoft Access 2019 course, you will be able to:
ü Describe the components of the Access ü Sort and filter records
2019 window
ü Change the order in which records appear
ü Explain the functions of the commands in
Backstage area ü Create relationships between tables
ü Create, save and open databases ü Create forms and modify their design and
layout
ü Identify various database objects, including
tables, queries, forms, and reports ü Create subforms
ü Repair and fix errors in a database ü Export Access objects to Excel or to a PDF
ü Enter and modify data in Datasheet view ü Safeguard a database by encrypting it with
a password
Starting Access
Let us look at how to start the Access 2019 application.
1. To open Access, type “access” in the Search box at the bottom of the screen.
3. You can directly open the application from here or you could add it to your taskbar.
4. To add the application to your taskbar, right-click Access and select Pin to taskbar from the drop-
down menu.
5. The Access icon appears on the taskbar. Having the application in the taskbar makes accessing it
easier. This feature is available in Windows 7, Windows 8, and Windows 10.
Note: The layout of the Start screen may differ slightly for the various versions of Access 2019. The Start
screen shown in the image is from the Access 2019 Professional Plus edition. Other versions of Access
2019 will provide the same options on the Start screen though their placement may differ.
Top Bar
Please review the components in the top right-hand corner of the screen.
Menu Bar
The panel on the left is called the Menu Bar.
Note: The layout of the Menu Bar may differ slightly for the various versions of Access 2019. The Menu
Bar shown in the image is from the Access 2019 Professional Plus edition.
An existing template is a good starting place to begin. You can select from template options, such as
asset tracking, contacts, students, event management, nutrition tracking, etc.
Note: The layout of the New tab may differ slightly for the various versions of Access 2019. The New tab
shown in the image is from the Access 2019 Professional Plus edition. Other versions of Access 2019 will
provide the same options though their placement may differ.
Types of Databases
The two broad types of databases in Access 2019 are:
• Desktop database - a traditional database that is kept on your desktop for you to use locally
• Web App - a database that you use online and share with others
Selecting a Database
Start Access and click the Contacts icon on the screen that appears.
Note: In some versions of Access, you will need to click the New tab and then click the Contacts icon.
As you become a proficient database user, you may wish to create Welcome screens for databases you
create. Welcome screens can be useful when you want to share the database you've created with others
and provide guidance on how to use it.
Opening a Database
Open Access from your taskbar and you will see the recent file that you’ve created.
Close the Welcome screen that appears by clicking X at the top right of the screen.
Note: You can open a database from any location. For example, you can open databases stored on your
computer, or you may open databases saved to OneDrive or other cloud storage services.
Saving a Database
You can save the database using the Backstage area.
Note: In the case of a blank database, you will be asked to rename the default table before saving the
database.
You can also save a database as a different file type or in a specific location by clicking Save As in the
Backstage area.
A database is a collection of all objects inside of a database that make data access necessary or more
readily available.
An object is a single item inside of the database, such as a table, a query, a form, a report, a macro, or a
module.
1. Save Database As - This will save the entire database in one file. All the open objects in the database
must first be closed (but the database remains open) before the database itself can be saved. You
can tell that the database is open when you see the Navigation Pane of all the objects on the left
hand side of the screen, but no open database objects on the right hand side of the screen.
2. Save Object As - Allows you to save individual objects inside of the database as objects inside of the
single Access (.accdb) file. We will cover each of those objects in later lessons.
Renaming a Database
In order to rename a database, you can simply save the database as a different filename. To rename a
database, click File and then click Save As.
For most databases, you can select the default database or the first option. Be sure that all objects in the
database have been closed before saving the database file. If they have not been saved first, you will
receive a message asking to save the unsaved objects in the database. Click Yes.
Recent Databases
The Recent tab shows the list of recent databases you've worked on. Each time you create a new
database, it will appear under the Recent tab. As this list gets longer, some of the earlier databases will
drop off the list.
Pinned Databases
You can pin databases you use frequently so that they are easily accessible when you launch Access. To
pin a database, hover your mouse over the name of the database in the list under the Recent tab. Click
the Pin this item to the list icon (see pushpin image below). The database appears under the Pinned tab
and will remain there until you unpin it. To unpin it, go to the Pinned list, find the file and its pushpin
icon, and click the pushpin icon again to the unpin position. This will cause the file to drop off the Pinned
list.
When working with Access, you will notice that there are contextual tabs and ribbons that appear for
specific tasks. For example, when creating a table, the Table Tools tab with its relevant ribbon appears.
These tabs will be described later and are very useful for different object-specific functions.
Status Bar
At the bottom of the screen is the status bar, which displays various pieces of status information. This
can be information on the page number, word count, read mode, and so on. It can be customized, as
well. If you right-click this bar, you will see all the options in the Customize Status Bar menu that you can
get information about.
For example, if Caps Lock is checked, it means that the Caps Lock key is ON and you will see that
indicated on the status bar. You can choose the information you want to display in the status bar by
checking or unchecking the options in the Customize Status Bar menu.
Search
Use the Search box to search for a database object, such as a form, a report, a query, etc., in the
Navigation Pane. Once you've entered your search term(s), click the magnifying glass to initiate the
search. Your search will result in a list of objects from all categories that has a part that matches your
search.
Drop-down List
The drop-down arrow at the top of the Navigation Pane provides other options to help you find and
work with Access objects. For example, it allows you to only look for one particular type of object, or it
allows you to find something that you have recently created. Sometimes the Navigation Pane can
appear blank and the selections here will be one of the reasons why that happens. Simply select All
Access Objects to go back to the default view.
A form is the spreadsheet-like component seen in the main window. Each form has two types of views:
• Layout View
• Design View
You can choose the view by right-clicking the respective form and selecting Layout View or Design View.
Both views allow for design and layout changes; however, certain tasks can be performed better in each
of the views. Let’s understand these better.
Note: Some of the information presented below is not mentioned in the video; however, it has been
added to provide greater clarity on the subject.
Layout View
Layout view shows the actual data of the form. This view helps you to see the visual appearance of the
form, usability, and the number of fields. You can use this view to rearrange fields, change their sizes, or
apply custom styling. For example, the Layout view of the Contact List form shows one contact
occupying one row of the form.
Design View
Design view provides a detailed view of the structure of the form. In Design view, you can format every
individual area of the form. For example, in the Design view of the Contact List form, one of the
modifications you can perform is to resize the different fields.
Info
Info provides information on the current database related to repairing files and adding password
encryption.
Compact and Repair can also be done on the Database Tools Ribbon.
Save As
Save As will allow you to save a database with different attributes, such as a different file name.
Print
Print provides three options - a Quick Print, standard Print, and Print Preview. Most printing of a
database, however, is done with a Report, which we will learn about in a later module.
Close
The Close tab closes the current database. It does not close Access.
Account
At the bottom left of the screen, you’ll see Account. Account shows which account is being used for the
current copy of Access 2019. It shows OneDrive connections and Office Updates. You can also change
your Office background and theme from this screen.
Feedback
Feedback allows you to send feedback or suggestions to Microsoft.
Options
Options helps you set up Access according to your needs. One option that has already been set in our
previous template is the option to open the Contacts form automatically when a database is opened.
The most popular method to access Help is to press the F1 key on your keyboard. Pressing the F1 key
opens the Help pane.
You could:
In some cases, clicking the contextual help icon may not take you directly to the relevant Help page. If
that happens, you can look up your query in the given categories or search using the Search facility.
Use the Tell me what you want to do feature to quickly understand features or tools you want to use.
For example, if you type add a form in the search box, it displays options that can assist you in adding a
form. It also displays Help topics.
Standard Ribbons
Standard ribbons are the ribbons you see when you open Access, namely, the ribbons for the Home,
Create, External Data, Database Tools, and Help tabs. We touched upon these in the last module and
will understand these better in this module.
Groups
Each ribbon has a series of groups. Each group has a set of commands that belong together and are
separated from each other by a vertical dividing line. For example, under the Create tab, you see groups
such as Templates, Tables, Queries, Forms, Reports, and Macros & Code.
Grayed-Out Commands
You notice that some commands are grayed out. Grayed-out commands get activated when the need
arises. For example, in the Clipboard group, notice that Cut, Copy, and Format Painter are grayed out,
because there is no text in the database form. These commands get activated once you add and select
text in the rows and columns.
Contextual Ribbons
Contextual Ribbons are ribbons that appear only when you need to use them. Contextual ribbons
declutter your screen and present only the options that you require.
The list on the right are the default commands that are on the Quick Access Toolbar.
Note: You can also add separator lines between two commands in your Quick Access Toolbar by adding
<Separator> between the two commands.
Example 2
In this second example, let’s view the contextual menu for the Email Address field. Note that the
contextual menu for the Email Address field has a different set of options than the previous example.
Default View
The default commands at the bottom right of the Status bar are Form View, Layout View, and Design
View. Instead of accessing these views using the Home tab, you can access them easily in the bottom
right corner of the Status bar.
Customization
You can customize the Status bar by right-clicking it and accessing the Customize Status Bar menu. Add
or remove any of the options for which you do or do not need information on.
One very helpful feature of the status bar occurs when you run a query. The status bar will let you know
the percent of your query that has been completed so that you can monitor the process.
Screen Tip
A screen tip is the small window that appears when you hover your mouse over a command. Most
screen tips include keyboard shortcuts.
Key Tip
When you press Alt on your keyboard, it shows the Key Tips for the tabs. We’ll explore these in greater
detail in the next submodule.
Help
You can also use Help to look up keyboard shortcuts. You can click the Help tab or press F1 on the
keyboard to open Help.
Cut CTRL+X
Copy CTRL+C
Paste CTRL+V
Save CTRL+S
Print CTRL+P
Undo CTRL+Z
Spelling F7
Apart from the Alt key, you can also use the Tab and Esc keys to perform tasks using your keyboard:
• Use the Tab key to move to the next screen object.
• Click the Esc key to close or quit objects or tasks.
You can preview how a feature in your database is affected by hovering over the feature, if the Enable
Live Preview option is selected.
For example, the Themes preview shown below.
Screen tips can occupy space and can hide commands. If that hampers your work, you may select the
second and third options from the drop-down.
Creating Databases
The Creating databases option helps you select:
• The Access version from a drop-down list. Since Access 2019 is not in the list, you can select Access
2007 – 2016.
• The folder where you want to save all your Access databases. You can continue the default location,
or you can Browse and add a location of your choice.
• The language for sorting the data in your database. General – Legacy, which is English, is selected by
default. You can select the language of your choice from the list.
Note: The Office Background option may not appear in some versions of Access.
Application Options
Application Options is where you select options related to the database and the form.
Navigation
You have the option to not display the Navigation Pane in your database. By default, the Display
Navigation Pane option is selected in the Navigation option. You can deselect it to remove the
Navigation Pane from the database. This feature is useful in restricting access when you share your
database with another person, so that they don’t go into the Design View to change or delete any data.
Language Options
The Language tab in Access Options allows you to set your language in Access.
Once you have added a language, it will be displayed in the box at the top (see image below).
Module 5 - Tables
Learning Objectives
In this module, we will create a table, understand its components, and perform basic table operations.
By the end of this module, you will be able to:
1. Create a table
2. Add a Field and set Field Properties
3. Explore indexing
4. Use the Lookup Wizard
5. Add numbers into a table
A file can contain multiple tables and those tables can be linked together through queries, reports, or
forms.
We will explore all of these components later in the course.
Let us look at a few key features of a table.
Table Names
When a table is first created in Design View (or when switching over to Design View when creating a
table in Datasheet View), Access asks you for a table name. In the above example, the Products table
has already been created for you and named Products. If you double-click the Products table, it will
open to Datasheet View where you can directly edit, add, or delete data.
Note: Some Access developers like to use a prefix for the type of object that is created. For example, for a
table, the prefix tbl would be used followed by a capital letter for the purpose of the table, such as
tblProducts. Below is a list of the prefixes commonly used for different objects in Access:
Prefix Object
tbl Table
qry Query
frm Form
rpt Report
Deleting a Record
If you’ve entered an incorrect record and would like to delete the entire row, that can be done by
clicking in the darker gray area to the left of the first column in the table of the record you wish to
delete. The entire row should then be highlighted. From there, simply click Delete on the keyboard or
right-click and choose Delete Record. Access will confirm whether or not you want to delete the record
with a message box. Click Yes to continue deleting the record.
The ID Column
The first column where you typically add values in a table is the ID column. It’s very important to have a
field in each table that uniquely identifies each record. This unique identifier is called a Primary Key. The
primary key can be a field with unique values being entered, such as a Product Code, a Student ID, or
any other kind of ID system.
The primary key can also be automatically generated as a unique field by setting its data type to
Autonumber. With an Autonumber, each time a record is added, the ID field will increase by 1 more
than the previous record so that your IDs are unique and sequential. If a record is deleted, the ID will
become the next number that would have been used, not the deleted record’s ID, in order to avoid any
confusion with related records in other tables. Autonumber fields are not editable.
The benefit of using an Autonumber is that the primary key is managed for you automatically. If you use
another type of ID, you will have to ensure that you are always entering a unique value for your primary
key. Otherwise the table will return an error for any duplicate IDs.
The primary key should always be unique from all other records in a table. If a table references the
primary key of another table in that table’s field (i.e., in a relationship), it will be what is known as a
foreign key pointing to the primary key of another table. We will learn more about creating a primary
key and primary key / foreign key relationships a little later in the course. For now, just remember that a
primary key uniquely identifies a record in a table.
Creating a Table
Creating a Table
You can create a table in any database using the steps given below:
Table Components
A table has records (rows), fields (columns), and field values.
1. A field is a vertical column of data about one aspect of the table, such as the first name or an
e-mail address. Fields have a datatype, such as text, numbers, or dates.
2. A record is a horizontal grouping of specific data, like information about a particular person, place,
or product.
3. A field value is the value assigned to each record. For example, Olivia or Rodriguez or
[email protected].
When you open a table in a blank database, by default there is only one field called ID. To add data, you
can add fields in Design View of the table.
Field Components
Note: Some information on this screen, such as information on the properties AutoNumber and Input
Masks, is covered only in the reading topics. We have added this information because they are useful to
know when working with tables in Access.
When you add a field name in Design View, you also need to specify the data type along with an
optional description. Let’s understand these three components that appear at the top of the table.
Field Name
Field names can have up to 64 characters (letters or numbers), including spaces.
By default, the first field in a new table is named ID with the datatype of Autonumber. A field name
added in Design View will appear as the column title in Datasheet View.
Data Type
A datatype indicates what kind of data can be stored in a field. You need to specify the type of data for
each field name in the database. Each field can store data consisting of only a single data type. As seen
in the image below, some of the datatype options include Short Text, Long Text, Number, Currency, etc.
By default, for the field name ID, the data type is set to AutoNumber.
To review, AutoNumber is a unique number assigned by Access whenever a new record is added to a
table. AutoNumber fields are used to create an identity that uniquely identifies each record. These fields
cannot be updated. They can be a set of unique numbers in increments of 1 or completely random
numbers.
Description
Descriptions are onscreen instructions or help for adding data to your table and can make it easier for
other users to see the purpose of the data in the table. The description is optional. When you select a
field, the description you have added appears in the Status Bar for the table.
Field Properties
Properties are characteristics that are relevant to the selected field. When you add a field in Design
View, you have the option to define the properties for that field. These properties allow you to add
more information about the datatype for the field, such as the size limit for text fields or a more specific
number type for number fields (such as decimals / no decimals), and so on. They help prevent incorrect
data from being entered into the field and can also control the appearance of data.
A field property applies to the entire row or field. Here are the steps to access field properties in Design
View:
Field Size
The property of Field Size is used to set the number of characters needed in a text or number field. The
default field size for the Short Text type entry is 255 characters. For example, if the data in the field is
likely to have two or three characters, you can keep the field size as 5. There is a datatype called Long
Text that will allow you to store more than 255 characters if necessary, but sometimes it can slow down
searches and limit sorting and filtering, so keep that in mind and use it sparingly.
Input Mask
An Input Mask provides a format for entering telephone, social security, date, time, and other numbers
that have dashes, parentheses, or some form of punctuation.
Input Mask is used only in text and data fields. When you click the Input Mask property, the Input Mask
Wizard opens. Follow the instructions in the Wizard to format your desired input mask for the field.
Default Value
The Default Value property specifies text or an expression that is automatically entered in a field when a
new record is created. The maximum length for a Default Value property setting is 255 characters. A
good example for using a default value is when you need the date to be set automatically to the current
date.
Required
You can use the Required property to specify whether an entry is required in a field. If this property is
set to Yes, you must enter a value in the field to save that record , otherwise Access will return an error
to the user. By default, the property is set to No.
For example, in case of a trip with a unique trip code, your trip code can be indexed. You could also
index the location, but it is possible that you may have multiple trips with the same location. You should
not index the description, because it is not something you would search for.
Indexing a Field
Once you have created a field, select the data type in Design View.
There are two ways to index a field:
Note: Keep in mind that the more fields you index, the speed of searching may improve, but the speed of
data entry will slow down because Access updates the indexes each time a record is added or changed.
Thinking back to our book sorting analogy, if you have too many sorts, it’s going to take longer to find
where exactly to put a book on the shelf. So indexes help with getting the data OUT, but slow down the
process of getting it back IN.
In choosing this, we are telling Access that the possible values are to be drawn from a list. The list can be
entered in two ways (see image below). If your list is stored in another table or query, you can choose
the first option, and then select the table or query that contains the values. We will explore this option
in a later module.
With the second option, you can create your own values by adding them in the Lookup Wizard dialog
box.
When you click Next in the above dialog box, you get the following options:
When you select Number or Currency in Data Type, the Field Properties box appears at the bottom of
the screen. You need to update the fields in this box to customize the table for your data. Let’s look at
the field properties on the next screen.
Note: The Currency field has the same properties, except for Field Size.
Field Properties
Let’s understand the fields that are important for adding numbers or currency in the database.
Field Size
The Field Size property is important in the Number field because it determines the range of field values.
It helps you set the maximum number of characters that can be entered in the field.
For example, if you want to enter five-digit zip codes, select Byte in the Field Size box. This means that
you will not be able to enter a six-digit zip code.
Note: If you need to store a decimal, it is common to use the Double Field Size.
The Field Size property has the following settings in the drop-down:
Replication ID* For storing a globally unique identifier (GUID) required for
replication; this number is generated randomly.
Note: The Currency field does not have the Field Size property.
Validation Rule
Validation Rule is a rule for entering data in a particular field. Use it in conjunction with the Validation
Text property.
Validation Text
Validation Text is the message that appears when someone adds data that violates the Validation Rule.
This text will depend on the rule.
Required
In the Required property, you can set if data needs to be entered for a particular field. By default, the
field is set to No, which means no data needs to be entered. However, if you choose Yes from the drop-
down and do not enter data, a message box will remind you to add data.
From File
The From File option allows you to import from an Excel file, an HTML Document, XML File, or a Text
File.
From Database
The From Database option allows you to import from another Access database, SQL server, Azure
database, or dBASE file.
You also need to specify how and where you want to add the data in the current database. There are
three ways you can do this:
The Import Wizard automatically analyzes your data from Excel (see image below) and categorizes the
data into fields for the new table. It even guesses at what the datatype should be for each field based on
the kind of data it seems to be at its source.
Once you’re satisfied with the options that have been selected, click Finish and your data will be
imported into a new table in Access. The steps for this import can be saved in case you import another
table in a similar format to this one.
Exclusive Mode
A database needs to be in an Exclusive mode before you perform the compact and repair operation.
Click Open in the Backstage area and then, click Browse. Select the file you want to open in exclusive
mode.
Views
In the previous modules, we have explored the Views group, which allows you to switch between
Datasheet View and Design View.
Properties
Formatting
The Formatting group displays the formatting options for a given field.
Field Validation
The last group on the Fields ribbon is the Field Validation group. It has four commands -- Required,
Unique, Indexed, and Validation. You have gone through these in the module about tables.
Filtering
Filters allow you to view only specific data. The filter searches for your search criteria in the entire table
and finds the appropriate records. It hides the ones that do not match the criteria.
There are two ways you can filter data:
1. Select the field and then click the Filter command in the Sort & Filter group.
2. Select the field and click the drop-down arrow next to the column header.
Text Filters
When you are filtering data in a text entry field, you can use Text Filters to filter data. A more commonly
used filter would be Contains… where you can enter a word or phrase to be found within a larger group
of words.
Number Filters
When the field has numbers, you can use the Number Filters in the drop-down arrow next to the
column header. There is a wide variety of ways to filter numeric data, such as greater than, less than,
between, equal to, etc.
Toggle Filter
The Toggle Filter command helps you to switch between the filtered and the unfiltered view. This
command gets activated only after you have filtered any of the data.
Advanced
The Advanced command provides advanced filtering options such as Clear all Filters, Filter by Form,
Apply Filter/Sort, and Advanced Filter/Sort. We will not be covering these in this course, but you can
look up these advanced features in Help.
Selection
The Selection command is a quick way to filter specific terms. In the image below, since the word LEX is
selected, the command shows filtering options for LEX.
Sorting
Sorting data is arranging the data in a way that makes it easier to understand and analyze. You can sort
data in ascending or descending order. Select a field you want to sort and click either Ascending or
Descending in the Sort & Filter group.
You can also adjust the column width by positioning the mouse over the right edge of the field title until
the cursor changes to this symbol - and then click and drag to make the column wider or narrower.
You can also adjust the row height by clicking and dragging the cursor:
Moving a Field
To move a field to a different location in the table, simply highlight the field then click and drag it to the
desired position. Be sure to hold the mouse button down while dragging.
Note: The position of the field only changes in Datasheet View and not in Design View.
Hiding a Field
You can temporarily hide a field with the Hide Fields option. You can find the Hide Fields option in the
contextual menu by right clicking the column header. This doesn’t delete the field from the table.
To hide a field, right click the column To unhide a field, right click the column heading and
heading and select Hide Fields. select Unhide Fields.
You can also delete fields and records using ribbons. You have already seen how to delete a Field in the
previous module.
When you’re editing a record, also keep in mind that you’re able to press Escape when making changes
in any field and all changes will revert to what the record was before the edit. However, once you click
out of the record into another record OR when you close the table, all changes to a record will
automatically be saved without the option to go back and undo the changes. If you see a pencil icon to
the left of the record, you’re in edit mode. If the pencil is not there, then the changes have already been
committed.
Highlight the field, you want to find and replace data in, then click Find.
Access will highlight the data that matches your entry. Click the Replace tab to replace the highlighted
data.
Next, let’s understand a few important elements for creating relationships between tables.
If you want to add more tables, you can right-click anywhere on the Relationships window and select
Show Table.
A Link Table is created the same way you create any other table – click Table under the Create tab.
Remember that the primary key of one table can become a foreign key in another table.
You can further define the relationship between the tables using the Edit Relationships command,
which opens the Edit Relationships dialog box.
You’ll learn more about the Relationship Type on the next page.
Referential Integrity
Referential Integrity is a feature in Access where the software manages the possible errors that can
happen between related tables if data is changed or deleted. The Referential Integrity feature prevents
users from adding data that is incorrect or from referencing data that does not exist. Referential
Integrity ensures that you do not edit or delete data in one table and not in the other.
You can choose from the following options, after enforcing Referential Integrity:
Cascade Update Related Fields
If the Cascade Update Related Fields option is selected, you can change the data in the field of one
table and Access will automatically update the matching data in the related table.
Cascade Delete Related Records
If the Cascade Delete Related Records option is selected, you can delete a record in the main table and
Access will automatically delete any matching records in the related table.
Please note that if you set up changes and deletions to happen automatically, the end user may not
expect those changes to be made immediately. Also, Access can display error messages when using
referential integrity that may be confusing to the end user of the database, so some training or guidance
in what is happening here may be necessary.
To review, there are three types of table relationships that indicate how the tables relate to each other.
One-to-One Relationships
Two tables are said to have a one-to-one relationship when one record from the first table is related to
only one record in the second table, and vice versa. This is denoted in the relationships window with a 1
on both sides of the relationship.
One-to-Many Relationships
In a one-to-many relationship between two tables, one record in the first table is related to more than
one record in the second table. The reverse is not true, because one record in the second table is related
to only one record in the first table. This is denoted in the relationships window with a 1 on the side of
the table with the value as the primary key and the infinity sign on the table with the foreign key.
Many-to-Many Relationships
In a many-to-many relationship, multiple records from the first table are related to multiple records in
the second table, and vice versa.
This type of relationship requires a link (junction) table. In the relationships window, this will actually be
displayed as two one-to-many relationships with the link (junction) table in the middle of the two tables.
The two relationships will be denoted in the relationship window as the 1 side of the relationship
pointing to the table with the primary key, while the infinity sign will be pointing to the link (junction)
table with the foreign keys in both cases.
(Note: Relational database systems don't allow you to implement a direct many-to-many relationship
between two tables.)
Referential Integrity, the Cascade Update, and Delete Related Fields ensure that the changes you make
in the Subdatasheet are updated in the primary record.
Perform the steps that follow (you will perform the steps in the Let Me Try activity). Ensure you select
the Enable Data Integrity option towards the end of the process.
Note: Sometimes when you create a new Relationship, it is not immediately visible on the Relationships
window. Follow the instructions below to see how to view changes you have made.
Module 10 - Forms
Learning Objectives
In this module, we will create and design forms.
By the end of this module, you will be able to:
1. Create a form
2. Modify forms in Layout View
3. Work with forms in Design View
4. Customize form design
Adding a Form
In order to create a form, you have to first add a form to your database. To add a form, click the Form
command under the Create tab.
Form Wizard
We are going to start with the simplest option, the Form Wizard, just to give you an idea of what a form
is. The Form Wizard provides a step-by-step guide to create a form in Access. The first step is to add the
table for which you need to create the form. If you select the table first for which you would like to build
the form, that table will automatically be selected in the first step of the Form Wizard.
If you are designing a form for someone to perform a specific task you may not need all fields to be
available on the form. So, determine which fields the user needs access to.
The >> allows you to add all of the fields at once from the left side (the list of all available fields) to the
right side (the fields you want to display in the form). The << allows you to remove all the fields from the
right side and put them back on the left side.
The > allows you to add just the selected field from the left side to the right side and the < allows you to
remove the selected field from the right side back to the left side.
In the next step, you select the form type. This is usually a matter of preference as all styles will allow
you to edit data in the underlying table. The first and last options will allow you to only see one record in
the form at a time. If you choose the first or last option, you will need to use the navigation buttons to
move between records. We will go over those a little more soon.
The last question in the Wizard asks about how you would like to see the form you just created. The first
option allows you to view the form directly with the table’s data. The second option allows you to make
changes to the design of the form before viewing the data in the form.
Form View
A form's data can be seen in Form View. Changes to the design of the form can be made in Design and
Layout Views.
Note: Data changes in a form function just like that of a table. In order to save the changes to a record in
the form when the form is in Form View, you need to close the form or move to a different record. If you
can see multiple records, you will only need to move down one record. However, if you are only looking
at one record, you will need to use the form’s navigation buttons to move to the next record.
Also note that if you choose to delete a record, you might get an error message regarding referential
integrity. However, you can add or modify information.
Deleting a Form
There are a few ways to delete forms in Access.
Keep in mind that once the form is deleted from Access, you will not be able to retrieve it without a
database backup if it was saved in the backup.
Note: Close the form before deleting it, since database objects cannot be deleted while they are open.
Form Properties
Let’s understand how to access and work with form properties.
Design View
You can make edits to a form in Design View.
Property Sheet
Just like tables, forms too have properties. These properties are accessible in the Property Sheet.
The changes made in the Property Sheet are immediately reflected in the design of the form. It is
important to select the relevant object to access properties related to the object. The properties of the
entire form are different from that of a field. For the entire form, you need to access Form Properties.
When you click the Property Sheet using the Form Properties option, you can see all the properties for
the entire form.
Default View
When you open a form in Access, you can control how your data records appear. Depending on the
nature of the database, you can choose a default form view for the end users to work in.
The Default View property, which can be accessed in the form properties using the Property Sheet, lets
you select form views. The views we will cover include the following:
- Single Form View shows one record on the screen at a time.
- Continuous Form View shows multiple records on the screen at a time.
Let’s review the Navigation Buttons as they will be used often in Single Form View.
Once the filter is applied, you’ll be able to navigate through filtered records with the help of the
Navigation buttons at the bottom left corner of the form.
Design View is used for extensive modification Layout View is a more visually oriented view
and customization of your form. than Design View.
Live data is not visible in Design View. You're While viewing a form in Layout View, each
only working with the structure and design of control displays real data.
the form.
Just to review again, Controls are basically all editable parts of a form with their own individual
properties. The part could be a label, a text box, an image, a button, etc.
By default, when a form is opened in Layout View, it is arranged in a tabular layout. The image below
shows some of the frequently used controls – drop-down boxes, text boxes, labels, etc.
And, remember, sometimes when the word table is used for form design, it refers to the structure of the
controls automatically placed in the form when it was built (they are structured in a table type format),
and not the underlying table that stores the data from the form. Usually, when we use words like row or
column and the word table, we mean this secondary definition. We are only using the secondary
definition of a table in this section and will resume using table when referring to the Table Object in
Access as we have been up until now.
Also, from the Design Ribbon, you can insert an image in a form by selecting the Insert Image command
and then navigating to the image file containing the picture.
Once selected, place the image anywhere in the table. If you want to reposition the image, you can drag
it to another location.
Fields can be added in the form by selecting Add Existing Fields in the Design tab. You’ll learn more
about using the Add Existing Fields command in the next module.
Enabled Property
If you do not want users to edit certain aspects of the form, you can set the Enabled property to No to
restrict the controls from being edited.
For example, you could make this change if you do not want the user to make changes to the
CustomerID text box control in a customer database form. (Please note that a user cannot edit an
Autonumber type field in any case.)
In Design View, the position of the fields and labels can be changed. You can also resize them, move the
labels, and check their properties. Remember that you may also set the Enabled property to No to
disable access to the fields, so that they cannot be edited.
Record Source
The Record Source property for the form indicates which table the records are sourced from. In other
words, it is the table that will have its data changed, added, or deleted when using the form.
What this means is that the form is not changing all the fields in a table, just the selected field or
number of fields. A form can be bound to a table or to a query, which will bind it back to the table in the
query if that query is editable. Don’t worry if you don’t understand what a query is just yet as we will
explore queries later in the course.
Because you have access to all the tables, you can select fields from different tables to build your form.
If you do that, you will be creating the Record Source for the form from what is known as a SQL (see-
kwel) String instead of from a Table, as we have done up until this point. A SQL String is essentially a
query that may or may not join tables together, similarly to the relationships we created in Module 10,
as well as display fields from any of the related tables. If you use the … in the Record Source property,
you will build the SQL String that becomes the Record Source for the form.
To get rid of the rigid structure, you can use the Remove Layout button.
The Remove Layout option allows you to move individual fields around freely. You can click and drag any
field and then only the label will move with it.
The tabular structure that was in place is removed and you can easily position the fields wherever you
want. This gives you more control when you’re designing your forms.
You could also neatly align the fields with the help of a few tools on the Arrange Tab.
Aligning Fields
When fields are not lined up correctly horizontally or vertically, the Alignment is off. You’ve seen
previously how to align fields in Design View.
Separating Fields
You can choose to separately move a field from its label or vice versa. For instance, you might want to
move only the field label.
If you simply click the field or label and drag it around, without clicking on the grey square, the field and
label will move together. This feature gives you much more flexibility in designing your fields. If you wish
to permanently separate the text box from its label, you can edit the text box’s Label Name property to
be a blank entry. If a text box is moving with its label, this means there is an entry in the Label Name
property.
By default, the Date and Time are text boxes with formulas in the Control Source property that are
placed in the Header. You can also change the position and alignment of your Date and Time. For
instance, you can select the date from the Header and cut it using Ctrl-X on your keyboard. Then paste it
in the Footer using Ctrl-V. You can also change the alignment of the text in the Header and Footer.
There are many more aspects, such as themes and formatting, of Form Design that you’ll cover later in
the course.
Module 11 - Subforms
Learning Objectives
In this module, we will look at subforms and how to work with them in Access.
By the end of this module, you will be able to:
1. Create a simple subform
2. Prevent editing of a subform
3. Create subforms using the Property Sheet
• There can be multiple subforms open in one main form. Over the next few screens, you will learn
how to build the subform and then add it to the main form.
• It's common to build the subform in Datasheet View, because in the Datasheet View you get an
accurate visual representation of the data contained in the table.
Controls
A Subform is found in the Controls group under the Design tab.
SubForm Wizard
Once the subform is placed in the main form, the SubForm Wizard window opens up. SubForm Wizard
helps you create subforms and link the fields from the main form to the fields in the subform. The link
specifies that the subform shows data relevant to the field in the main form.
You can create a subform using the following options: Use existing Tables and Queries and Use an
existing form
When you select Define my own option, the linked field in the main form is called a Master field and
the linked field in the subform is called a Child field.
The master and child fields can also be edited in the Data tab under the Property Sheet after the
subform is created.
Similarly, highlight the fields inside the subform and drag its borders to resize.
Record Selectors
Record selectors are the function that help you select a record to delete. The Record Selectors property
has Yes and No options. If you select Yes, the end user will be able to select and delete the record. If you
select No, the end user is restricted from selecting the record and hence the record remains intact.
Navigation Buttons
You’ve seen the use of Navigation buttons in the previous modules. Navigation buttons enable you to
move to the first, previous, next, last, or blank (new) records. Setting the Navigation buttons property to
No will restrict the user from navigating through records.
Composite Key
Let’s look at an example to understand the use of a composite key.
The tbltour database table shows the details of a tour. The table comprises the following fields with
their data types and descriptions.
• TripCode: There could be multiple instances of a particular trip code for different start dates.
• StartDate: The start dates of different trips possibly could be the same, which means this is not
unique data.
• PriceAdult: Prices for an adult for different trips can be the same – so again, no unique data.
• PriceChild: Prices for a child for different trips can be the same (no unique data).
It’s clear from the above example that no field in the tbltour table can be assigned as a primary key
(since data is not unique).
But, when a combination of the TripCode and StartDate fields are defined as primary key, i.e., a
composite key, a trip starting on a particular date will always yield a unique record because two similar
trips cannot have the same start date.
Unbound
When a subform is not linked to any existing table or a database object, such as another form or report,
the term `Unbound’ appears within the subform box.
Source Object
The Source Object is the source form or report that is linked to the subform.
Once the Source Object is specified, you can assign the Link Master Fields and Link Child Fields for the
subform.
Remember, the master field is usually on the one side of the one-to-many relationship and the child is
on the many side of the relationship.
Just a quick note of clarification. The Source Object and the Record Source are two properties with
similar names that can be confusing. Just remember that the Source Object is an object in the database,
such as a form or report. The Record Source is where the records are coming from for the data in the
form. A table (or query) has records, so this will be a table or query.
Module 12 - Queries
Learning Objectives
In this module, we’ll start to explore the use of queries with Access.
By the end of this module, you will be able to:
1. Create a query
2. Create joins in a query
3. Use the Query Wizard
4. Use the Query Builder
Query Commands
There are two primary commands that are used to create a query.
Query Components
When you click the Query Design command, a blank query design screen opens. This screen is made up
of three main components.
SQL View
Queries have an additional view setting – the SQL View. SQL stands for Structured Query Language. SQL
is a database language that is used well beyond Access databases. Access has many development tools
that make writing SQL easy, so that you don’t have to know how to actually code SQL to write a query.
In fact, the Design View tool parses together the SQL code for you automatically.
Navigation Pane
A created query will show in the Navigation Pane on the left of the screen.
The Grid
Adding information in the grid is a critical task while performing a query. It’s important to know what
each row signifies.
SQL Statement
SQL is a language for queries. While you don’t have to master it, you need to understand the structure
to be able to comprehend it. An SQL statement is made up of SQL clauses such as SELECT, FROM,
WHERE, AND, OR, etc.
Submodule B – Joins
Joins
So far, you’ve seen how to build a query in a single table. Whenever you run a query, the resultant set of
records is referred to as the Query Record Set.
Let’s see how to build queries in more than one table, especially if there is an existing relationship
between the tables.
When there are multiple sources in an Access query, you need to join the information from these
multiple sources based on how the sources are related to each other.
You can also create joins in queries even if these joins do not represent an existing relationship.
Types of Joins
There are two basic types of joins - inner joins and outer joins.
Inner Join
Inner join is the default join type. It is also the most commonly used join type in Microsoft Access. When
you run a query, an inner join will return records that have matching data for the joined field in both
tables.
If Access detects a relationship between the tables, it automatically forms an inner join on the basis of
that relationship. Also, when you create a join and don’t specify what kind of join it is, Access creates an
inner join by default.
Outer Join
Outer join includes all records from one table and only matching records from the other table. There are
two types of outer joins: left outer join and right outer join.
You can choose which table appears on the left and the right. In an inner join, only the matched and no
other data is included. In an outer join, unrelated records from one of the tables are also included in the
query results, depending on which type of join was selected.
Note that Outer Join could be either Left Join or Right Join.
Creating Joins
You can easily create a join in Design View of a query. When you add a second table in the query
window, Access detects if there are any relationships between the tables using the relationships
previously defined in the Relationships Window.
Access automatically creates inner joins if you add two tables to a query, even if no relationships exist
between them. In this case, the tables must each have a field with the same or compatible data type and
one of the join fields is a primary key. To delete a join, just select the join and press Delete on your
keyboard.
Based on your query, click one of the radio buttons and then click OK. If you view the query in SQL View,
you will notice the following statements:
An important feature of the Query Wizard is that it allows you to select fields from two different tables.
Summary Options
The Query Wizard also provides an option where a summary can be made available. Summaries are
Totals or Counts of like data. If you have ever used a Pivot Table in Excel, that would be very similar to a
summary table.
Access looks at the fields you have selected and it determines which ones are suitable for a summary or
aggregation. It then displays the possible summary options.
This is how you can add fields in a database object using the Query Builder.
Note: You can also define and type an SQL statement, which includes fields from various tables, directly
in the Record Source property without opening the Query Builder.
Module 13 - Expressions
Learning Objectives
In this module, we will explore expressions used in an Access database.
By the end of this module, you will be able to:
1. Set up validations using the Expression Builder
2. Calculate using expressions
Expression Builder
Earlier, you have also looked at using the Expression Builder to create or modify validation rules.
To build an expression in the upper panel, you use components from the lower panel. If you’re familiar
with the parameters of your validation in an expression, you can also directly type the parameters in the
upper panel.
• The first is a Function. Functions are built-in calculations that allow you to change numbers or values
derived from other fields, such as MIN, MAX, SUM, and AVERAGE. If you’re familiar with Microsoft
Excel, Functions in Access are similar to Functions in Excel.
• The second element is a Constant. A constant is a known value that does not change, such as NULL,
TRUE, or FALSE.
• The final element is an Operator. An operator can be thought of as a mathematical symbol, such as
+, –, *, <, >, etc. An Operator can also be the & symbol, which is used to join fields together.
Parts of an Expression
An expression has two parts. First is the operator, which is the part of the expression that performs the
action, such as the greater than or equal to symbols.
The second part of the expression is the operand, which is the input that the operator is operating on.
For example, in the equation A + B, the + sign is the operator and A and B are the operands.
You can either type in an operand manually or choose the value from the list of Functions. The list of
functions can be seen when you click on the + to the left of the Functions. You will then see an option
called Built-In Functions. Select Built-In Functions to see some of your options in the middle box. The
middle box categorizes all the different functions for you. The column on the far right includes the
options for each category of functions.
Note: When you are working with dates in the expression, Access will automatically enclose the date
between hash (#) symbols.
Module 14 - Reports
Learning Objectives
In this module, we will create and design reports.
By the end of this module, you will be able to:
1. Create a basic report
2. Format a report in Design View
3. Create a complex report
Note: The image shown above is of a complex report with multiple fields and grouping levels. You'll learn
about complex reports in the subsequent submodules.
Report View is the default view for a report. You can use Print Preview to see how the report will look
when printed and Design View for making changes to your report.
Let’s look at the steps for creating a report consisting of a single field using the Report Wizard.
Step 1: Adding Fields
The Report Wizard allows you to define fields, grouping/sorting levels, and layout choices.
(Note: If you choose more than one field in the first Wizard step, an additional Report Wizard step
appears before you can set the sort order, asking you to add grouping levels. You will learn more about
grouping levels in the forthcoming modules.)
Step 3: Report Layout
The next step allows you to select a layout and orientation for your report.
(Note: If you choose more than one field in the first Wizard step and set a grouping level(s), the Layout
options will be different. You will look at Layout options for a report with multiple fields and grouping
levels in the forthcoming modules.)
Click Finish to complete the process for creating a report. An example of a report is shared below.
Print Preview
When you create a report, it opens by default in the Print Preview mode. Print Preview provides a visual
representation of the printed report. You can open a report in Print Preview using any of the following
methods:
Right-click the report in the If you already have the report Click the Print Preview
Navigation pane and then click open, click the Print Preview option from the View drop-
Print Preview from the button in the Status Bar. down list.
contextual menu.
Let’s look at the groups and commands in the Print Preview tab.
Print
The Print command in the Print group helps you set the type of Printer, Print Range, Number of Copies,
and many other properties.
Page Size
The options in the Page Size group allow you to set a specified size and margins for the page on which
the report is going to be printed.
Page Layout
The commands in the Page Layout group will help you set the page orientation, column settings, and
other properties.
Zoom
You can enlarge a section of your report using the Zoom group. You may also use the Zoom options to
view one or more pages of a report at the same time.
• Report View is the default • A report in Layout View • Design changes for a report
view of any report. Usually, looks similar to one in are done in Design View.
the end-user will view and Report View.
• Design View doesn’t display
work with the report in
• Live data is visible. live data from the report
Report View.
source.
• Basic design changes can be
• No design modifications are
made, but not as exhaustive • The effects of the design
possible in this view.
as in Design View. adjustments done in Design
View are usually seen in
Layout View or Report View.
Now, let’s look at how to modify and format a report in Layout View.
The properties for the individual control can then be set using the Property Sheet.
Formatting Options
Let’s look at a few key formatting options for reports.
Formatting Reports into Multiple Columns
Columns are added in the report to make maximum use of the space on the page the report is going to
be printed on. Adding columns also makes the report look more organized. In some cases, reports use
the page space on the left-hand side of the report, but leave a lot of blank space on the right-hand side.
To optimize the use of space, you can format the above data into columns. Open the report in Layout
View and click the Columns command in the Page Setup tab.
The previous report has been formatted to optimize the unutilized space on the page.
Once selected, place the image anywhere on the report. If you want to reposition the image, you can
click it and then drag it to another location. You can also resize the image by moving the cursor to the
edge of the picture until it changes to a double-headed arrow ( ) and then dragging it till you achieve
the required size.
There are two ways to format these sections – right-clicking the relevant sections or using the Property
Sheet.
If you click the Page Header/Footer or the Report Header/Footer in order to turn them off, you’ll get a
warning message that says ‘Deleting these sections will also delete all controls in them and you’ll not be
able to undo this action.’ Hence, ensure you actually want to perform the action before you proceed.
Note: An expression has a specific syntax that you use in the Expression Builder that we went over in
detail in Module 13. Let’s review the common components:
Grouping in Reports
Grouping is a feature where you can group like or similar types of data together. Grouping records
makes it easier to identify patterns in the data. For example, in a music album database, you may group
a report by music genre and then by artist name followed by other details.
The image below shows an Esprit De Tour report with two levels of grouping — Country followed by
TRIP Code.
Creating Groupings
Let’s look at how to create grouping levels using the Report Wizard.
Recall that the Report Wizard is located in the Reports group under the Create tab. In the first step, add
all the fields you want in the final report.
Summary Options
In the next step, you can set a sort order for the records in the report. The Wizard also includes a
Summary Options button that allows you to summarise information from any of the selected numeric
fields. Recall the Summary Options feature you’ve used in the Query Wizard.
Layout Options
In the next step, you need to select the orientation and layout for your report in the Wizard. The layout
options for a report with and without grouping levels are different.
Let’s look at the layout options for reports with multiple grouping levels.
The central part of the report has the Detail section, which contains the most amount of information in
the report.
The footers for the grouping levels appear at the bottom of the report above the page footer.
You can always customize your report based on your needs. Modifying a report is similar to modifying a
form in Design View. You can add controls, resize and rearrange them, and set their properties using the
Property Sheet. You can also move fields from one section to another to make for better readability and
flow. One of the biggest differences in a report as compared to a form is the sorting and grouping levels.
Below is a description of the different categories of headers and footers that you can have.
Report Headers and Footers - Displayed at the beginning and/or end of the report itself. This header or
footer only appears twice. Once at the beginning and once at the very end. These are useful for
displaying the date and time the report was printed, as well as grand totals, such as a count, an average,
a sum, a min or a max, etc.
Page Headers and Footers - These appear at the top and/or bottom of each page. These are useful for
displaying page numbers. They can also display the date and time if you would prefer to see that on
every page.
Group Headers and Footers - These appear at the beginning and/or end of each group. A group is a field
from the underlying table or query, and the header changes when the field value changes on the report.
This is useful for displaying a group total, such as a count, an average, a sum, a min or a max, etc. Note:
Make sure that the report sorting matches the order of the group header and footer or you may see
unexpected results.
Database Documenter
A Database Documenter documents not the data but the design of the database. This tells you various
information about database objects themselves. Remember, objects we have learned so far include
tables, queries, forms, and reports. If you’re keeping track of design changes, it might be a good idea to
save some of these files as PDFs on your computer to refer back to in order to see the change process
when designing a database. We’ll review how to print a document as a PDF later in this module.
The document that is generated from the Database Documenter is called its definition, which displays
all the properties of the selected object (tables, queries, etc.) and details about individual columns
(fields). You will also find details of the relationships (if any) between the objects in your database.
Once you click OK on the Documenter, Access will create a definition of the design of the object(s).
Print Properties
If you want to print the definition or data of an object, you could use the Print Preview tab to set the
size, the margins, the orientation, etc.
Note: The options in the Name drop-down list will depend on which printer is attached to your computer,
and which applications are downloaded on your computer.
Note: Access may not automatically open the saved PDF file. To open the file, go to the folder on your
computer where you’ve saved the file. Once you open the folder, search/locate the PDF file and double-
click to open it.
Printing
You will now look at the regular printing options.
Using the Quick Access Toolbar
To print all the data in a specific object, select the object from the Navigation pane and click the Print
Preview command in the Quick Access Toolbar.
Click the Print Preview option to view how your database appears in the printed version. Once you are
satisfied with all your options, click Print.
By default, the display control for a Yes/No data type field is set to a Check Box.
In Datasheet View, you can manually check/uncheck the box for the specific records.
You can use the Property Sheet to set the properties for a field with the Yes/No data type.
The file opens in the default program assigned on your computer for the specific file type. For example,
an Excel file attachment opens in the Excel program.
Attachment Control
An Attachment control is used to represent data from the Attachment field in an underlying table on a
form.
Let’s look at adding an Attachment control in a form. You can find the Attachment control in the
Controls group.
Set the field with the Attachment data type as the Control Source for the Attachment control in the
Property Sheet.
When using OLE objects, the same caution mentioned in the previous regarding attachments applies.
Hyperlink
The Hyperlink data type is used to link to a file on the Internet, Intranet, or on your PC. For example, you
may link an Excel sheet with the trip requirements in your Esprit De Tour database. A hyperlink is a great
alternative to an attachment if you’re experiencing performance issues.
You’ll learn about the Option Group control next, and about the Navigation control later in this module.
Once you draw the option on the form, you can add a set of option buttons that will include a number.
Once you add a button, the Property Sheet automatically assigns an Option Value of 1. That’s the default
value when you add an Option Group control. If you add another button, it will have a value of 2, and so
on.
While it can be tempting to use an option box for a Yes/No field, we recommend that you use a
checkbox instead. The option box allows you to change values and are numeric. While it is true that the
Yes/No field values can translate to a number (-1 for true, 0 for false), the option box has values that can
be changed, and the confusion between the two can lead to unexpected consequences in the future.
Additional Controls
You’ve already looked at the Attachment, Check Box, and Subform/Subreport controls. Let’s look at the
other controls.
Themes
Under the Themes option, you’ll find several theme templates categorized in three sections — In this
Database, Custom, and Office.
Hovering your cursor over a theme displays its name as well as a preview of the theme.
Note: The theme preview will only be visible if the Enable Live Preview option is selected. The Enable Live
Preview option can be accessed using Access Options > General.
Default Theme
The default color and font scheme you have been using all along in your forms is the default theme in
Access. The name of this default theme is the Office theme. So you have already been using a theme
without even knowing it!
To make a theme the default theme, right-click the theme and select the Make This Theme the
Database Default option.
Theme Colors
Every theme has a standard color palette; however, you could add additional theme colors, independent
of the theme. The Theme Colors command lets you choose from a variety of pre-defined color schemes,
which you can mix and match with your current theme.
Theme Fonts
Every theme has standard fonts as well. You can select fonts for your theme using the Theme Fonts
option.
Formatting Properties
Access has a wide variety of ways to format your form to get it looking just the way you would like.
There are many different options, including fonts, colors, borders, background colors, foreground colors,
etc.
Let’s look at a few additional options to customize the look and feel of a form.
Back Color
The Back Color property is used to define the background or interior color of a form control or section.
The form control could be a text box, label, combo box, list box, etc. The Back Color property is useful to
distinguish or emphasize specific elements of a form.
To define a background color, highlight the concerned control or the section in Design View or Layout
View. Here’s an example.
Note: If you select a color from the palette's Standard Colors section, the selected background color for
the section or control remains unchanged until you manually update it, regardless of the theme.
Fore Color
The Fore Color property specifies the color of text within a form control.
The Fore Color property is located under the Format and All tab in the Property Sheet. Click the ellipsis
(…) to pick a color.
Perhaps you have noticed that the textbox control also has a Back Color property just as on a form.
That’s because the text box itself has a background color that can be changed.
Note: If you select a color from the palette's Standard Colors section, the selected fore color for the
control remains unchanged until you manually update it, regardless of the theme.
Shape Outline
The Shape Outline option allows you to choose an outline or border for various form controls — text
box, shapes, subforms, labels, combo box, etc. You have the option to customize the border color,
thickness, and style.
End users working on the navigation forms will use the tabs to navigate instead of the objects in the
Navigation pane.
You’ve learned that forms are the objects that end users use. A Navigation Form is a special kind of form
that allows end users to work on multiple forms without direct access to the database. The Navigation
Form also provides a simple interface where end users can input data easily.
If you need to reinstate the Navigation pane, you can update Access Options or press F11 on your
keyboard.
You could also collapse the ribbon to limit people from formatting the form.
Exporting Options
Not everyone has access to Microsoft Access, so the Export group under the External Data tab gives you
a number of formats that you can export your database to.
Exporting to Excel
To export a database object to Excel, first select the object from the Navigation pane.
Once you’re done, you can open the object as an Excel file from the folder you saved it to.
Exporting to PDF
Another option that is commonly used is exporting to a PDF or an XPS document. As the name suggests,
this option exports the selected object as a PDF or an XPS document. A PDF is a great format for
exporting an Access report as it will retain a lot of the design of the original report.
Current Database
Recall that you can make design changes when you’re in Datasheet View of a table. You can choose to
disable this option in the Current Database tab.
Datasheet
In the Datasheet tab, you can customize the way datasheets are displayed in Access. For instance, you
could remove the horizontal or vertical gridlines.
Object Designers
The Object Designers tab lets you change the default settings of objects, such as tables, queries, forms,
etc. This is similar to creating an initial custom theme for those objects.
Client Settings
The Client Settings tab only applies to a standard Access database, and not web databases. This is where
you make edits that would affect the end users use of the application.
If you scroll down in Client Settings, you have the Advanced section. It is important to note that when
you are using Access in a multiuser mode, a lot of people can access the database at the same time.
Right at the bottom, you will find the Default Theme section.
General
The General tab provides information related to the database – name of the file, the type, the location,
the size, when it was created, when it was last modified, last accessed on, etc.
Summary
In the Summary tab, you can modify information related to the title, subject, author, company, etc. of
the database. You can also add keywords and comments.
Statistics
The Statistics tab provides the date and time of creation and modification.
Contents
The Contents tab gives a summary of all the objects in the database.
Custom
The Custom tab is where you can customize the name, type, value, and properties of the database.
Password Encryption
You can encrypt a database with a password to protect the file and to help prevent unauthorized access
to the information. Let’s now look at how you can encrypt your database with a password.
Encrypt a File
Before you encrypt a file, you need to ensure it is opened in the Exclusive mode, which you’ve learned
in an earlier module. Exclusive mode ensures the database is open only on your laptop or Personal
Computer.
Decrypt a File
To decrypt an already encrypted file, open the file in the Exclusive mode.
Then, select the Decrypt Database option from the Info tab.