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

C - Manuals - Access - Access 2013 Part 1 PDF

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)
166 views

C - Manuals - Access - Access 2013 Part 1 PDF

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

STUDENT EDITION

®
Microsoft Office
®
Access 2013:
Part 1
Microsoft® Office
Access® 2013:
Part 1
Microsoft® Office Access® 2013: Part 1
Part Number: 091004
Course Edition: 2.2

Acknowledgements
PROJECT TEAM

Author Media Designer Content Editor

Peter Lammers Alex Tong Tricia Murphy


Brian S. Wilson Joe McElveney

Notices
DISCLAIMER
While Logical Operations, Inc. takes care to ensure the accuracy and quality of these materials, we cannot guarantee their
accuracy, and all materials are provided without any warranty whatsoever, including, but not limited to, the implied warranties of
merchantability or fitness for a particular purpose. The name used in the data files for this course is that of a fictitious company. Any
resemblance to current or future companies is purely coincidental. We do not believe we have used anyone's name in creating this
course, but if we have, please notify us and we will change the name in the next revision of the course. Logical Operations is an
independent provider of integrated training solutions for individuals, businesses, educational institutions, and government agencies.
Use of screenshots, photographs of another entity's products, or another entity's product name or service in this book is for editorial
purposes only. No such use should be construed to imply sponsorship or endorsement of the book by, nor any affiliation of such
entity with Logical Operations. This courseware may contain links to sites on the internet that are owned and operated by third
parties (the "External Sites"). Logical Operations is not responsible for the availability of, or the content located on or through, any
External Site. Please contact Logical Operations if you have any concerns regarding such links or External Sites.

TRADEMARK NOTICES
Logical Operations and the Logical Operations logo are trademarks of Logical Operations, Inc. and its affiliates.
® ® ® ®
Microsoft Access is a registered trademark of Microsoft Corporation in the U.S. and other countries. Microsoft Windows is also a
registered trademark of Microsoft Corporation in the U.S. and other countries. The other Microsoft products and services discussed
or described may be trademarks or registered trademarks of Microsoft Corporation. All other product and service names used may
be common law or registered trademarks of their respective proprietors.
Copyright © 2013 Logical Operations, Inc. All rights reserved. Screenshots used for illustrative purposes are the property of the
software proprietor. 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
express written permission of Logical Operations, 3535 Winton Place, Rochester, NY 14623, 1-800-456-4677 in the United States
and Canada, 1-585-350-7000 in all other countries. Logical Operations’ World Wide Web site is located at
www.logicaloperations.com.
This book conveys no rights in the software or other products about which it was written; all use or licensing of such software or
other products is the responsibility of the user according to terms and conditions of the owner. Do not make illegal copies of books
or software. If you believe that this book, related materials, or any other Logical Operations materials are being reproduced or
transmitted without permission, please call 1-800-456-4677 in the United States and Canada, 1-585-350-7000 in all other countries.
Microsoft® Office
Access® 2013: Part 1

Getting Started with Access........................................................... 1


Orientation to Microsoft Access...................................................... 2
Create a Simple Access Database..................................................29
Get Help in Microsoft Access ....................................................... 42

Working with Table Data..............................................................49


Modify Table Data ....................................................................... 50
Sort and Filter Records................................................................. 59
Create Lookups............................................................................ 64

Querying a Database................................................................... 75
Join Data from Different Tables in a Query................................... 76
Sort and Filter Data in a Query......................................................85
Perform Calculations in a Query................................................... 95

Creating Advanced Queries........................................................103


Create Parameter Queries .......................................................... 104
Create Action Queries ............................................................... 110
Create Unmatched and Duplicate Queries................................... 114
Summarize Data......................................................................... 121

Generating Reports....................................................................125
Create a Report.......................................................................... 126
Add Controls to a Report............................................................ 133
| Microsoft® Office Access® 2013: Part 1 |

Enhance the Appearance of a Report.................................................... 138


Prepare a Report for Print..................................................................... 141

Customizing the Access Environment................................................. 145


The Access Options Dialog Box............................................................ 146

Appendix A: Microsoft Office Access 2013 Exam 77-424................... 153

Appendix B: Microsoft Access 2013 Common Keyboard Shortcuts...... 159

Lesson Labs........................................................................................ 161

Solutions............................................................................................ 171

Glossary............................................................................................. 175
Index.................................................................................................. 179
About This Course

Data is everywhere. Whether you are at the grocery store, office, laboratory, classroom, or
ballpark, you are awash in data: prices, schedules, performance measures, lab results, recipes,
contact information, quality metrics, market indices, grades, and statistics.
Most job roles today involve some form of data management. In the case of data workers, it
may be their primary job task. For some, like research scientists and accountants, data
management may be a strong component of the job. And for others, such as sales clerks or
those in the skilled trades, data management may consist of an incidental job responsibility
such as time reporting or recording a sale. But virtually everyone is affected in some way by
the need to manage data.
A relational database application such as Microsoft® Office Access® 2013 can help you and
your organization collect and manage large amounts of data. Access is a versatile tool. You
can use it as a personal data management tool (for your use alone), or you can use it as a
construction set to develop applications for an entire department or organization. In this
course, you will learn how to use Access 2013 to manage your data, including creating a new
database; constructing tables; designing forms and reports; and creating queries to join,
filter, and sort data.
You can also use this course to prepare for the Microsoft Office Specialist (MOS)
Certification exam for Microsoft Access 2013.

Course Description
Target Student
This course is designed for students who wish to establish a foundational understanding of
Microsoft Office Access 2013, including the skills necessary to create a new database,
construct data tables, design forms and reports, and create queries.

Course Prerequisites
To ensure success, students should be familiar with using personal computers, and should
have experience using a keyboard and mouse. Students should be comfortable in the
Windows® 8 environment, and be able to use Windows 8 to manage information on their
computers. Specific tasks the students should be able to perform include: launching and
closing applications, navigating basic file structures, and managing files and folders. To meet
this prerequisite, you can take any one or more of the following Logical Operations courses:
• Using Microsoft® Windows® 8
• Microsoft® Windows® 8: Transition from Windows® 7

Course Objectives
In this course, you will learn to create and manage a fundamental Access 2013 database.
| Microsoft® Office Access® 2013: Part 1 |

You will:
• Navigate within the Microsoft Access application environment and create a simple database.
• Organize and manage data stored within Access tables.
• Use queries to join, sort, and filter data from different tables.
• Create advanced queries, including action queries and parameter queries.
• Create and format custom reports.
• Customize Access configuration options.

The LogicalCHOICE Home Screen


The LogicalCHOICE Home screen is your entry point to the LogicalCHOICE learning experience,
of which this course manual is only one part. Visit the LogicalCHOICE Course screen both during
and after class to make use of the world of support and instructional resources that make up the
LogicalCHOICE experience.
Log-on and access information for your LogicalCHOICE environment will be provided with your
class experience. On the LogicalCHOICE Home screen, you can access the LogicalCHOICE
Course screens for your specific courses.
http://www.lo-choice.com
Each LogicalCHOICE Course screen will give you access to the following resources:
• eBook: an interactive electronic version of the printed book for your course.
• LearnTOs: brief animated components that enhance and extend the classroom learning
experience.
Depending on the nature of your course and the choices of your learning provider, the
LogicalCHOICE Course screen may also include access to elements such as:
• The interactive eBook.
• Social media resources that enable you to collaborate with others in the learning community
using professional communications sites such as LinkedIn or microblogging tools such as
Twitter.
• Checklists with useful post-class reference information.
• Any course files you will download.
• The course assessment.
• Notices from the LogicalCHOICE administrator.
• Virtual labs, for remote access to the technical environment for your course.
• Your personal whiteboard for sketches and notes.
• Newsletters and other communications from your learning provider.
• Mentoring services.
• A link to the website of your training provider.
• The LogicalCHOICE store.
Visit your LogicalCHOICE Home screen often to connect, communicate, and extend your learning
experience!

How to Use This Book


As You Learn
This book is divided into lessons and topics, covering a subject or a set of related subjects. In most
cases, lessons are arranged in order of increasing proficiency.
The results-oriented topics include relevant and supporting information you need to master the
content. Each topic has various types of activities designed to enable you to practice the guidelines
and procedures as well as to solidify your understanding of the informational material presented in
the course. Procedures and guidelines are presented in a concise fashion along with activities and
discussions. Information is provided for reference and reflection in such a way as to facilitate
understanding and practice.

| About This Course |


| Microsoft® Office Access® 2013: Part 1 |

Data files for various activities as well as other supporting files for the course are available by
download from the LogicalCHOICE Course screen. In addition to sample data for the course
exercises, the course files may contain media components to enhance your learning and additional
reference materials for use both during and after the course.
At the back of the book, you will find a glossary of the definitions of the terms and concepts used
throughout the course. You will also find an index to assist in locating information within the
instructional components of the book.

As You Review
Any method of instruction is only as effective as the time and effort you, the student, are willing to
invest in it. In addition, some of the information that you learn in class may not be important to you
immediately, but it may become important later. For this reason, we encourage you to spend some
time reviewing the content of the course after your time in the classroom.

As a Reference
The organization and layout of this book make it an easy-to-use resource for future reference.
Taking advantage of the glossary, index, and table of contents, you can use this book as a first
source of definitions, background information, and summaries.

Course Icons
Watch throughout the material for these visual cues:

Icon Description

A Note provides additional information, guidance, or hints about a topic or task.

A Caution helps make you aware of places where you need to be particularly careful
with your actions, settings, or decisions so that you can be sure to get the desired
results of an activity or task.
LearnTO notes show you where an associated LearnTO is particularly relevant to
the content. Access LearnTOs from your LogicalCHOICE Course screen.
Checklists provide job aids you can use after class as a reference to performing
skills back on the job. Access checklists from your LogicalCHOICE Course screen.
Social notes remind you to check your LogicalCHOICE Course screen for
opportunities to interact with the LogicalCHOICE community using social media.
Notes Pages are intentionally left blank for you to write on.

| About This Course |


1 Getting Started with
Access
Lesson Time: 1 hour, 50 minutes

Lesson Objectives
In this lesson, you will navigate within the Microsoft Access application environment and
create a simple database. You will:
• Navigate within the Microsoft Access application environment.
• Create an Access database.
• Use Access Help to find documentation on a specific Access feature.

Lesson Introduction
In this lesson, you will become familiar with the Microsoft® Office Access® 2013 user
interface and create a simple database. Simply by moving your data into Access data tables,
you gain powerful capabilities for working with structured data, such as searching, sorting,
filtering, and providing cross-table lookups.
2 | Microsoft® Office Access® 2013: Part 1

TOPIC A
Orientation to Microsoft Access
Microsoft Office Access 2013 provides tools to structure and organize your data. The first step in
mastering Access is to get comfortable working with the Access user interface.

Microsoft Access 2013


Access is an application that enables you to create and manage a database. A database is a collection
of data that is organized so you can efficiently store, retrieve, analyze, and present information. Data in
a database typically models or records real-world information. You might use a database to store
records of assets or inventory, customer information, sales transactions, maintenance schedules,
statistical data, quality measures, and so forth. In fact, virtually any sort of information that can be
entered into a computer can be stored in a database.

Why Use a Database Application?


Ask for examples of You might think of data as a precursor to knowledge. Without any organization to it, raw data is not
other database especially useful. But once data has been meaningfully structured and organized, as in a database
applications learners application, it emerges as information; that is, something that informs. Likewise, when information
have used or are aware is further analyzed and processed into a model that can be applied in a useful way, it becomes
of. Use web chat or a knowledge.
similar tool to enable
remote and local Consider how beneficial it might be for an organization to reveal the findings in the following table.
learners to participate.
Data Information Knowledge

Dept1=7.5, Dept2=3.2, Which department produces Where and how we can reduce
Dept3=4.5, ... the most defects defects
Site1=0, Site2=1, Site3=7, Which street intersections are Steps we can take to reduce
Site4=0, ... the sites of the largest number accidents
of accidents
Prod1=$34,500, Prod2= Which product lines bring in How to restructure our product
$15,210, Prod3=$7,102, the most revenue, and which lines to increase profits
Prod4=$3,511, Prod5= bring in the least
$34,500, ...

Knowledge supports good decision-making within an organization.

Lesson 1: Getting Started with Access | Topic A


Microsoft® Office Access® 2013: Part 1 | 3

Transform Data into


Knowledge

Figure 1-1: Transform data into knowledge.

Using Access Instead of


Why Use Access as Your Database Application? Excel
If you have Access on your computer, you likely also have Microsoft® Excel®. Although Excel is
generally geared more toward working with numbers than mixed data (numbers and text, for
example), many people use Excel for data management tasks. Excel can handle some database tasks,
such as filtering , sorting, searching, and reporting. Conversely, you can use Access for tasks that are
traditionally in the realm of spreadsheet programs, such as accounting tasks, analytics, and charting.
It's not surprising that Excel and Access share capabilities, as they have been part of the same
software suite for many years and have been designed to work well together. Since Access is part of
the Microsoft® Office suite, deciding whether to use Access or Excel does not have to be an
either/or decision. You can use the tools in combination, and many users do just that.
You might choose Access over Excel for specific database management tasks because Access:
• Is optimized for database management. It generally performs faster and can support larger sets
of data than Excel.
• Is designed to manage complex relationships between separate lists (or tables) of data.
• Provides better support than Excel for data input validation (enforcing the correct form or
values of data).
• Is generally better suited than Excel to work with mixed data (data that is not primarily numeric).
• Provides extensive support for report generation.
• Can support multiple user databases.
• Provides good integration for use as a front-end development tool for enterprise databases such
as Microsoft SQL Server® and Oracle®.
Using Access Instead of
Access and Enterprise Database Management Systems Other Databases
Likewise, it may not always be clear whether you should use Access, which is primarily a desktop Ask for examples of
application, or an enterprise database management system, such as Microsoft SQL Server or Oracle. other enterprise
database systems
You may choose to use Access instead of another database development tool because Access is: learners have used or
• Widely used. There are many resources and developer communities to help you. are aware of.
• Relatively inexpensive. In fact, you may already have it on your computer.

Lesson 1: Getting Started with Access | Topic A


4 | Microsoft® Office Access® 2013: Part 1

• A much smaller startup investment. Access is relatively easy to install and configure, and it may
provide an easier path into database development than other tools geared primarily toward
programmers.
• Scalable. You can use Access alone until your needs outgrow it. Then you can use it in
conjunction with an enterprise database. Microsoft provides tools to facilitate moving from a
standalone Access database to SQL Server.
Again, whether to use Access or an enterprise database is not an either/or decision. You can use
Microsoft Access with an enterprise database server to create a solution that will scale to hundreds
or more users. In fact, Access is often used to quickly create an application front-end (what the user
interacts directly with) for a powerful database back-end such as Oracle or SQL Server. You can
create a database in Access for a small user audience and, as the number of users grows, upsize from
Access to a larger database application such as Microsoft SQL Server.

Access as a Web Development Tool


Access also works as a web development tool. There are many ways to publish Access database data
to the web, such as simply exporting a PDF report or static Hypertext Markup Language (HTML)
web page. A more complex solution would be to develop a web services application that pulls user-
requested data from an Access database, and then provide that data in formats that include HTML,
Extensible Markup Language (XML), or some other web format. With Office 2010, Access gained
the ability to publish dynamic web applications directly to a Microsoft® SharePoint® server.
Databases published this way contain live data from the current version of data in the database, so
users aren't viewing data that started becoming stale the moment it was published to a static HTML
or PDF page.
Now with Access 2013, you can create an Access web app. An Access web app is a new type of
database that you build in Access, then use and share with others as a SharePoint app in a web
browser. To build an app, you just select the type of data you want to track (contacts, tasks, projects,
and so on). Access creates the database structure, complete with views that let you add and edit data.
Navigation and basic commands are built in, so you can start using your app right away.
With Access web apps, the data is stored in a SQL Server database. If you host the app on a
SharePoint server, then SQL Server 2012 hosts the database. If you have an Office 365™ plan that
includes SharePoint, then the data is stored in SQL Azure™.
Students may inquire
about licensing for Office Objects in Access Databases
365, SharePoint, SQL
Server, and/or SQL
Access uses six different objects in the creation and modification of databases:
Azure. These are all • Tables store data in rows and columns.
licensed independently • Forms provide a graphical interface for modifying data in tables.
of Access 2013, so
students should refer to
• Queries transform data in tables, such as sorting a table by certain parameters.
Microsoft.com to find • Reports provide a streamlined way of viewing data.
additional licensing • Macros allow you to automate tasks within a database.
information. If you have • Modules are similar to macros, but are written in the Visual Basic for Applications (VBA)
this information programming language.
available, then you can
share it with the students Note: Macros and modules are not covered until Part 3 of this Access 2013 series of courses.
as well.

Lesson 1: Getting Started with Access | Topic A


Microsoft® Office Access® 2013: Part 1 | 5

ACTIVITY 1-1
Considering Potential Uses for Access

Scenario
You have decided to use Access for your database solution. Now you must consider why you chose
Access and how you want to use Access.
If you have learners
connecting to the
1. Why did you decide to use Access? classroom from a remote
location, be sure to pose
A: Answers will vary.
questions in a way that
enables them to
2. Considering the work you do, what sorts of tools or databases would you like to create in Access? participate. For example,
A: Answers will vary depending on individual needs. you might pose the
question to them first,
3. Regarding your response to the previous question, what data might you need to keep within such a through your chat/
database? messaging system, then
have in-class learners
A: Answers will vary. To know what information needs to go into the database, it is helpful to know
add their thoughts to the
what information you want to get out of the database. Will it drive a monthly report? Will it help you
discussion. You might
track the status of certain tasks or products? Will it help you know where things are stored? Will it
write notes in a shared
hold information you intend to publish? What you want the database to do for you will help
application window or on
determine what information you need within the database.
a whiteboard as
students share their
responses.
Access Files
Access 2013 databases are stored in files, similar to the way that Microsoft® Word and Microsoft
Excel documents are stored in files. Access 2013 database files have the .accdb file extension. When
you save a database file, if you do not provide the .accdb file extension, Access adds it for you. A
single Access database file may hold up to 2 gigabytes (GB) of data, with up to 32,768 unique
objects. Up to 255 users can access data from a single Access database file at the same time.
Access 2013 web apps store data in SQL Server or SQL Azure and not in the standard Access
database file type. Even though Access 2013 is web-focused, it still fully supports existing desktop
databases (ACCDB/MDB) and Visual Basic for Applications (VBA).

Saving
As you enter data, Access automatically saves your changes when you move to another record.
However, when you change the design of tables, queries, forms, and other objects, you need to save
those changes by selecting FILE→Save. Of course, if you aren't sure that your data has been saved,
you can use the Save command to be sure.

Enable Content
Because Access databases may contain active content (scripts and other executable code), you
should make sure that the Access content you are viewing came from a trusted source. By default,
Access is configured to prompt you to confirm that the database you opened is from a source that
you trust. If you are opening a file from a trusted source, select Enable Content when you are
prompted.

Access the Checklist tile on your LogicalCHOICE course screen for reference
information and job aids on How to Open a Database

Lesson 1: Getting Started with Access | Topic A


6 | Microsoft® Office Access® 2013: Part 1

ACTIVITY 1-2
Launching Access and Opening a Database

Data Files
C:\091004Data\Getting Started with Access\Inventory Database.accdb
Note: Depending on your computer's system configuration, you may not see the .accdb file
extension.

Scenario
Woodworker's Wheelhouse was founded in 1955 as W.B. Spall Lumber Company, operating as a
small family-run home improvement (lumber and hardware) store in suburban Greene City until
1998, when the last of the Spall family retired. That year, the company was sold, and the new owner
began transforming it into a web-based business, focusing on selling hardwood lumber, tools, and
other supplies for woodworkers and other hobbyists. While the web business grows, a bricks-and-
mortar storefront is still maintained, and a small selection of home improvement supplies are still
sold, both locally and over the web. Eventually, the home improvement items will be phased out.
You are the web and database developer for Woodworker's Wheelhouse. To replace the current
inventory system (the same pencil-and-paper system the company used in the 1950s), you have
begun creating an inventory database in Microsoft Access 2013. Some of the database structure has
already been created, and some entries have already been entered into inventory. You need to make
some changes to information within the database. To do so, you will launch Access and open the
database.
As you work through this
and other activities in the
course, be sure to let 1. Launch Microsoft Access. With no database open, the Welcome screen is shown, and you can select
learners know which an existing database or create a new one.
activity you are following
in the course. If some
learners are using an
ebook, they will not have
the same page numbers
as the printed manual.

Lesson 1: Getting Started with Access | Topic A


Microsoft® Office Access® 2013: Part 1 | 7

2. Select Open Other Files.

3. Select Computer.

4. Select Browse.

5. Navigate to the C:\091004Data\Getting Started with Access directory and select the Inventory
Database.accdb database file.

6. Select Open.

7. Observe the Access application window. The title bar shows that the store's inventory database is
loaded, but the document area is blank.

Lesson 1: Getting Started with Access | Topic A


8 | Microsoft® Office Access® 2013: Part 1

8. If you see the security warning, select Enable Content.

Access Web Apps


An Access web app is a new type of database that you build in Access, then use and share with
others as a SharePoint app in a web browser. You can host an Access web app on SharePoint
Online with Office 365, on SharePoint Server, or on SkyDrive®. Data is stored in a SQL Server
database. On SharePoint Online, data is stored in SQL Azure. When hosted on a network, data is
stored in SQL Server 2012. Because Access web apps are hosted on SharePoint, they can be
accessed from a browser. To create and use an Access web app, you'll need Access 2013 and an
Office 365 site or SharePoint Server 2013.
This course does not
have an Office 365 site Access Web App Features
or SharePoint site, so
Access web apps and
There are a number of features that support Access web apps. The first feature is the web app
any related features are templates. These templates are fully functional web databases that include tables, relationships, and
not included in any of views that make them ready to use from the start. After creation, the app can be customized just like
the activities. any other Access application.

Lesson 1: Getting Started with Access | Topic A


Microsoft® Office Access® 2013: Part 1 | 9

Figure 1-2: Access web app template.

Another feature is pre-designed table templates. Table templates come with fields, views,
relationships, and data-integrity rules related to the theme of the template.
Note: In Access web apps, forms are referred to as views.

Finally, when using an Access web app, Access will provide your database with a user interface
automatically. Access will generate views for the data, including a searchable list view and an Excel-
like datasheet. Buttons to navigate the views and tables are generated as well.

The Access 2013 Application Window


The Access 2013 application window displays application features that enable you to create, Access 2013 Window
enhance, and manage Access databases. The application provides features to input, store, and output Components
data, and enables you to import and export data from and to external applications. The application
window also provides you with access to the integrated Help feature, which provides instructive
support on using Access.

Lesson 1: Getting Started with Access | Topic A


10 | Microsoft® Office Access® 2013: Part 1

Figure 1-3: Access 2013 window components.

The following table describes the main elements of the Access 2013 window.

Component Description

Navigation pane A list on the left side of the application window that displays
objects in the database, including tables, queries, forms, and
reports.
Quick Access Toolbar A small button panel in the top-left corner of the application
window that contains commonly used commands. You can
customize this toolbar to include other commands.
The ribbon A graphical menu panel, common to all Microsoft Office
applications, that contains commands organized into tabs and
groups.
Status bar The bottom panel of the application window that displays
information about the application and currently selected
database object, and provides options for viewing the currently
selected database object.
Title bar A caption at the top of the application window that displays the
name of the open database.

Tabbed Document Windows


When you open database objects such as tables, queries, and forms, Access displays them as tabbed
sub-documents within the document pane. You can have multiple objects open at the same time,
and can move among them by selecting each object's tab. When you right-click the tab, Access

Lesson 1: Getting Started with Access | Topic A


Microsoft® Office Access® 2013: Part 1 | 11

provides a convenient shortcut menu with commonly used commands that pertain to the type of
object contained within that tab.

Tables
A table is a storage container that stores related data in rows and columns. Rows display information
about each item in the table. Columns display categories in the table. A table has a header row with a
descriptor for each column.
Tables contain various components that can be individually accessed and manipulated.

Table Element Description

Record A row of a table data, which contains a complete set of data for a single
entity. For example, a record might contain all related information for a
business contact, including their name, address, phone number, and so
forth.
Field A column of table data, which contains a single data element within a
record. For example, a record meant to hold data about a rectangle might
hold three fields: height, width, and the rectangle's unique ID.
Value A single data value held within a field.

If you are using an Access web app, then you can also use table templates. Table templates include
all the tables, fields, views and relationships you'll need to create a working app. Some templates
come with other, related tables. For example, the Orders template also gives you a place to track
related Customers, Employees, Products, Suppliers, and Categories. Access 2013 includes a large
searchable library of these templates.

Flat vs. Relational Databases


There are two types of databases with respect to tables: flat databases and relational databases. Flat
databases contain a single table of data, while relational databases contain multiple tables of data that
relate to each other through certain key fields. Relational databases are more flexible and
streamlined. If, for example, your database contains only a single table of orders placed for your
business, then finding or changing specific information about a customer might be difficult,
especially if that customer is listed more than once in the orders table. With a relational database,
there would be separate tables for both orders and customers. This would help increase your ability
to use and change information in your database. The main advantage of flat databases are that they
are easier to implement and to maintain. Not all situations would benefit from the added complexity
of multiple tables.

Access the Checklist tile on your LogicalCHOICE course screen for reference
information and job aids on How to Navigate and Edit in a Table

Lesson 1: Getting Started with Access | Topic A


12 | Microsoft® Office Access® 2013: Part 1

ACTIVITY 1-3
Navigating and Editing Data in Tables

Before You Begin


The database C:\091004Data\Getting Started with Access\Inventory Database.accdb is open. No
database objects are yet open in the document pane.

Scenario
You are the database developer for a small lumber and hardware store that is reinventing itself as a
web store for do-it-yourselfers and woodworking hobbyists. You are moving the company's record-
keeping from paper records to a database. You have started developing a product database to track
inventory and to hold information regarding your suppliers. You need to delete one product from
the database and change the supplier information for another. You have already opened the
database, but you do not yet have a view into the data.

1. View the contents of a data table.


a) In the navigation pane, observe the various types of database objects—tables, queries, forms, and
reports—listed. They have been named to help you know what type of object they are. For example,
tblInventory (pronounced "table inventory") begins with "tbl" so you know it is a table.

b) In the navigation pane, double-click tblInventory. A datasheet appears, in which you can view and
edit the contents of the table.

Lesson 1: Getting Started with Access | Topic A


Microsoft® Office Access® 2013: Part 1 | 13

c) Observe the datasheet for tblInventory. Note the following:


• A record of data for a specific product is contained within a single row.
• A field is contained within a single column. For example, the first column contains the
ProductCode field. Each column contains one type of information.
• A value is the actual data stored for a particular field and record. For example, the SupplierID
field for the deck-32 record contains the value "KER."

2. Save a copy of the database.

Note: This course uses a streamlined notation for ribbon commands. They'll
appear as "[Ribbon Tab]→[Group]→[Button or Control]" as in "select
HOME→Clipboard→Paste." If the group name isn't needed for navigation or there
isn't a group, it's omitted, as in "select FILE→Open."
a) Select FILE→Save As. The Save As screen is shown.
b) Verify that Save Database As is selected. Select Save As.
c) If you are prompted to close open objects prior to continuing, select Yes.
d) Browse to the C:\091004Data\Getting Started with Access folder.
e) Change the file name to My Updated Database and select Save. The .accdb file extension will be
added automatically. Since this is a new file that you have not opened before, you may be shown a
security prompt.
f) If you are prompted with a security warning, select Enable Content.

3. Delete a record.
a) In the navigation pane, double-click tblInventory. A datasheet appears, in which you can view and
edit the contents of the table.
b) Use the scroll bar to scroll down until you see the record with the product code win-dbl-3000. You
will no longer carry this product in your store, so you will delete it from the database.
c) On the left side of the win-dbl-3000 row, select the box to select the entire row (record).

Lesson 1: Getting Started with Access | Topic A


14 | Microsoft® Office Access® 2013: Part 1

d) If necessary, select HOME, then select Records→Delete.

You are prompted to confirm the deletion.

e) Select Yes.
f) Observe that the win-dbl-3000 record has been deleted.

4. Change the item description for the bathhw-2 product.


a) Scroll to view the top row of the datasheet.
b) Click in the box where the bathhw-2 row and ItemDescription column intersect. The current value for
this record is "Windsor Model 24" Double Towel Bar Brushed Nickel."
c) Drag to highlight all the text in the ItemDescription field.

Lesson 1: Getting Started with Access | Topic A


Microsoft® Office Access® 2013: Part 1 | 15

d) Type Gotham Model 24" Double Towel Bar Stainless

5. Add a new record to the tblInventory table.


a) Scroll to the bottom of the tblInventory table and observe the record with an * in the left column.
Think of this row as being the last record plus one. It is a new, blank record that provides a ready
means to add a new record.
b) Click in the first field of the * row to select the field for data entry.

c) Type hw-1 and press Enter to move to the next field.


d) Enter the following values to fill in the rest of your new record.
Since data entry slows
Field Value down some learners
considerably, be sure to
Dept Materials monitor learner
progress, including your
SupplierID WOODSTOCK remote learners. Point
out that there are not
ItemDescription Bolt, Hex Head Stainless 1/4-20 x 3"
many more data entry
UnitsInStock 50 tasks in the course.

TargetInventory 50
ReorderLevel 25
LastOrdered 2012-06-01
Location Showroom
Rack 4
Origin Canada
OurUnitCost .18
RetailPrice .25
e) Select FILE→Save to save the database.

6. Right-click the tblInventory tab and select Close to close the table.

Forms and Views


Forms
Forms provide a graphical user interface (GUI) for entering and modifying table data. Forms do not Record Navigation Bar
actually contain data. They simply provide a view into table data. Forms are typically designed to
facilitate repetitive data entry tasks. If you have many fields (columns), a form can be configured to
minimize or avoid the need for horizontal and vertical scrolling as you work within a single record,
which might be less tedious than working in a table's Datasheet view.

Lesson 1: Getting Started with Access | Topic A


16 | Microsoft® Office Access® 2013: Part 1

Figure 1-4: The Record navigation bar.

The Record navigation bar provides controls that you can use to navigate among records.

Views
Views (known as "forms" in Access desktop databases) provide the means by which users will
interact with the Access web app. Views in Access 2013 apps contain a common set of user
interface elements that enable rapid creation of new apps. Access 2013 is designed to enable you to
create functional views with little intervention.

Access the Checklist tile on your LogicalCHOICE course screen for reference
information and job aids on How to Navigate and Edit in a Form

Lesson 1: Getting Started with Access | Topic A


Microsoft® Office Access® 2013: Part 1 | 17

ACTIVITY 1-4
Navigating and Editing Data in a Form

Before You Begin


My Updated Database.accdb is open, and no database objects are opened in the document pane.

Scenario
As the database developer for the Woodworker's Wheelhouse store, you have used table datasheets
to enter data, but you plan to hire some temporary workers to enter your thousands of records into
the database. You want to provide them something a bit more streamlined for data entry than
datasheets. Forms provide the solution.

1. Open a form.
a) In the navigation pane, under Forms, double-click frmInventory. An entry form appears.

b) Observe the form. In this form, you can view, enter, and modify data in the database. Various data
entry controls are shown, along with labels identifying what information is contained within them.

2. Navigate within the form view.


a) Observe the Record navigation bar. You can see that you are viewing record 1.

b) On the Record navigation bar, select the controls to try them out.

Lesson 1: Getting Started with Access | Topic A


18 | Microsoft® Office Access® 2013: Part 1

Note: Note that when you point to each navigation button, a tooltip will appear
with the name of the button.

Navigation Bar Control Function

Next record button Moves to the next record in the table.


Previous record button Moves to the previous record in the table.
Last record button Moves to the last record in the table. If you select
Next record after the last record, a new record will
be shown.
First record button Moves to the first record in the table.
New record button Moves to the new record row. If you enter data, it
will be saved in the new record.
c) Navigate to record 18. The product code for this record is hinge-14.
d) Select the value in the UnitsInStock field.
e) Type 75 to change the selected value.
f) Press Tab to advance to the next text box. The value of 100 is already selected, so you could type
to replace it if you wanted to.
g) Observe the fields in this form. Most are free text entry, but the SupplierID field is a drop-down list.

Note: As an Access database developer, you can determine which values


entered in the database should be free-form text and which should be picked
from a list.
h) In the SupplierID field, select the drop-down arrow and observe the list.

i) Select WOODSTOCK.
j) In the navigation pane, double-click tblSuppliers.
k) Observe the records in the tblSuppliers table. This table is the source of supplier IDs that were
shown in the SupplierID drop-down list.

Lesson 1: Getting Started with Access | Topic A


Microsoft® Office Access® 2013: Part 1 | 19

l) In the upper-left corner of the Access application window, on the Quick Access Toolbar. select the

Save button.

Note: This is a shortcut for selecting FILE→Save.

m) Close the tblSuppliers tab.


n) Close the frmInventory tab.

Queries
While tables give a database its substance, that substance is lifeless until you breathe life into the The Capable Query
database through the addition of queries. Queries transform table data. For example, a query can:
• Join data from multiple tables to produce a new, combined data set.
• Sort results by one or more fields.
• Filter results based on criteria.
• Prompt the user for additional criteria before producing output.
• Perform calculations, and reorganize and summarize data.
• Make mass updates to table data, such as copying or deleting records.
Because they can perform complex transformations and present table data from a completely
different perspective, queries provide a powerful tool for data analysis and reporting.
A Query Join

Figure 1-5: A query join.

Access the Checklist tile on your LogicalCHOICE course screen for reference
information and job aids on How to Run a Query

Lesson 1: Getting Started with Access | Topic A


20 | Microsoft® Office Access® 2013: Part 1

ACTIVITY 1-5
Using Queries

Before You Begin


My Updated Database.accdb is open, and no database objects are opened in the document pane.

Scenario
You understand that there are design benefits to using multiple tables in your database. For
example, it is not a good idea to duplicate supplier contact information in the record for each
product that the supplier provides. If a supplier changes their address or phone number, you would
have to update that information in every record where it appears.
On the other hand, it would be very convenient to show contact information right next to the
product—for example, when you are preparing to place an order. Fortunately, you can use a query
to join data from multiple tables in a temporary view.

1. Use a query to show joined data from multiple tables.


a) In the navigation pane, double-click qryProductSupplierDetail.

Have the learners


interpret the outcome of
the query. The query
results are presented
like a single table, but in
fact, this query joins data
from two tables into a
temporary view. Product
information from
tblInventory
(ProductCode,
UnitsInStock, and
ReorderLevel) is shown
along with related
supplier contact
information from
tblSuppliers (FirstName,
LastName, and so on). When you open the query, it automatically runs and displays the results.
The SupplierID field
exists in both tables and b) Observe the results of the query.
provides the link that c) Close the qryProductSupplierDetail tab.
enables the two tables to
be joined in a query. 2. Use a query to filter data.
Results are sorted by
SupplierID.

Lesson 1: Getting Started with Access | Topic A


Microsoft® Office Access® 2013: Part 1 | 21

a) In the navigation pane, double-click qryProjectPacks. This query filters data. It is showing records
from tblInventory, but has filtered the results to show only product codes that begin with pak-.

3. Use an action query that accepts an input parameter to increase the price for all project packs.
a) Scroll to the right to view the RetailPrice values for the project packs.

b) Close qryProjectPacks.
c) In the navigation pane, double-click qryProjectPackPricer, and in the warning box, select Yes.

d) In the Enter Parameter Value dialog box, type 1.25 and press Enter to raise the price of all project
packs to 1.25 times the current price, or an increase of 25 percent.

Lesson 1: Getting Started with Access | Topic A


22 | Microsoft® Office Access® 2013: Part 1

e) In the warning box, select Yes.

The Capable Query f) In the navigation pane, double-click qryProjectPacks. Scroll to the right to view the new prices, and
Use the previously compare them to the previous prices. The query has updated all project pack prices by the amount
viewed slide to review you specified.
the query capabilities
that learners saw
demonstrated in this
activity.

g) Close qryProjectPacks.

Reports
Reports provide a publish-ready view of data that you can output to various print or digital formats.
You can design a report to include graphic and formatting elements such as images, fonts, and color
themes. You can control the layout and use of white space to suit your needs. Reports can present
table data directly, but they are often used to present data that has been sorted, filtered, and
transformed through a query.

Lesson 1: Getting Started with Access | Topic A


Microsoft® Office Access® 2013: Part 1 | 23

You can always print directly from a table, form, or the results of a query. If you do a print preview
first, you can then see if the margins need to be adjusted before printing to a printer. You are not
able to modify or apply any design to the output when printing this way, but it does allow you to
quickly print the data. Other than being printed as a hard copy, reports can be exported to a
Portable Document Format (PDF) for an easy-to-read electronic copy that preserves the original
formatting

Access the Checklist tile on your LogicalCHOICE course screen for reference
information and job aids on How to Run and Print Reports

Lesson 1: Getting Started with Access | Topic A


24 | Microsoft® Office Access® 2013: Part 1

ACTIVITY 1-6
Using Reports

Before You Begin


My Updated Database.accdb is open, and no database objects are opened in the document pane.

Scenario
Although computer databases can help reduce paper use, in some cases, a printout is necessary. Or
you might need to publish a copy of the database to a web-friendly format that readers can view but
not modify. Access' reporting features enable you to accomplish such tasks.
Now that you have updated the product database, you will prepare some reports from the current
data.

1. Open rptListOfOrders.

Note: If you have a printer defined and the page width of this report is greater
than the page width for that printer, you may receive a message to that effect.
You should be able to close the message and continue on with the Print Preview.

2. Right-click the rptListOfOrders tab and select Print Preview. In Print Preview, the report is shown as it
will appear when printed, and the navigation bar is added to the view so you can navigate between
pages.

3. Observe the report. Reports are optimized for printing and presentation. Like forms, reports can have a
free-form layout, or they can be organized in columns and rows like a table.

Lesson 1: Getting Started with Access | Topic A


Microsoft® Office Access® 2013: Part 1 | 25

4. Use the navigation bar at the bottom of the view to browse other report pages.

5. Close rptListOfOrders.

The Ribbon
The ribbon is a graphical menu panel that appears at the top of the application window. Tabs are
organized in groups related to the type of task being performed, and each tab is further divided into
groups of related commands. You can customize the ribbon by adding, removing, or rearranging
tabs, groups, and buttons. You can hide the ribbon to gain more working space in the document
area by double-clicking any active tab.

Ribbon Tabs
Tabs divide the ribbon into groups of commands that relate to similar types of tasks. The ribbon is
organized to keep navigation to a minimum. Access 2013 provides the following ribbon tabs.

Tab Commands

FILE Open, save, publish, print, and close a database. Also displays the
Backstage view.
HOME Basic formatting and search options, as well as functional groups such
as Views, Sort & Filter, and Records, that are oriented toward
specific types of work you will perform in Access objects.
CREATE Commands on this tab create new database objects, such as tables,
queries, forms, and reports.

Lesson 1: Getting Started with Access | Topic A


26 | Microsoft® Office Access® 2013: Part 1

Tab Commands
EXTERNAL DATA Commands on this tab enable you to move large amounts of data into
and out of Access. A wide variety of data formats are supported,
including Excel spreadsheets, text files, XML, and PDF.
DATABASE TOOLS Commands on this tab enable you to perform certain types of
database-wide tasks.

Note: If you want to know more about the Microsoft Office ribbon,view the LearnTO
Navigate the Office 2013 Ribbon presentation from the LearnTO tile on the
LogicalCHOICE Course screen.

You may want to show


LearnTO Navigate the Contextual Tabs
Office 2013 Ribbon from
the LogicalCHOICE
Contextual tabs are additional tabs displayed on the ribbon when you work with objects such as
Course screen or have tables, forms, queries, or reports. The commands and options available on these tabs are restricted
students navigate out to to only those that can be used to manipulate the objects the tab appears for. These tabs are
the Course screen and displayed along with the core tabs of the ribbon and can be used to modify and format the objects
watch it themselves as a that are displayed. You can switch between the contextual tabs and the core tabs as needed.
supplement to your
instruction. If not, please File Options and the Backstage View
remind students to visit
the LearnTOs for this File- and print-related options are shown in Access 2013's Backstage view. The following is a summary
course on their of functions performed in the Backstage view.
LogicalCHOICE Course
screen after class for Command Description of Function
supplemental
information and Save Save changes made within the current database.
additional resources.
Save As Save the current database with a new file name and/or location, and to a
variety of different output formats and options. Also save the selected
database object as a different database object, with a different name.
Open Open a database.
Close Close the current database.
Info Access a number of options, including:
• Encrypt database with a password.
• Correct and fix database issues.
• View and edit database properties.
Recent View and open recently accessed databases.
New Create a new blank database or one pre-populated with various elements
based on a template.
Print Preview and print an object, and select printer settings.
Account Sign in to or sign up for an Office account. Also access product information
for Access.
Options Change Access configuration settings and preferences.

Lesson 1: Getting Started with Access | Topic A


Microsoft® Office Access® 2013: Part 1 | 27

ACTIVITY 1-7
Exploring Access Ribbon Commands

Before You Begin


My Updated Database.accdb is open, and no database objects are opened in the document pane.

Scenario
To acquaint yourself with the location of Access' ribbon commands, and to get an overview of the
variety of tasks you can perform in a database, you will take a quick tour of commands provided on
the ribbon.
This activity is intended
as a quick overview. It
1. Explore commands available on the ribbon. should not be a
a) Open tblInventory. comprehensive
examination of every
b) Select each ribbon tab as you examine the groups of commands. ribbon command, which
might bog down the
Tab Description class and overwhelm
learners. As you move
HOME Use commands on this tab for general
quickly through this
editing and formatting tasks, as well as activity, refer learners to
sorting, filtering, and searching. the reference tables in
their student materials.
CREATE Use commands on this tab to create new Focus on the ribbon tabs
database objects, such as tables, and groups. Specific
queries, forms, and reports. commands will be
examined in more detail
EXTERNAL DATA Use commands on this tab to move later in the course.
large amounts of data into and out of
Access. A wide variety of other data
formats are supported, including Excel
spreadsheets, text files, XML, PDF, and
others.
DATABASE TOOLS Use commands on this tab to perform
certain types of database-wide tasks.
FIELDS and TABLE (TABLE TOOLS) The tabs in this group are available only
when a table is open and selected.
Commands on these tabs apply only to
tables.

2. Close the database and Access.


It's good practice to
close databases after
Tools and Applications Developed in Access finishing with them to
free up memory, but you
You can think of Access as a software construction set. You might use Access to create tools for may choose to keep
yourself or for an entire team of data workers. Access includes tools that enable you to construct a them open throughout
the activities in this
user interface for a software application. In fact, some software developers use Access as a
course.
prototyping tool, since it provides quick results with relatively little or no software programming

Lesson 1: Getting Started with Access | Topic A


28 | Microsoft® Office Access® 2013: Part 1

code needed. By simply dragging and dropping objects onto a form, you can create elements that are
commonly used in Windows applications, such as buttons, drop-down lists, list boxes, text boxes,
check boxes, calendar date-pickers, and so forth.
Note: To explore uses of Microsoft Access, refer to the LearnTO Find Good Uses for Access
presentation from the LearnTO tile on the LogicalCHOICE Course screen.

You may want to show


LearnTO Find Good
Uses for Access from
the LogicalCHOICE
Course screen or have
students navigate out to
the Course screen and
watch it themselves as a
supplement to your
instruction. If not, please
remind students to visit
the LearnTOs for this
course on their
LogicalCHOICE Course
screen after class for
supplemental
information and
additional resources.

Lesson 1: Getting Started with Access | Topic A


Microsoft® Office Access® 2013: Part 1 | 29

TOPIC B
Create a Simple Access Database
You have opened and edited an existing database and have used objects that were created by
someone else, including tables, forms, queries, and reports. When you want to create a database
yourself, you can start totally from scratch with a blank database. But you can also stand on the
shoulders of others who have created elaborate templates that do a lot of the heavy lifting for you,
providing a nice "starter kit" for a wide variety of different types of databases.

Database Templates
You can use one of the database templates Access provides as the model for a new database. Database Templates
Templates may include pre-defined tables, queries, forms, reports, layouts, fonts, themes, and other
characteristics, which can save you considerable time over creating a blank database and adding
those elements yourself. Microsoft provides many templates. Additionally, Microsoft hosts a user
community through which users can share templates they have created. You can access this
community using your Windows Live® ID. Submissions to this site are checked for viruses and
validated before they are posted for users to download.

Lesson 1: Getting Started with Access | Topic B


30 | Microsoft® Office Access® 2013: Part 1

Figure 1-6: A database template.

Note: Note that the database template icons use a blank document image, as opposed to the
web app templates.

Web App Templates


Web App Templates You can use any of the web app templates Access provides to create a fully-functional web database.
Templates include tables, relationships, and views, which give you a functional web app that you can
build on. There are many templates available, and you can even search online for more from Access.

Lesson 1: Getting Started with Access | Topic B


Microsoft® Office Access® 2013: Part 1 | 31

Figure 1-7: A web app template.

Note: Note that the web app template icons use a document with a globe image, as opposed to
the database templates.

When you select a web app template, you have to select a location to store it. The web app template
location needs to be available on the web. This location can be on SharePoint Online with Office
365, on SharePoint Server, or on SkyDrive.
Once the web app is created in the location you specified, you can start adding data immediately by
launching the web app, or you can customize it to fit your needs.

Save Options
The FILE tab includes two options for saving a database. The Save As command enables you to
save an Access database to a different file name and location. The Save command updates the
current database file with any changes you have made.

Lesson 1: Getting Started with Access | Topic B


32 | Microsoft® Office Access® 2013: Part 1

Field Definition
When you create a new database/tab, Access automatically creates an ID field that provides
autonumbering to give each record a unique ID.

Design View
You can easily insert a new field in Datasheet or Design view. In Datasheet view, you can add a
field by selecting the data type for the field in a new column, and then you can name the field.
Design view displays a grid in which you can define the structure of a table. Fields are shown along
with their data types and descriptions.

Field Data Types


When you define a new field, you must specify the type of data the field will hold. The following
table describes field types supported in Access.

Type Description

Text Includes text, digits, symbols, and other keyboard characters. This
data type has a limit of 255 characters.
Memo Holds similar content to text, but this type supports rich-text
formatting, and can hold up to 2 GB of data.
Number Holds numeric values only.
Date/Time Contains formatted date and time values.
Currency Holds monetary values, such as dollars, which are not rounded
during calculations.
AutoNumber Provides unique, sequential numbers created automatically by
Access. Typically used to enable a field to contain a unique
identifier.
Yes/No Holds Boolean values. The field can contain values such as True/
False, Yes/No, or On/Off.
OLE Object Includes binary data such as documents, images, and spreadsheets.
Hyperlink Holds email addresses, website URLs, and network paths.
Attachment Holds file data. This field supports more file types than an Object
Linking and Embedding (OLE) object, and enables multiple files to
be attached to a record.
Calculated Produces a result through calculation.
Lookup Wizard Provides a list of selectable values.

Primary Key
A primary key is a field that is configured to require a unique value in each record. No two records in
the table may have the same field value, and each record must contain a value in the primary key
field. Because the field contains a unique value, it can be used as a unique identifier for a record.
Fields that are designated as a primary key are shown in Design view with a Key icon.

Object Naming Conventions


A naming convention is a set of rules for identifying and denoting certain variables and functions in
Microsoft Access. Implementing a naming convention will likely increase readability and the
aesthetic quality of your database. There are several naming conventions that different database
administrators use, and not all agree on what is the best. The important thing is that you use one.

Lesson 1: Getting Started with Access | Topic B


Microsoft® Office Access® 2013: Part 1 | 33

For example, one commonly-used naming convention is the Leszynski naming convention. This
convention recommends that you do not include spaces in field and table names. Although Access
permits spaces, it will complicate matters for you later on if you start writing code or if you intend to
use Access with other database systems. Names can be up to 64 characters long. If you do include
spaces in object names, you can refer to the object in code by surrounding it in braces to show that
it is all part of the same object name. For example, a field name such as myFieldName does not
require brackets, but a field name with spaces, such as [My Field Name], does.

Access the Checklist tile on your LogicalCHOICE course screen for reference
information and job aids on How to Create a New Database

Lesson 1: Getting Started with Access | Topic B


34 | Microsoft® Office Access® 2013: Part 1

ACTIVITY 1-8
Creating a New Database

Scenario
It's time to roll up your sleeves and create your own database. You will create an inventory tracking
and ordering system for the Woodworker's Wheelhouse store. To gain a good understanding of
database construction, rather than use a template, you will start from scratch, creating a blank
database and building out its structure, functionality, and formatting.

1. Create a new database.


a) Open Access.
b) Observe the Microsoft Access application window. Without a database open, Access begins in the
Access 2013 view, from which you can open an existing database or create a new one.

c) Select Blank desktop database.


d) In the File Name text box, type My Inventory
e) Select the Browse folder icon. Navigate to the C:\091004Data\Getting Started with Access folder
and select OK.

Lesson 1: Getting Started with Access | Topic B


Microsoft® Office Access® 2013: Part 1 | 35

f) Select Create. The database is created with one empty table, Table1. Before learners select
Create, have them verify
that their file name and
path match your screen
or the image shown
here.

2. Define table fields.


a) Observe Table1. The first field, ID, has been automatically created. However, ID is an ambiguous
field name, so you will rename it.
b) Right-click the ID field header and select Rename Field.
c) Type ProductCode
d) Select the Click to Add column header and select Short Text to create a new field of the type Short
Text.
e) Rename Field1 as Dept
f) Add another short text field, naming it SupplierID
g) Add another short text field, naming it ItemDescription
h) Select the ItemDescription column heading to choose the column.

Lesson 1: Getting Started with Access | Topic B


36 | Microsoft® Office Access® 2013: Part 1

i) Point between the ItemDescription and Click to Add column headings. The mouse pointer becomes
a two-headed arrow to show that you can resize the column. Drag the ItemDescription column width
wider, as shown.

Caution: It can be tricky finding the right place to drag the column width. It's a
little easier if you select the column first.
j) Select FILE→Save to save the database. Because the table has not been saved yet, you are
prompted to name it.

k) Select the table name, if necessary, and type tblInventory


l) Select OK.
m) Right-click the tblInventory tab and select Design View. The fields you created appear in a table.
You can add fields within this view as well.
Point out that, because n) Select the table cell below ItemDescription.
of the layout, defining
fields in Design view
might involve less
scrolling than in the
datasheet.

o) Type UnitsInStock and press Enter. The Data Type drop-down list displays, with the Short Text data
type selected by default.
p) Select the drop-down arrow and select Number.
q) Add the following fields to the table.

Field Name Data Type

TargetInventory Number
ReorderLevel Number
LastOrdered Date/Time
Location Short Text
Rack Short Text

Lesson 1: Getting Started with Access | Topic B


Microsoft® Office Access® 2013: Part 1 | 37

Field Name Data Type

Origin Short Text


OurUnitCost Currency
RetailPrice Currency
r) Observe the Data Type for ProductCode. The first field was automatically set to AutoNumber.
s) Change the Data Type for ProductCode to Short Text. Ensure that students
t) Observe the Key icon next to ProductCode. The icon shows that this field is a primary key, meaning have finished this step
that no two values entered within this field can be the same. The product code is a unique identifier before you continue the
in this table. activity. In this and other
u) Save the database. tasks with a lot of typing,
you might ask remote
v) Right-click the tblInventory tab and select Datasheet View. The fields you created appear in the
learners to indicate
table.
when they have finished
w) Right-click the tblInventory tab and select Close to close the table while leaving the database open. by "raising their hand" in
your web conferencing
system.
Methods to Create a Form
Access provides several methods for creating a form.

Form Creation Method Description

Form Create a form that automatically includes all the fields in the
selected table or query.
Form Design Start with a blank form in Design view and add components
manually.
Blank Form Start with a blank form in Layout view and add components
manually.
Form Wizard Create a form by selecting the tables or queries to use as the data
source, and selecting each field to be included in the form.

Form Object Views


The following table describes the various views Access provides for creating and using forms.

View Use This View To

Form Use a form to add, edit, and move among records.


Design Create or modify elements of a form. In this view, you can add and delete form
elements and set form properties.
Layout Create or modify a form layout. This view presents data similar to the Form
view, but enables you to change the form design, similar to the Design view.
This view is optimized for making changes to the form's layout, such as
resizing and rearranging form elements.

Form Sections
The form Design view divides the form into three sections: the Header, Detail, and Footer. These
sections are customizable. The Header includes information you want to appear at the top of the
form. Typically, this includes the form title. The Detail section includes the record data itself. The

Lesson 1: Getting Started with Access | Topic B


38 | Microsoft® Office Access® 2013: Part 1

Footer section includes information you want to appear at the bottom of the form. Typically, this
includes the date and page number.

Access the Checklist tile on your LogicalCHOICE course screen for reference
information and job aids on How to Create a Form

Lesson 1: Getting Started with Access | Topic B


Microsoft® Office Access® 2013: Part 1 | 39

ACTIVITY 1-9
Creating and Testing a Form

Before You Begin


My Inventory.accdb is open, and no database objects are opened in the document pane.

Scenario
Much data will have to be entered in your database. To facilitate data entry, you will create a form
for the tblInventory table.

1. Create a form.
a) In the navigation pane, select tblInventory once to select it without opening it.
b) Select CREATE→Forms→Form. A new form is created based on the selected table.
c) Save the database. You are prompted to name the new form. The table's name is provided, but you
will add the frm (for "form") prefix.
d) Name the form frmInventory and select OK.

2. Test the new form by entering a record.


a)
Note: The layout of the form can differ depending on the resolution of the
computer running Access. In the following screenshot it is shown with two
columns, but if you have a smaller resolution it might have a single column.
Right-click the frmInventory tab and select Form View to prepare the form for data entry.

b) Enter the following values into the form.

Lesson 1: Getting Started with Access | Topic B


40 | Microsoft® Office Access® 2013: Part 1

Field Value

ProductCode bathhw-2
Dept Bathroom
SupplierID WOODSTOCK
ItemDescription Windsor Model 24" Double Towel Bar Brushed
Nickel
UnitsInStock 22
TargetInventory 25
ReorderLevel 10
LastOrdered 6/4/2012
Location Showroom
Rack 2-3a
Origin China
OurUnitCost 35
RetailPrice 41
c) Observe what happened when you entered the RetailPrice value. A new record was automatically
created. This behavior eliminates the step of having to request a new record, so you can quickly
enter large numbers of records.
Make sure your local
and remote learners Note: When you enter the date in the LastOrdered field, it will be displayed in
have finished entering the date/time format currently configured on your computer. Monetary values
the values before you will be shown in the currency format.
proceed in the activity.
d) Save the database.
e) Open the tblInventory table. Your data is displayed in the table layout.
f) Close the tblInventory and frmInventory tabs and close the My Inventory.accdb database.

Access Web App Views


There are four kinds of views that you can create: List Details, Datasheet, Summary, and Blank.
When you create a new table, the List Details and Datasheet views are created automatically for that
table.

View Description

List Details One of the views Access automatically generates when you create a table.
The main feature that distinguishes a list view is the list pane that appears on
the left side of the view. The list pane is used to filter and navigate the
records contained in the view.
Datasheet One of the views Access automatically generates when you create a table.
Datasheet views are useful for those who find it easier to enter, sort, and
filter data in a spreadsheet-like manner.
Summary A view that you can use to group records based on a field and optionally
calculate a sum or average. The field to group by displays its values in a list
view. When a group is selected, the record contained in the group is
displayed in a related items control. The related items control can be

Lesson 1: Getting Started with Access | Topic B


Microsoft® Office Access® 2013: Part 1 | 41

View Description
configured to display up to four fields that have information about the
record. You can specify a pop-up view if you want to drill down on the item.
Blank These views are blank when you create them. Blank views are useful for
creating a pop-up view that will contain a single record when you open it.
Alternatively, you could use a Blank view to create a custom switchboard for
the user to navigate your app.

The built-in views each have an Action Bar with buttons for adding, editing, saving, and deleting
items. You can add more buttons to this bar to run any custom macros you build, or you can
remove buttons you don't want people to use.
Views have a couple of features that make editing easier than forms. You can drag and drop
controls on a form and the other controls move automatically to make room. In addition, there are
callouts next to each section and object that allow you to access property settings without having to
search through the property sheet.

Lesson 1: Getting Started with Access | Topic B


42 | Microsoft® Office Access® 2013: Part 1

TOPIC C
Get Help in Microsoft Access
As you work with Access, you may have questions about a particular feature or how to perform a
specific task. The Access Help feature provides you with instructive information on Access. Its
information sources include local files that are installed with Access, as well as resources located on
the web.

Access Help
Access Help Window Access Help provides instructive information about Microsoft Access 2013 features and
functionality. Some Help information is installed with Access on the local hard drive. Other Help
information is located on the web. When you search, you can specify which sources you want to use.

Figure 1-8: The Access Help window.

Access Help include various features to help you find answers to questions you have about using
Access

Lesson 1: Getting Started with Access | Topic C


Microsoft® Office Access® 2013: Part 1 | 43

Help Feature Description

Toolbar Provides options to navigate, print, and format help


content.
The Search help text box Enables you to type the text you want to search for.
Popular searches section Displays topic links that users commonly search for.
Basics and beyond section Displays links to articles that provide help on some basic
tasks.

You can press F1 to access context-sensitive Help from within Access. Alternatively, you can use
the Search Access Help drop-down list to narrow the search results to a specific area. The
following table describes the search categories.

Area What Is Searched

Access Help Built-in Help and Help on the Microsoft Office website.
Access Templates Sample templates on the Microsoft Office website.
Access Training Training resources on the Microsoft Office website.
All Access All resources in Access Help, Access Templates, and Access
Training.
Developer Reference Programmers' guides, samples, and other resources related to
programming in Access.

Lesson 1: Getting Started with Access | Topic C


44 | Microsoft® Office Access® 2013: Part 1

ACTIVITY 1-10
Getting Help in Access

Before You Begin


Access is running.

Scenario
Access is a widely used and well-supported application. Many support resources are available on the
web and through developer communities. As you look for continued support, don't overlook the
resources available to you through Access' integrated Help feature.

1. Search for a Help topic.


a) Near the top-right corner of the Access application window, select the Microsoft Access Help button.

Lesson 1: Getting Started with Access | Topic C


Microsoft® Office Access® 2013: Part 1 | 45

Note: You can also press F1 to launch the Access Help window. If the
selected item in Access provides contextual help, the Help window will display
help regarding that item.
b) Observe the Access Help window. From this point, there are several ways to find the help topic you
are looking for. You can use the Access Help Search help text box, follow the Popular searches
links, or follow the Basics and beyond links.
c) Select the drop-down arrow next to Access Help. Observe that you can select Access Help from
Office.com or Access Help from your computer.

Note: If you do not have an Internet connection, then you will not be able to
use Access Help from Office.com.
d) If necessary, select Access Help from Office.com.
e) In the Search help text box, type create form
f) Select the Search online help icon.
g) Select Create a form by using the Form tool. An article explaining how to navigate records in Access
is shown.

Note: Because the content on Office.com is not static, it is possible that this
search will return different results. If so, then select a different article that
sounds appropriate.
h) Select the Home icon.

Lesson 1: Getting Started with Access | Topic C


46 | Microsoft® Office Access® 2013: Part 1

i) Close the Access Help window.

2. Use the Help system to find a general summary of a database design process. Discuss the following.
If you have remote
What are the first three steps of a database design process?
learners accessing
through a web A: Answers may vary, depending on which article you find. For example, one Help article ("The
conference, be sure to Design Process") provides the following steps to designing a database: 1) Determine the purpose
keep them involved in of your database, 2) Find and organize the information required, 3) Divide the information into
this activity. For tables, 4) Turn information items into columns, 5) Specify primary keys, 6) Set up the table
example, if your web relationships, 7) Refine your design, and 8) Apply the normalization rules.
conferencing system
enables learners to 3. Close the Access Help window.
easily share their
desktops, you can have
learners show what they
have found in their
search so that the entire
class can view their
findings.

Lesson 1: Getting Started with Access | Topic C


Microsoft® Office Access® 2013: Part 1 | 47

Summary
In this lesson, you systematically analyzed and used an existing Access database to learn how an
Access database is constructed. You used existing tables, queries, forms, and reports. You
considered potential uses for Access and developed a simple database from scratch, including a
form. And, you used the Help system to look up help on navigation within Access and guidelines on
database design.
Describe the general tasks involved in constructing a database.
A: Answers will vary. A general approach was represented in the tasks conducted in this lesson,
including: consider the data and functionality (general design) needed; construct tables and add
fields; populate with data; and develop queries, forms, and reports.

What are some of the benefits of moving data into a database application like Access?
A: Answers will vary, but may include such statements as: transforming data into knowledge, driving
analysis and decisions, bringing order to chaos, and so forth.

Note: Check your LogicalCHOICE Course screen for opportunities to interact with your
classmates, peers, and the larger LogicalCHOICE online community about the topics covered in
this course or other topics you are interested in. From the Course screen you can also access
available resources for a more continuous learning experience.

Encourage students to
use the social
networking tools
provided on the
LogicalCHOICE Home
screen to follow up with
their peers after the
course is completed for
further discussion and
resources to support
continued learning.

Lesson 1: Getting Started with Access |


2 Working with Table Data
Lesson Time: 1 hour, 10 minutes

Lesson Objectives
In this lesson, you will organize and manage data stored within Access tables. You will:
• Efficiently locate and change data.
• Sort and filter records in a table.
• Create a lookup field.

Lesson Introduction
You are familiar with the Microsoft® Office Access® 2013 user interface and have created a
simple database. Simply by moving your data into Access data tables, you gain powerful
capabilities for working with structured data, such as searching, sorting, filtering, and
providing cross-table lookups. In this lesson, you will use those capabilities as you manage
the content within a product database.
50 | Microsoft® Office Access® 2013: Part 1

TOPIC A
Modify Table Data
You created the basic table structure within a database. To keep data in these tables current, you
need to know how to add, delete, and update data in a table.

AutoCorrect
Like other Microsoft® Office applications, Access provides an AutoCorrect feature. Access provides
corrections to common formatting or spelling problems. On occasion, you may wish to override this
feature, and can do so by selecting the Lightning Bolt icon that Access shows next to a word it has
changed through AutoCorrect. A menu is shown with an option to change the item back to your
original spelling.

Commit, Save, and Undo


When you enter data in a record, the new data is not committed to storage until you leave the record
—by moving to another record, for example. Access displays a Pencil icon when you have
uncommitted data. To commit data without moving to another record, you can save the database or
select the Pencil icon. You can "back out" of the new data by pressing Esc or selecting Undo.

Access the Checklist tile on your LogicalCHOICE course screen for reference
information and job aids on How to Undo

Lesson 2: Working with Table Data | Topic A


Microsoft® Office Access® 2013: Part 1 | 51

ACTIVITY 2-1
Undoing Record Modifications

Data Files
C:\091004Data\Working with Table Data\Inventory Modify.accdb

Scenario
As you type, Access monitors your spelling and automatically makes changes. Often, those changes
are helpful, but sometimes you want to keep the text the way you originally entered it. Fortunately,
it's easy to back out of an AutoCorrect change. If you make changes that you need to undo, the
Undo command works in Access much as it does in other Office applications.

1. From the C:\091004Data\Working with Table Data folder, open the Inventory Modify.accdb database. If
a security prompt is shown, select Enable Content.

2. Save the database in C:\091004Data\Working with Table Data as My Inventory Modify and, if prompted,
select Enable Content.

3. Open the tblInventory table.


Point out that numerous
4. Add a new record to the tblInventory table. records have been
a) Select HOME→Records→New. added to the database.
b) Observe that the input focus has moved to the first column of the new record row (the last record
plus one row).

c) Type dec-25 and press Enter.


d) The next field, Dept, is selected. Type Decor and press Enter.
e) Observe that Access automatically corrects the spelling, adding an acute accent over the letter e.

f) Select the AutoCorrect Options (Lightning Bolt) icon and select Change Back to "Decor".

g) Press Enter to enter "Decor" and advance to the next field.

Lesson 2: Working with Table Data | Topic A


52 | Microsoft® Office Access® 2013: Part 1

5. Exit the record without committing.

a) Observe the Pencil icon at the left end of the record. The record has not yet been written.

b) On the Quick Access Toolbar, select Undo to cancel the new record.

Note: As long as the Pencil icon is showing, the record has not been committed.
To commit a record, you can select the Pencil icon, move to another record, or
save the database. In most cases, Undo works even if you have committed and
saved changes. When you perform actions that Access will not be able to undo,
Access typically displays a warning before the action is completed.

Quick Search
In addition to providing buttons to navigate from record to record, the Record navigation bar
provides a Search text box that moves you to the first record that contains the text you type, as
soon as you enter it.

Access the Checklist tile on your LogicalCHOICE course screen for reference
information and job aids on How to Use Quick Search to Find and Modify Records

Lesson 2: Working with Table Data | Topic A


Microsoft® Office Access® 2013: Part 1 | 53

ACTIVITY 2-2
Using Quick Search to Find and Modify Records

Before You Begin


The My Inventory Modify database is open, and tblInventory is displayed in Datasheet view.

Scenario
Your product line and inventory are continually changing. On a regular basis, you and your
employees must update your database to keep information current. You will use the quick search
feature in Access to help you quickly jump to the record you need to change.

1. Update a record in the tblInventory table.


a) On the Record navigation bar, in the Search text box, type hinge-16

Note: As you type, the first record that matches information you have typed is
selected. Searching on a value that is likely to be unique (such as a product
ID) ensures you will find the record quickly.
b) In the SupplierID field for the selected record, type WOODSTOCK and press Enter.
c) Press Home to move the input focus back to the first field (ProductCode) of the current record.

2. Delete a record from the Inventory table.


a) On the Record navigation bar, in the Search text box, type hinge-47 to find the record for hinge-47.
b) Move the mouse pointer to the left of hinge-47, and when it changes to an arrow, right-click and
select Delete Record.

c) In the Microsoft Access message box, select Yes. The record is deleted.

The Find and Replace Dialog Box


The Find and Replace dialog box enables you to quickly locate and change database information.
The dialog box contains two tabs with options that enable you to search for and replace data.

Lesson 2: Working with Table Data | Topic A


54 | Microsoft® Office Access® 2013: Part 1

Tab Description

Find Identify text to be found in the Find What text box. You can also specify the
search target, as well as the search direction.
Replace Identify what to change the text to in the Replace With text box. Provide the
replacement text, the search target, as well as the search direction.

Access the Checklist tile on your LogicalCHOICE course screen for reference
information and job aids on How to Use Find and Replace

Lesson 2: Working with Table Data | Topic A


Microsoft® Office Access® 2013: Part 1 | 55

ACTIVITY 2-3
Using Find and Replace to Modify Records

Before You Begin


The My Inventory Modify database is open, and tblInventory is displayed in Datasheet view.

Scenario
Sometimes you need to make the same change to multiple records. If the change is consistent and
pervasive, you might be able to use Find and Replace to make the change.

Replace all instances of the text "dec-" with "hmdecor-".


a) Scroll to view records in the Décor department.
b) Observe that product codes for the Décor department begin with "dec-", while product codes for the
Deck and Patio department begin with "deck-". These two product code prefixes are similar and may
lead to data entry errors. To avoid confusion, you will change the prefix for Home Décor items to
"hmdecor-".
c) Select the ProductCode table heading to select the whole column. You will limit your search to this
column.
d) Select HOME→Find→Replace.

e) Verify that, within the Find and Replace dialog box, the Replace tab is selected.

Caution: The same dialog box is used for both find and replace operations, so
it is good practice to verify that the tab you have selected matches the
operation you want to perform.
f) In the Find What text box, type dec- and press Tab.
g) In the Replace With text box, type hmdecor-
h) From the Look In drop-down list, select Current field.
i) From the Match drop-down list, select Start of Field.

Lesson 2: Working with Table Data | Topic A


56 | Microsoft® Office Access® 2013: Part 1

j) Select Replace All to replace all the instances of the text "dec-" with the text "hmdecor-".

k) In the Microsoft Access message box, select Yes.


l) In the Find and Replace dialog box, select the Close button.

m) Scroll through the table, if necessary, to verify that all instances of the dec- product codes have
been changed to hmdecor-.

Datasheet Totals
Adding Calculations to Use the Totals row to add summary values to a table. The Totals row enables you to display a
the Totals Row calculated value based on all the values in a specified field, such as the count of records or the sum,
average, maximum, minimum, standard deviation, or variance of values in the field.

Lesson 2: Working with Table Data | Topic A


Microsoft® Office Access® 2013: Part 1 | 57

Figure 2-1: Adding calculations to the Totals row.

Access the Checklist tile on your LogicalCHOICE course screen for reference
information and job aids on How to Add a Totals Row

Lesson 2: Working with Table Data | Topic A


58 | Microsoft® Office Access® 2013: Part 1

ACTIVITY 2-4
Adding a Totals Row to a Datasheet

Before You Begin


The My Inventory Modify database is open, and tblInventory is displayed in Datasheet view.

Scenario
As you modify records in a table, it can be helpful to have summary information provided right in
the table so you can see the general effect of your changes on record count, averages, and so forth,
without having to run a report. The Totals row can provide such information.

Add a Totals row to the Inventory table.


a) Scroll to the bottom of tblInventory and observe that there is currently no Totals row.
b) Select HOME→Records→Totals.
c) Observe that a new row labeled "Total" is shown at the bottom of the table.
d) In the Total row, select the Dept column, and from the drop-down list, select Count.

e) Observe that the number of products is shown.


f) In the Total row, select the OurUnitCost column, and from the drop-down list, select Average.

Note: When you scroll to the right, the Total row heading may scroll out of
view. If you cannot produce the drop-down list, you may be in the wrong row.
The Total row is right beneath the * row.
g) Observe that the average cost of products is shown.
h) In the Total row, show the average retail price.

Lesson 2: Working with Table Data | Topic A


Microsoft® Office Access® 2013: Part 1 | 59

TOPIC B
Sort and Filter Records
As you work with a database, it can be helpful to temporarily sort or filter a table to show only
records that match certain criteria. For example, you might want to quickly view the products for a
particular vendor. If this were a repetitive task, a query might be called for, but sometimes you just
need to quickly focus on a particular group of records. Access provides some powerful features that
enable you to quickly accomplish this.

The Sort Feature


Access's sorting capability can automatically arrange numeric, alphabetic, or date values in ascending Records in Ascending
or descending order. Once applied, you can remove a sort when it's no longer needed. You can sort Order by Dept
by more than one column at a time. In a multi-level sort, the last column sorted is the primary sort,
and the column sorted first is the secondary sort.

Figure 2-2: Records in ascending order by Dept.

The Filter Feature


Access enables you to filter data based on criteria you have applied to a specific column. This
enables you to focus only on records that meet certain criteria, such as maintenance tasks that are
overdue (based on the last maintenance date), or products that need to be ordered from a supplier
(based on the current amount of inventory). You can specify a different filter for each field in the
table, applying multiple filters at the same time.

Lesson 2: Working with Table Data | Topic B


60 | Microsoft® Office Access® 2013: Part 1

Filter Commands
The following table describes options provided in the Sort & Filter ribbon group.

Option Description

The Selection drop-down list Enables you to filter items within a selected field. The drop-
down list provides various options to filter data based on the
values in the field, values not in the field, or values within a
specific range.
The Advanced drop-down list Enables you to apply filters not commonly available in the
filters list, or save a filter as a query object in a database.
The Toggle Filter button Enables you to switch between a filtered and unfiltered view of
data.

Saving a Filter as a Query


A filter remains applied only as long as the table remains open. When you reopen a table, you have
to reapply the filter if you want it in effect. However, you can save a filtered table as a query, which
you can open the next time you want to view the filtered table.

Access the Checklist tile on your LogicalCHOICE course screen for reference
information and job aids on How to Sort and Filter Records

Lesson 2: Working with Table Data | Topic B


Microsoft® Office Access® 2013: Part 1 | 61

ACTIVITY 2-5
Sorting and Filtering Records

Before You Begin


The My Inventory Modify database is open, and tblInventory is displayed in Datasheet view.

Scenario
You are considering switching from the vendor WOODSTOCK to a different vendor. You want to
quickly determine how many products will be affected.

1. Sort tblInventory by Dept and SupplierID.


a) Observe that tblInventory is not sorted by Dept or SupplierID.
b) Select the Dept table heading to select the column.
c) Select HOME→Sort & Filter→Ascending.

Records are now sorted by department. A Sort Indicator icon appears in the column heading for
Dept, showing that a sort is in effect.
d) Select the SupplierID table heading to select the column.
e) Select HOME→Sort & Filter→Ascending.
f) Observe how the table is sorted. The Sort Indicator icon appears in the Dept and SupplierID
headings, showing that a sort is in effect for both columns. Since the sort was applied to SupplierID
last, that is the primary sort. Dept is a secondary sort. Within the group of records for the PUGG
supplier ID, the records are sorted by dept: a group of Hardware records is followed by Materials
records. Note that additional Materials records appear in the records for the WOODSTOCK supplier
ID.

2. Remove both sorts from tblInventory.


a) Observe the various departments supplied by PUGG and WOODSTOCK. This database is small
enough that you could manually count the number of products supplied by each vendor, but it's
faster to filter out records by SupplierID and let Access do the counting for you.
b) Select HOME→Sort & Filter→Remove Sort to restore the table to its original sort order.

3. Filter tblInventory by supplier.


a) Select the SupplierID table heading to select the column.
b) Select HOME→Sort & Filter→Filter.
c) In the displayed drop-down list, uncheck the Select All check box.
d) Check the WOODSTOCK check box and select OK.
e) Observe that only the products supplied by WOODSTOCK are shown. A Filter icon appears in the
SupplierID column heading to show that a filter has been applied based on that column. There are
13 products in total.

4. Add a filter for the Materials department.


a) Observe the departments in the Dept column. Several departments are supplied by WOODSTOCK.
You can run a second filter to further filter down the table.
b) In the Dept column heading, select the Down Arrow icon.

Lesson 2: Working with Table Data | Topic B


62 | Microsoft® Office Access® 2013: Part 1

Note: This is an alternative to selecting the column and selecting HOME→Sort


& Filter→Filter.
c) In the displayed drop-down list, uncheck the Select All check box.
d) Check the Materials check box and select OK.
e) Observe that both the Dept and SupplierID column headings contain a Filter icon, showing that both
filters are in effect. There are five products supplied by WOODSTOCK for the Materials department.

5. Clear the Dept filter.


a) In the Dept column heading, select the Filter icon.
b) Select Clear filter from Dept.

Lesson 2: Working with Table Data | Topic B


Microsoft® Office Access® 2013: Part 1 | 63

c) Observe that the Dept filter has been cleared. The SupplierID filter is still applied.
d) Save the database and exit Access.
e) Reopen the My Inventory Modify.accdb database.
f) Double-click the tblInventory table to open it.
g) Observe that the filter is no longer applied.

Note: Filters applied through the Sort & Filter group commands are not saved
along with the database. You can use them to temporarily narrow down and
organize tables, knowing that the original data in the table will remain intact
when you save.
h) Close the tblInventory tab but leave the database open.

Lesson 2: Working with Table Data | Topic B


64 | Microsoft® Office Access® 2013: Part 1

TOPIC C
Create Lookups
Early databases were flat files. They contained one set of data and were not necessarily very
organized. While it is possible to create single-table databases in Access, things start to get
interesting when you structure data in multiple tables and establish relationships between those
tables. Lookup fields enable you to establish a simple relationship between two tables and provide a
first step toward developing more advanced table relationships.

Lookup Fields
Table Relationship Many Access features require that field values be entered consistently. For example, Access will not
view "WOODSTOCK," "Woodstock," and "WDSTK" as the same values. If you provide a fixed
set of values to choose from, rather than have the user enter them in a record through free-form
text entry, you will promote consistency.

Table Relationships
Access provides many powerful features that enable you to quickly search, sort, and filter table data.
You can do these tasks on a table-by-table basis, but Access also provides advanced capabilities that
enable you to deal with multiple tables in unison. This opens up all sorts of possibilities for
improving efficiency, maintainability, and performance of the database.
Once you establish a relationship between tables, you can work with the data in those tables in unison.
For example, your suppliers table might contain a list of product suppliers and information such as
the supplier ID, contact information, and so forth. Your inventory table might contain a list of
products you carry, along with related information such as the product code and the supplier ID of
the company from which you buy the product. Since both tables include a supplier ID field, you
could use that field to establish a relationship between the two tables.

Lesson 2: Working with Table Data | Topic C


Microsoft® Office Access® 2013: Part 1 | 65

Figure 2-3: A table relationship.

Suppose you have a product code for one of the products in inventory. In the inventory table, you
can look up that product's associated supplier ID. Once you know the supplier ID, you can look up
the supplier's name, phone number, and address. So, knowing the product code can lead you to
information about the supplier for that product, even though the supplier information is in a
different table.
There is elegance to this approach. You could provide contact information fields directly in the
inventory table, and enter the information for each product. But that requires a lot of duplication of
data and effort, and would be difficult to maintain. With related tables, once the relationship is
established through a common field, the data from one table is associated with records in the other
table without the need for duplication.

Lesson 2: Working with Table Data | Topic C


66 | Microsoft® Office Access® 2013: Part 1

The Relationships View


The Relationships View

Figure 2-4: The Relationships view.

The Relationships view shows the relationships that exist between various tables in a database. A
field list is shown for each table, and join lines connect related tables. Each end of the join line will
display either the number 1 (read as "one") or an infinity symbol (read as "many"). This indicates the
relationship (one-to-one or one-to-many) between the two tables. "One" means that the field in that
table must contain unique data. Access will not permit duplicate values on that side of the
relationship. "Many" means that the field in that table can contain duplicate values.

Foreign Key
A foreign key is a field that is linked to the primary key in another table. In the example shown in the
You may want to show figure, tblInventory contains the foreign key field SupplierID, which is linked to the primary key
LearnTO Follow field SupplierID in tblSuppliers. To establish such a link, the primary key and foreign key fields
Principles of Database
Design from the
must have the same data type. Duplicate values can appear in foreign key fields, but unique values
LogicalCHOICE Course must exist in primary key fields.
screen or have students
navigate out to the Referential Integrity
Course screen and A database is considered to have referential integrity when every foreign key in every table has a link to
watch it themselves as a
a primary key in another table. Ensuring referential integrity prevents invalid data entry.
supplement to your
instruction. If not, please Note: To learn more about database structural design, refer to the LearnTO Follow Principles
remind students to visit
of Database Design presentation from the LearnTO tile on the LogicalCHOICE Course
the LearnTOs for this
course on their screen.
LogicalCHOICE Course
screen after class for
supplemental
information and
additional resources.

Lesson 2: Working with Table Data | Topic C


Microsoft® Office Access® 2013: Part 1 | 67

ACTIVITY 2-6
Examining the Purpose of a Primary Key

Before You Begin


The My Inventory Modify database is open. No objects are displayed in the document pane.

Scenario
You want to create relationships in your database tables, but first you will conduct an experiment to
see what happens if you enter values that are not unique within a field defined as a primary key.

Examine how Access enforces the uniqueness of a primary key.


a) Display tblSuppliers in Design view.
b) Observe that the SupplierID field provides a unique identifier for each supplier in the table. The Key
icon shows that SupplierID is the primary key for tblSuppliers.

c) View tblSuppliers in Datasheet view.


d) Observe the supplier records. Each supplier has a specific SupplierID, as well as other information.
e) In the SupplierID field, select the value WRIGHT.
f) Change WRIGHT to WOODSTOCK

g) Press Enter.
h) Select FILE→Save.

You cannot save the change you made because the primary key for the table would contain
duplicate values. A primary key is a field that contains unique values in every record. Many of
Access' most powerful features rely on tables having a primary key field. Using these key fields, you
can establish a "lookup relationship" between one table and another.
i) Select OK and select Undo to revert the record back to WRIGHT.
j) Close the tblSuppliers tab.

The Property Sheet Pane


Use the Property Sheet to set properties for objects such as tables, queries, forms, and reports. The The Property Sheet
Property Sheet is available only in Design view.

Lesson 2: Working with Table Data | Topic C


68 | Microsoft® Office Access® 2013: Part 1

Figure 2-5: The Property Sheet.

Lesson 2: Working with Table Data | Topic C


Microsoft® Office Access® 2013: Part 1 | 69

ACTIVITY 2-7
Configuring a Form Lookup Field

Before You Begin


The My Inventory Modify database is open.

Scenario
You want to add some features in your entry form to prevent users from entering duplicate values in
a primary key field.

1. In frmInventory, enter a supplier ID that doesn't exist in tblSuppliers.


a) In the navigation pane, double-click frmInventory to show the entry form.
b) Observe the SupplierID code for the bathhw-2 record. At this point, the SupplierID is a free-form text
entry field. Users can freely type values other than those in tblSuppliers.
c) Change the SupplierID for bathhw-2 to BLUEBIRD
d) Save the database. Access has not prevented you from entering a name that is not in tblSuppliers.
At this point, there is no relationship between the supplier IDs in tblSuppliers and the supplier IDs in
tblInventory.
e) Select Undo to change the SupplierID for bathhw-2 from BLUEBIRD back to WOODSTOCK.
f) Save the database. Before you enforce perfect matching between the supplier IDs in both tables,
you must ensure that any values already entered are a match.

2. Establish a lookup relationship between frmInventory and tblSuppliers.


a) Right-click the frmInventory tab and select Design View.
b) Right-click the SupplierID text box and select Change To→Combo Box.
c) Observe the SupplierID combo box. Depending on the area your monitor displays, you may need to
scroll right to observe that a drop-down arrow has been added.
d) If the Property Sheet is not showing, then select DESIGN→Tools→Property Sheet to display it.

Lesson 2: Working with Table Data | Topic C


70 | Microsoft® Office Access® 2013: Part 1

e) In the Property Sheet, select the Data tab to show only properties related to data.

f) In the Property Sheet, select Row Source to display a drop-down list, and select tblSuppliers. The
SupplierID drop-down list will now be populated by the first column in tblSuppliers.
g) Save the database.

Lesson 2: Working with Table Data | Topic C


Microsoft® Office Access® 2013: Part 1 | 71

3. Test the lookup field.


a) Display frmInventory in Form View.
b) Select the drop-down arrow for SupplierID. The supplier list is shown.

c) Select HUBBARD. The value HUBBARD now appears in the SupplierID field. This feature will help
users select only the acceptable field values.
d) Save the database.

4. Test text entry into the SupplierID combo box.


a) In the SupplierID combo box, type BLUEBIRD
b) Save the database. Unfortunately, a combo box also permits text entry.

Note: The name "combo box" is used because it is a combination between a


list and a text box. You need to anticipate that users may enter values by
picking or by typing.
c) Undo your text entry to revert the value of SupplierID to HUBBARD.
d) Close frmInventory.

5. Establish a relationship between tblInventory and tblSuppliers.


a) Select DATABASE TOOLS→Relationships→Relationships.
b) Select tblInventory and select Add.
c) Select tblSuppliers and select Add.
d) Select Close. The tblInventory and tblSuppliers field lists are shown.
e) Drag the bottom edge of each field list to size so you can see all fields in both lists.

Lesson 2: Working with Table Data | Topic C


72 | Microsoft® Office Access® 2013: Part 1

f) Drag SupplierID from tblInventory onto SupplierID in tblSuppliers. The Edit Relationships dialog box
is shown.
g) Check Enforce Referential Integrity.
h) Select Create.

i) Observe that you established a relationship through the SupplierID fields in tblInventory and
tblSuppliers. Access now has a way to enforce the referential integrity between these two tables. In
other words, Access won't permit the user to enter a value in tblInventory's SupplierID field that
doesn't exist in tblSuppliers.

Lesson 2: Working with Table Data | Topic C


Microsoft® Office Access® 2013: Part 1 | 73

j) Select DESIGN→Close.
k) Select Yes to save the relationship layout changes you made.

6. Attempt to enter an invalid SupplierID with referential integrity enforced.


a) Display frmInventory.
b) Select the value in the SupplierID combo box and type BLUEBIRD to replace it.
c) Save the database.

Access now prevents you from entering a name that is not in tblSuppliers. A relationship now exists
between the SupplierID in tblSuppliers and SupplierID in tblInventory. Access enforces the
referential integrity of that relationship.
d) Select OK and press Esc to revert the record back to HUBBARD.
e) Close the database.
Have learners think
7. What is the benefit of establishing a lookup field? about and jot down their
A: A lookup field enables users to pick from a list of acceptable values. answers to the following
questions, and then
8. What is the benefit of establishing a table relationship and enforcing referential integrity? have volunteers share
their responses.
A: Referential integrity ensures that every value in one table is contained within the related field of
another table. This is important for keeping the table relationship useful as a means of connecting
the two tables.

Lesson 2: Working with Table Data | Topic C


74 | Microsoft® Office Access® 2013: Part 1

Summary
In this lesson, you learned how to add, delete, and update data in a table, including making mass
content updates through Access' Find and Replace feature. You learned how to temporarily sort
or filter a table to show only records that match certain criteria, and you created lookup fields, a first
step toward developing more advanced table relationships.
When might you use the Find dialog box instead of a query?
A: The Find dialog box is useful when you need to perform a quick search that you won't necessarily do
on a repetitive basis.

Why might a lookup field be beneficial?


A: In some cases, you want to discourage "creativity" in data entry, as it makes it harder to structure,
organize, and analyze data. A lookup field helps to guide users to enter values that are on an
approved list. Used in conjunction with an enforced table relationship, a lookup field can be helpful in
supporting referential integrity.

Note: Check your LogicalCHOICE Course screen for opportunities to interact with your
classmates, peers, and the larger LogicalCHOICE online community about the topics covered in
this course or other topics you are interested in. From the Course screen you can also access
available resources for a more continuous learning experience.

Encourage students to
use the social
networking tools
provided on the
LogicalCHOICE Home
screen to follow up with
their peers after the
course is completed for
further discussion and
resources to support
continued learning.

Lesson 2: Working with Table Data |


3 Querying a Database
Lesson Time: 1 hour

Lesson Objectives
In this lesson, you will use queries to join, sort, and filter data from different tables. You
will:
• Join data from different tables through a query.
• Sort and filter data through a query.
• Perform calculations through a query.

Lesson Introduction
You have created a database, populated tables, and made updates to database content. You
have searched, sorted, and filtered datasheets, and have configured fields to look up data in
other tables. As powerful as those features are, however, they are limited. They are
temporary and easily overwritten. In this lesson, you will see how queries enable you to
create reusable instructions that perform complex operations on dynamic table data
lightning fast and precisely the same way each time. Queries also provide the added benefit
of enabling you to join data from multiple tables on the fly.
76 | Microsoft® Office Access® 2013: Part 1

TOPIC A
Join Data from Different Tables in a Query
As you continue to work with Microsoft® Office Access® databases, you will appreciate how
important it is organize data within multiple related tables. Sometimes, however, you need to display
data from multiple tables in a single view. Joining data from multiple tables is one of the significant
tasks that you can accomplish using a query.

Query Object Views


Query Object Views The following table describes the views in Access for creating and using query objects.

View Use This View To

Datasheet Display the query result in a table.


SQL Write SQL query statements directly, or view the SQL statements that Access
has constructed based on query options you have selected.
Design Construct a query using visual tools.

The Simple Query Wizard


Simple Query Wizard The Simple Query Wizard prompts you through steps to create a query. Despite its name, you can use
this wizard to create fairly complex queries, joining data from multiple tables and other queries. As
you select each source table or query, the wizard presents a list of available fields, which you can
select to include in the new query.

Figure 3-1: The Simple Query Wizard.

Lesson 3: Querying a Database | Topic A


Microsoft® Office Access® 2013: Part 1 | 77

Types of Queries
The Query Wizard dialog box enables you to create various types of queries. Types of Queries

Query Type Description

Simple Creates a new query by enabling you to select fields from one or more
tables and queries.
Crosstab Creates a new crosstab query, which displays data grouped by category
in a way that may help in summarizing results or identifying patterns in
data.
Find duplicates Creates a new query that shows records from a table or query that have
duplicate field values.
Find unmatched Creates a new query that shows records in one table or query that have
no related records in another table or query. This can be useful in
finding unused records that can be deleted or archived.

The Run Command


Use the Run command to launch a query from the query Design view. Select
DESIGN→Results→Run to launch a query.
Note: Alternatively, you can run a query by double-clicking the query name in the navigation
pane.

Access the Checklist tile on your LogicalCHOICE course screen for reference
information and job aids on How to Create a Query by Using the Query Wizard

Lesson 3: Querying a Database | Topic A


78 | Microsoft® Office Access® 2013: Part 1

ACTIVITY 3-1
Creating a Query by Using the Query Wizard

Data Files
C:\091004Data\Querying a Database\Inventory Query 1.accdb

Scenario
You want to produce a view of your data that combines elements from the inventory and supplier
tables. You can do that with a query since the two tables already have an established relationship
through the SupplierID field.

1. From the C:\091004Data\Querying a Database folder, open the Inventory Query 1.accdb database. If a
security prompt is shown, select Enable Content.

2. Save the database in C:\091004Data\Querying a Database as My Inventory Query 1 and select Enable
Content if you are prompted.

3. Launch the Simple Query Wizard.


a) Select CREATE→Queries→Query Wizard.

b) In the New Query dialog box, verify that Simple Query Wizard is selected and select OK. You are
prompted to specify which fields will be included in the result of the query. Results can come from
more than one table.

4. Select the fields that will be displayed in the query results.


a) From the Tables/Queries drop-down list, select Table: tblInventory.
b) In the Available Fields list box, double-click ProductCode to move it to the Selected Fields list box.
c) Move the following additional fields to the Selected Fields list box.

Lesson 3: Querying a Database | Topic A


Microsoft® Office Access® 2013: Part 1 | 79

• UnitsInStock
• ReorderLevel
• SupplierID

d) From the Tables/Queries drop-down list, select Table: tblSuppliers.


e) Move the following additional fields to the Selected Fields list box.
• FirstName
• LastName
• ContactPhone
• ContactEmail
f) Select Next. You are prompted to choose between a detail or summary query.

5. Finish the query and view the results.


a) Observe that the Detail (shows every field of every record) option is selected, and select Next. You
are prompted to enter a title for the query.
b) Change the text in the What title do you want for your query text box to qryProductSupplierDetail
c) Observe that the Open the query to view information option is chosen, and select Finish. The query
results are shown.

Lesson 3: Querying a Database | Topic A


80 | Microsoft® Office Access® 2013: Part 1

d) Close qryProductSupplierDetail.

Query Design
Using Query Design to Use the Query Design feature to create a new query in Design view. Add tables and queries to the
Create a Query Design view to display field lists. Then add fields from the field lists to the query design grid. This
view also enables you to specify criteria, sorts, and summary data that will be included in the query.

Lesson 3: Querying a Database | Topic A


Microsoft® Office Access® 2013: Part 1 | 81

Figure 3-2: Using the Query Design feature to create a query.

When you are in the query's Design view, command groups under the DESIGN contextual tab
provide tools to enable you to create and modify queries.

Group Provides Tools To

Results Change the query view and execute a query.


Query Type Identify query types used to select, append, update, or delete records.
Create crosstab queries and use other advanced options.
Query Setup Insert and delete rows and columns, use the Expression Builder to build
expressions, and use various advanced query setup options.
Show/Hide Show or hide various query elements.

Access the Checklist tile on your LogicalCHOICE course screen for reference
information and job aids on How to Create a Query by Using Query Design

Lesson 3: Querying a Database | Topic A


82 | Microsoft® Office Access® 2013: Part 1

ACTIVITY 3-2
Creating a Query by Using Query Design

Before You Begin


The My Inventory Query 1 database is open. No objects are open in the document pane.

Scenario
You will create a query that gives you information you need to compile your weekly product orders.
You will start by building a query that joins two tables. Rather than use a query wizard, you will go
directly into Design view and create the query there.

1. Create a query.
a) Select CREATE→Queries→Query Design. The Show Table dialog box prompts you to select the
tables whose fields will be involved in this query.
b) In the Show Table dialog box, on the Tables tab, select tblInventory. Then hold down Ctrl and select
tblSuppliers. Both tables should be selected.

c) Select Add.
d) Select Close to close the dialog box.
e) Resize and move the field lists, if necessary, to see all of the fields. Close the Property Sheet if you
need more room.
f) Observe the table relationships shown in the Query1 Design view. The tblSuppliers and tblInventory
tables are related through SupplierID. The tblDepartments table is not related to the other tables.
g) In the tblInventory field list, double-click ProductCode to add it to the query design grid.

Lesson 3: Querying a Database | Topic A


Microsoft® Office Access® 2013: Part 1 | 83

h) Similarly, add the following fields to the query design grid.


• ItemDescription
• UnitsInStock
• ReorderLevel
• TargetInventory
• OurUnitCost
• SupplierID
i) Add the following fields from tblSuppliers to the query design grid.
• Company
• FirstName
• LastName
j) Save the database. You are prompted to provide a query name.
k) Type qryReorderNow and select OK.
l) Observe that qryReorderNow appears in the queries section of the navigation pane.

Lesson 3: Querying a Database | Topic A


84 | Microsoft® Office Access® 2013: Part 1

2. Run and save the query.


a) Select DESIGN→Results→Run to run the query. The query results show inventory data joined with
supplier data.
b) Observe the number of records in the results. The query results in 49 records.
c) Open the tblInventory table.
d) Observe the number of records in the tblInventory table. There are 49 records in tblInventory, so the
qryReorderNow query shows all the records in tblInventory. At this point, the query essentially just
creates a new view that displays all records in tblInventory, joining fields from tblSuppliers into that
view.

3. Close the tblInventory tab.

4. Save the database.

Lesson 3: Querying a Database | Topic A


Microsoft® Office Access® 2013: Part 1 | 85

TOPIC B
Sort and Filter Data in a Query
Access queries can sort and filter results that are displayed, saving you the extra step of sorting the
results manually.

Query Criteria
You can provide query criteria to specify which records should be included in a query result. You Query Criteria
provide query criteria by writing a mathematical or logical expression that produces a result. You can
include one or many criteria in a query.

Figure 3-3: Query criteria to list specific records.

Wildcards
You can use various wildcard characters in conjunction with query criteria. Wildcards enable you to
match records based on patterns, rather than requiring a literal character-by-character match.
Include them where you would provide a value. They can be substituted for literal values, as shown
in the following table.

Character Substitutes For

* Any number of characters. Can only appear at the


beginning or the end of the string.
? Any single alphabetical character. Can appear
anywhere in a string.
[] Any single character from those provided within
brackets.
[!] Any character other than those provided within
brackets.

Lesson 3: Querying a Database | Topic B


86 | Microsoft® Office Access® 2013: Part 1

Character Substitutes For


# Any single numeric character. Can appear anywhere in
a string.
[-] Any single character from within the range provided
in brackets.

Use the like operator within a query to search for records that contain values based on a search
pattern or wildcards. A wildcard represents a character or group of characters that will be allowed
for pattern matching.

Like Operator Examples


Here are some examples of the like operator:
• Like "W*": All values that start with W, such as Wilson, Woodworkers, and Wheelhouse.
• Like "*x*": All values that contain x, such oxygen, axe, and oxen.
• Like "*x": All values that end with x, such as Unix and Linux.
• Like "V[68]": Values of V6 or V8.
• Like "V[!68]": Values whose first character is V but whose second character is not 6 or 8, such
as V12 or V4.
• Like "s?n": All values that start with s, end with n, and are three characters in length, such as
sin, son, and sun.
• Like "V#": All values that start with V and are two characters in length where the second
character is a number, such as V8 and V6.

Comparison Operators
A Comparison Operator Comparison operators are used to compare two values and return a true or false result.

Figure 3-4: A comparison operator.

Comparison Operators
The following comparison operators are supported in Access for use in query comparisons.

Operator Description Example

= Equals value1 = value2


< Is Less Than value1 < value2

Lesson 3: Querying a Database | Topic B


Microsoft® Office Access® 2013: Part 1 | 87

Operator Description Example


<= Is Less Than or Equal value1 <= value 2
To
> Is Greater Than value1 > value2
>= Is Greater Than or value1 >= value2
Equal To
<> Is Not Equal To value1 <> value2
Between ... And Is Within a Range value1 Between value2
And value3
Is Null Has No Value value1 Is Null

Logical Operators
Logical operators evaluate the result of one or more logical conditions and return a value of either true Logical Operators
or false.

Figure 3-5: Logical operators.

Logical Operators
Access supports the following logical operators for use in query comparisons.

Operator Description Example

AND True if both conditions are Condition1 AND Condition2


true
OR True if either condition is true Condition1 OR Condition2
NOT True if the condition is not NOT Condition1
true

Records Sorting
In a large table, it may be difficult to work with records if they are not displayed in a useful order.
The default sort order returned from a table may not be the most useful order in which to return
values. Fortunately, one of the tasks a query can perform is sorting query results. Fields can be

Lesson 3: Querying a Database | Topic B


88 | Microsoft® Office Access® 2013: Part 1

sorted in ascending or descending order. An Access query can sort records based on multiple fields.
This is called a multi-level sort. You apply a sort to multiple columns, and Access applies the sorts in
order, essentially performing the sorts working from right to left. So, the sort column farthest to the
left is the primary sort. If there are multiple items in that column with the same value, that group
will be sub-sorted by the next sort column to the right.

Access the Checklist tile on your LogicalCHOICE course screen for reference
information and job aids on How to Sort and Filter Table Data in a Query

Lesson 3: Querying a Database | Topic B


Microsoft® Office Access® 2013: Part 1 | 89

ACTIVITY 3-3
Filtering a Query Using a Comparison Operator

Before You Begin


The My Inventory Query 1 database is open. The results of qryReorderNow are shown in a
datasheet.

Scenario
You want to continue working on the query that will produce your weekly product order. You will
filter the query to show all products where your inventory level is low.

1. Observe that there are 49 records in the result. All inventory items are shown in the current result.
Give learners time to
2. Which fields would enable you to determine which items need to be reordered? consider and discuss
A: UnitsInStock could be compared to ReorderLevel. If UnitsInStock is less than or equal to this question. Those
ReorderLevel, then it's time to place an order. participating through
web conferencing can
3. Modify qryReorderNow to show only those items that currently need to be reordered from the supplier. post responses in the
class chat/messaging
a) Open qryReorderNow in Design view. system.
b) As needed, adjust the size and location of the field lists and move the split bar so the query design
grid is showing and field lists display all of the fields.

c) In the query design grid, click in the Criteria row of the UnitsInStock field, and type <= re

Lesson 3: Querying a Database | Topic B


90 | Microsoft® Office Access® 2013: Part 1

Note: As you type, Access will provide a pop-up menu showing suggested
values. ReorderLevel is one of the values shown.
d) Double-click ReorderLevel. Access completes the criteria statement for you, enclosing the
ReorderLevel field name within brackets.
e) Save and run the query.
f) Observe the query results. The results have been filtered down to 27 records that match the criteria
of UnitsInStock <= ReorderLevel. For each of the matching records, observe that the UnitsInStock
value is less than or equal to the ReorderLevel.
Point out that you can g) Close the qryReorderNow query.
run this query anytime to
show which products
currently need to be
reordered. A query like
this can automate tasks
that might take much
more time if done
manually.

Lesson 3: Querying a Database | Topic B


Microsoft® Office Access® 2013: Part 1 | 91

ACTIVITY 3-4
Filtering a Query Using a Wildcard

Before You Begin


The My Inventory Query 1 database is open. No objects are open in the document pane.

Scenario
Because prices for wood vary with the market, you decide you need a way to quickly view the prices
for your woodworkers' project packs. These are packages of different varieties of wood that are
small enough to ship inexpensively through the mail, but large enough to contain enough wood for
a small woodworking project. Because you have consistently named all of your project packs with
the pak- prefix, you decide you could use this as a query filter.
The qryReorderNow query already contains the fields you want to work with. You just need to have
a different filter criterion to view product codes that begin with pak-. So you will modify a copy of
qryReorderNow to create your new query.

1. Create a copy of qryReorderNow and remove its filter criterion.


a) In the navigation pane, in the Queries section, select qryReorderNow.
b) Select HOME→Clipboard→Copy.
c) Select HOME→Clipboard→Paste. You are prompted to name the query you are pasting.
d) In the Query Name text box, type qryProjectPacks and select OK. The query appears in the
navigation pane.
e) Open qryProjectPacks and display it in Design view.
f) In the query design grid, select and delete the criterion for UnitsInStock.

2. Modify the qryProjectPacks query to show products with a ProductCode that begins with pak-.
a) In the query design grid, click in the Criteria row of the ProductCode field, and type like pak-*
b) Press Enter.

Access corrects your entry, capitalizing the like operator and enclosing pak-* within quotation marks.
c) Run qryProjectPacks and observe the results. Ask for examples of real-
world data that learners
work with that follow a
pattern that could be
filtered with wildcards.
Provide phone numbers
(filter by area code or
exchange) as an
example.

Lesson 3: Querying a Database | Topic B


92 | Microsoft® Office Access® 2013: Part 1

11 project pack records are shown.


d) Save the database and close the qryProjectPacks query.

The Zoom Dialog Box


Zoom Dialog Box Use the Zoom dialog box to view and edit expressions that are too long to view completely within
the query design grid. Display an expression in the Zoom dialog box by right-clicking the field and
selecting Zoom.

Figure 3-6: The Zoom dialog box.

Lesson 3: Querying a Database | Topic B


Microsoft® Office Access® 2013: Part 1 | 93

ACTIVITY 3-5
Filtering a Query Using a Date Range

Before You Begin


The My Inventory Query 1 database is open. No objects are open in the document pane.

Scenario
When you place an order, you indicate the last order date in the record for each product ordered.
This enables you to monitor how frequently you can order certain products. You decide it would be
helpful to have a query that pulls up a list of products last ordered within a certain date range. You
will make a copy of qryReorderNow and use it as the basis for this new query.

1. Create a copy of qryReorderNow, naming it qryReorderDate

2. In qryReorderDate, create a query condition to show the last order date for each product.
a) Open qryReorderDate in Design view.
b) Remove the filter criterion in the UnitsInStock column.
c) Observe the columns in the query design grid, scrolling horizontally as needed. The LastOrdered
column is not present in the query design.
d) In the tblInventory field list, double-click LastOrdered. The column is appended to the right of the
other columns.

Note: Depending on where you had previously scrolled the query design grid,
you may need to scroll right to see the new LastOrdered column.

3. Rearrange the LastOrdered field to appear between ItemDescription and UnitsInStock.


a) Select the top border of the LastOrdered column to select the column.
b) Drag the top border of the LastOrdered column to the left and release when it is positioned between
ItemDescription and UnitsInStock. As you move to the left, the grid automatically scrolls in the same
direction.

4. Add a filter to show only items last ordered during the month of May 2012.
a) In the query design grid, click in the Criteria row of the LastOrdered field, and type between 5/1/2012
and 5/31/2012

Lesson 3: Querying a Database | Topic B


94 | Microsoft® Office Access® 2013: Part 1

b) Press Enter. You probably cannot see the entire criterion you entered within the narrow field.
c) Right-click the criterion you just entered, and select Zoom to see the entire expression. Access
reformatted what you entered to Between #5/1/2012# And #5/31/2012#

Note: Depending on how dates are configured on your system, your date
format may be slightly different from what is shown here.
d) Select OK to close the Zoom dialog box.
e) Run the query and observe the results. Thirty-two products were ordered in May 2012. The products
are not sorted by date.
Point out that this
example of a date query 5. Modify qryReorderDate to sort by LastOrdered date.
is not as convenient as it a) Display qryReorderDate in Design view.
might be, since the b) In the query design grid, in the LastOrdered column, click in the Sort row to display a drop-down
dates would have to be arrow.
updated to view the next
c) Select the drop-down arrow to display a list of sort options.
month's orders. If you
intend to cover the d) Select Ascending.
lesson on Creating
Flexible Queries, you 6. Run the query and observe the results. The products are now sorted by LastOrdered date.
might mention to
learners that later you 7. Save the database.
will show them how to
prompt for the date 8. Close qryReorderDate and any other tabs that you may have open.
range when the query is
run, rather than using a
hard-coded date such as
this one.

Lesson 3: Querying a Database | Topic B


Microsoft® Office Access® 2013: Part 1 | 95

TOPIC C
Perform Calculations in a Query
At times, you may need to perform calculations based on dynamic values in your database. For
example, as customers purchase products from your store, you would like to update the inventory
count and determine whether the inventory is low enough to warrant a resupply of stock. By adding
a calculated field that checks the difference between inventory and a reorder level, you can trigger a
new order when inventory dips below the reorder level. Access can calculate values based on one or
more fields and display the result in the query output.

Arithmetic Operators
Arithmetic operators perform mathematical calculations on values, returning a numeric result.
The following arithmetic operators are supported in Access.

Operator Description Example

+ Adds two values. 10 + 2 returns 12


- Subtracts the second value from 10 - 2 returns 8
the first value.
* Multiplies two values. 10 * 2 returns 20
/ Divides the first value by the 10 / 2 returns 5
second value.
^ Multiplies the first value 10 ^ 2 returns 100
exponentially by the second value.

Access the Checklist tile on your LogicalCHOICE course screen for reference
information and job aids on How to Perform Calculations

Lesson 3: Querying a Database | Topic C


96 | Microsoft® Office Access® 2013: Part 1

ACTIVITY 3-6
Performing Calculations in a Query

Before You Begin


The My Inventory Query 1 database is open. No objects are open in the document pane.

Scenario
You have developed a query to provide you with a list of products that need to be ordered because
your inventory on those products is low. Now you want to calculate the total price of the order.
You'll need to calculate how many of each item you need to order. Then you'll calculate the total
cost. You'll program the query to do this for you.

1. Determine how to calculate order amounts for each item.


a) Open qryReorderNow in Design view.
b) Observe the design of the query. This query joins data from tblInventory and tblSuppliers. It filters to
show only those records where UnitsInStock is less than or equal to ReorderLevel.
c) Run the query and observe the results. Only items that need to be reordered are listed.
Give learners time to
consider and discuss 2. How might you determine how many of each item you need to order?
this question. Be sure to A: The UnitsInStock field shows how many items are currently in stock. The ReorderLevel field
provide opportunity for shows how few items should be in stock to trigger reordering. The TargetInventory field shows the
remote learners to number of items you should have in stock after replenishing your supply. Subtract UnitsInStock
respond. from TargetInventory to produce the replenish amount.

3. Add a column to show the order quantity for each item.


a) Display qryReorderNow in Design view.
b) In the query design grid, in the Field row, right-click in the blank cell after the LastName column.

c) Select Build to open the Expression Builder.

Lesson 3: Querying a Database | Topic C


Microsoft® Office Access® 2013: Part 1 | 97

d) In the Expression Elements list box, select qryReorderNow. The Expression Categories list box lists
fields and other expression categories that are available in the query you selected.
e) In the Expression Categories list box, double-click TargetInventory to add it to the Expression text
box, and observe that it is enclosed in brackets. As you can see, you can use the lists at the bottom
of the Expression Builder to help you add various elements to your expression.
f) Type - to add the minus operator to your expression. You could have selected it from the Operators
list under Expression Elements, but in this case, it was easier to just type it. When using the
Expression Builder, you can edit the expression directly as well as pick elements from the lists.
g) Type units and press Enter. Access determined the next thing you would type based on what you
already typed, and filled in the remainder of the expression value for you when you pressed Enter.

Lesson 3: Querying a Database | Topic C


98 | Microsoft® Office Access® 2013: Part 1

h) Select OK to close the Expression Builder dialog box.


i) Save the database and run the query.
j) Observe the results. The calculated field appears on the far right, and is named Expr1. It shows the
number of items that need to be ordered to replenish each item to target inventory levels.

4. Rename the calculated field and position it between TargetInventory and OurUnitCost.
a) Switch qryReorderNow to Design view.
b) Right-click the Expr1 field title and select Zoom. The Zoom dialog box shows the field title in a larger
text box for easy editing. Since you didn't provide a name for the calculated field, Access provided
one for you. You can change it to something more meaningful.
c) Change Expr1 to OrderQty

Lesson 3: Querying a Database | Topic C


Microsoft® Office Access® 2013: Part 1 | 99

Note: There is no existing table field by this name. You are creating a
temporary calculated field "on the fly."
d) Select OK to close the Zoom dialog box.
e) Observe the location of the OrderQty calculated field. You will move it between TargetInventory and
OurUnitCost.
f) Select the top border of the OrderQty column to select the column.
g) Drag the top border of the OrderQty column to the left and release when you have moved the
column between TargetInventory and OurUnitCost. The query grid will automatically scroll as you
drag to the left.

Lesson 3: Querying a Database | Topic C


100 | Microsoft® Office Access® 2013: Part 1

h) Save the database and run the query.

5. Add a new calculated field that will multiply OrderQty by OurUnitCost to determine the cost of the order
for that item. Name the field OrderCost and place it between OurUnitCost and SupplierID.

6. Save the database and test the query. Close the database when finished.

Lesson 3: Querying a Database | Topic C


Microsoft® Office Access® 2013: Part 1 | 101

Summary
In this lesson, you learned to use queries to create reusable instructions to perform complex
operations on dynamic table data, including joining data from multiple tables, sorting and filtering,
and performing calculations.
When building a query, are you more likely to use the Query Wizard or to create the query directly in
Design view?
A: Answers will vary, but may include: The Query Wizard helps to walk you step-by-step through the
basic options involved in building a query. The Design view doesn't provide such prompting, but offers
more options for complex queries. You can also combine approaches, using the Query Wizard to start
designing the query, then adding finishing touches in the Design view.

What are the benefits of using the Expression Builder?


A: The Expression Builder provides a "palette" of elements you can use to construct an expression. It can
help you explore functions, operators, and other elements that you may not be familiar with. It also
provides a convenient way to pick fields from queries and tables. Finally, it provides a larger
expression editing area than the query grid.

Note: Check your LogicalCHOICE Course screen for opportunities to interact with your
classmates, peers, and the larger LogicalCHOICE online community about the topics covered in
this course or other topics you are interested in. From the Course screen you can also access
available resources for a more continuous learning experience.

Encourage students to
Note: To learn more about queries, refer to the LearnTO View SQL, the Language Behind use the social
the Query presentation from the LearnTO tile on the LogicalCHOICE Course screen. networking tools
provided on the
LogicalCHOICE Home
screen to follow up with
their peers after the
course is completed for
further discussion and
resources to support
continued learning.
You may want to show
LearnTO View SQL, the
Language Behind the
Query from the
LogicalCHOICE Course
screen or have students
navigate out to the
Course screen and
watch it themselves as a
supplement to your
instruction. If not, please
remind students to visit
the LearnTOs for this
course on their
LogicalCHOICE Course
screen after class for
supplemental
information and
additional resources.

Lesson 3: Querying a Database |


4 Creating Advanced
Queries
Lesson Time: 50 minutes

Lesson Objectives
In this lesson, you will create advanced queries, including action queries and parameter
queries. You will:
• Create a parameter query.
• Create an action query.
• Create an unmatched or duplicate query.
• Create a crosstab query.

Lesson Introduction
One benefit of queries is that they make complex data management tasks repeatable. As
your database content changes over time, you can rely on saved queries to perform the same
set of operations on your data each time you run them. But suppose your needs change
slightly each time you run a query. One time you might want to see products from Vendor
A, and another time those from Vendor B. In this lesson, you will create flexible queries
that you can instantly tailor to your needs at the moment.
Up to this point, you may have believed that queries are passive. You run the query, and it
shows you a temporary view of results without actually changing the content stored in the
database. Some queries work this way. But in this lesson, you will create queries that
perform an action, such as deleting or modifying matching records. Such action queries can
be a powerful tool for making mass updates to a database.
Finally, you will see how a crosstab query can help to reveal patterns within data that might
not be evident in a normal query.
104 | Microsoft® Office Access® 2013: Part 1

TOPIC A
Create Parameter Queries
You may often find it necessary to make data retrieval interactive so that data is retrieved to meet
the specific needs of users. In this topic, you will retrieve records based on input criteria. In some
cases, it would be valuable if you could select records by entering values to serve as a criteria at
runtime. For example, users may need to retrieve all records that contain information pertaining to
particular states in the United States. One possible way of recovering such information is by creating
a separate query for each of the 50 states; however, a better approach would be to create one query
that will ask users for the state in which they are interested. Doing this will save you development
time and let you create a more concise database.

Parameter Queries
A Parameter Query Parameter queries prompt the user for additional criteria before executing the query. This provides
Displays a Prompt queries with greater flexibility and gives the user more control over the results. Parameter queries
can prompt for multiple criteria, providing a separate prompt for each criterion. Access can display
up to 50 characters in the prompt message. Characters such as periods, exclamation marks, and
square brackets are not permitted with a prompt, since these characters have special meaning in
queries. The prompt message should not match the field name.

Figure 4-1: A prompt from a parameter query.

Lesson 4: Creating Advanced Queries | Topic A


Microsoft® Office Access® 2013: Part 1 | 105

Matching a Parameter Query


When you use a parameter query alone as a criterion, the search would be case-insensitive, but
spelling must match exactly. With a query criterion of [Enter the Supplier ID], the "Enter the
Supplier ID" prompt is displayed.
Suppose the user enters "ogg" in the input box. In this example:
• Ogg would be a match.
• ogg would be a match.
• ogg-32 would not be a match.
• Froggy-12 would not be a match.

Wildcards in a Parameter Query


A wildcard is a special character that is a substitute for a single character or string of text. You can
use an asterisk (*) wildcard to look for a range of different possible values, or when you are not
certain what specifically you are looking for.
Consider the following example:
Like "*ogg"
With this example:
• Ogg would be a match.
• 64-ogg would be a match.
• Froggy-12 would not be a match.

The Ampersand Operator


Use the ampersand (&) operator to join two character strings. The ampersand operator can be used
in combination with the asterisk (*) wildcard to link more data to criteria the user specifies as part of
a parameter query. For example, the following query criterion will prompt the user for a text value,
and will find all records that have the text value anywhere within the target field. Without the
wildcards appended to either side of the parameter value, only exact matches would be found.
Consider the following example:
Like "*" & [Enter the Supplier ID] & "*"
With this example, suppose the user enters "ogg" when the "Enter the Supplier ID" prompt is
displayed.
• Ogg would be a match.
• Froggy-12 would be a match.
• 64-ogg would be a match.

Access the Checklist tile on your LogicalCHOICE course screen for reference
information and job aids on How to Create and Run a Parameter Query

Lesson 4: Creating Advanced Queries | Topic A


106 | Microsoft® Office Access® 2013: Part 1

ACTIVITY 4-1
Creating a Parameter Query

Data Files
C:\091004Data\Creating Advanced Queries\Inventory Query 2.accdb

Scenario
You would like to be able to pull up a datasheet showing supplier IDs that match search text that
you enter when you run the query. You will use a parameter query to accomplish this.

1. Open the Inventory Query 2 database. If a security prompt is shown, select Enable Content.

2. Save the database in C:\091004Data\Creating Advanced Queries as My Inventory Query 2 and select
Enable Content if you are prompted.

3. Create a new query to show an inventory list.


a) Select CREATE→Queries→Query Design.
b) Select tblInventory and select Add.
c) Select Close.
d) Double-click each of the following fields to add them from tblInventory into the query design grid.
The fields will be arranged from left to right in the order that you add them.
• ProductCode
• Dept
• SupplierID
• ItemDescription
• UnitsInStock
• Location
• Rack
• LastOrdered

4. Add a criterion prompt in the SupplierID column.


a) In the query design grid, in the SupplierID column, click in the Criteria row and type [Enter the
Supplier ID]
b) Save the database. You are prompted to save the new query.
c) Name the query qryFindSupplier and select OK.

5. Run the query and enter the SupplierID criterion.


a) Run the query.
b) You are prompted to enter a SupplierID. Type woodstock and select OK.
c) Observe the resulting records. All of the products for WOODSTOCK are shown. It does not matter
that you entered the criterion in lowercase.

6. Run the query again with a different criterion.


a) Select HOME→Records→Refresh All. You are prompted to enter a new supplier ID.
b) Type wood and select OK.

Lesson 4: Creating Advanced Queries | Topic A


Microsoft® Office Access® 2013: Part 1 | 107

c) Observe that there are no matching records. Partial text is not matched with your current query. You
need to use wildcards to provide that sort of flexibility in the search parameter.

Access the Checklist tile on your LogicalCHOICE course screen for reference
information and job aids on How to Use Wildcards within a Query

Lesson 4: Creating Advanced Queries | Topic A


108 | Microsoft® Office Access® 2013: Part 1

ACTIVITY 4-2
Using Wildcards in a Parameter Query

Before You Begin


The My Inventory Query 2 database is open, and qryFindSupplier is displayed in Datasheet view.

Scenario
You will modify the existing qryFindSupplier query so partial string matches will be included in the
query result.

1. Examine qryFindSupplier in Design view.


a) Display qryFindSupplier in Design view.
b) Observe the criterion for SupplierID. Currently, the query will find exactly the text that the user
enters. If the user enters a partial SupplierID, the records will not be found.

2. Add a wildcard to the query to find the text anywhere within the field.
a) Right-click the criterion for SupplierID and select Zoom.
b) Change the criterion for SupplierID to Like "*" & [Enter the Supplier ID] & "*" and select OK.

c) Save and run the query.


d) In the SupplierID field, type wood and select OK.
e) Observe the results. Products supplied by WOODSTOCK are listed.
f) Select HOME→Records→Refresh All.
g) In the SupplierID field, type k and select OK.
h) Observe the results. Records containing a k anywhere in the SupplierID are shown.

3. Save the database and close qryFindSupplier.

Lesson 4: Creating Advanced Queries | Topic A


Microsoft® Office Access® 2013: Part 1 | 109

ACTIVITY 4-3
Creating a Query with Multiple Parameters

Before You Begin


The My Inventory Query 2 database is open, and no objects are currently open in the documents
pane.

Scenario
You currently have a query that searches a range between two dates. The dates are hard-coded in the
query. You will modify the query to prompt for the date range at the moment the query is run. This
means you will need to create a parameter query with two prompts: the start date and the end date.

1. Change the qryReorderDate query to prompt for a date range.


a) Open and run the qryReorderDate query and observe the results. Only items that were last ordered
in May 2012 are listed.
b) Display qryReorderDate in Design view.
c) Right-click the criterion for LastOrdered and select Zoom.
d) Observe the query design. The query is hard-coded to a specified date range.
e) Change the criterion for the LastOrdered field to Between [Enter Start Date] And [Enter End Date]
f) Select OK.
g) Save the database and run the query. The first prompt is shown.

h) Type 6/1/2012 and select OK. The second prompt is shown.

i) Type 6/30/2012 and select OK.


j) Observe the results. Items ordered in June 2012 are shown.

2. Close all open tabs.

Lesson 4: Creating Advanced Queries | Topic A


110 | Microsoft® Office Access® 2013: Part 1

TOPIC B
Create Action Queries
Typically, the changes you make to a database are small—one record at a time. Sometimes, however,
you may need to make a mass update to multiple records based on a pattern. For example, you
might choose to increase prices for all products within a certain product line. An action query can
automate such tasks for you.

Action Queries
The simplest form of a query is sometimes called a select query, in contrast to an action query, which
enables you to move, append, update, or delete matching records within a table. Whereas a select
query is oriented toward displaying data, an action query is oriented toward updating data. Action
queries can be useful for making data modifications on a large scale. Because an action query cannot
be undone, you should back up your database or affected tables before you run an action query so
you can restore the data if you are not satisfied with the results. Note that you can preview matching
records in Design view before executing an action query to see which records will be affected
before you actually commit the change.

Types of Action Queries


The following table lists the types of action queries.

Action Type Description

Append query Adds records to a table.


Update query Changes field values in a table.
Delete query Deletes records that match criteria.
Make table query Creates a new table to contain the query result.

Lesson 4: Creating Advanced Queries | Topic B


Microsoft® Office Access® 2013: Part 1 | 111

Action Query Update


Update Query Example Expression

Figure 4-2: An action query update expression.

The example shows an expression that would be entered in an update query. When you change the
query type from a normal select query to an update query, a new row, Update To, is added in the
query design grid. The expression you enter into this row calculates a result. When the update query
runs, the result of that calculation becomes the new value for the field in which the Update To
expression was placed.

Access the Checklist tile on your LogicalCHOICE course screen for reference
information and job aids on How to Create Action Queries

Lesson 4: Creating Advanced Queries | Topic B


112 | Microsoft® Office Access® 2013: Part 1

ACTIVITY 4-4
Creating Action Queries

Before You Begin


The My Inventory Query 2 database is open, and no objects are currently open in the documents
pane.

Scenario
Rather than individually update the prices of your woodworker project packs, you have decided to
create an action query that will find any product with a ProductCode that begins with pak- and
adjust its price by a factor that you enter when you run the query. So it will be a parameter query (to
display a prompt for a price adjustment), and because it will make a modification to existing records,
it will also be an action query.
Because you cannot undo an action query, you will first back up the table you are going to modify.
And because qryProjectPacks already filters to show just the records with a ProductCode of pak-,
you will use a copy of that query to create your action query.

1. Create a backup copy of tblInventory.


a) In the Tables section of the navigation pane, select (but do not open) tblInventory.
b) Select HOME→Clipboard→Copy.
c) Select HOME→Clipboard→Paste. You are prompted to name the new table you are pasting.
d) Change Copy Of tblInventory to tblOldInventoryBackup and select OK. You will copy both the table
structure and data so you have a complete backup.

2. Create a new query based on qryProjectPacks.


a) In the Queries section of the navigation pane, select the qryProjectPacks query.
b) Select HOME→Clipboard→Copy.
c) Select HOME→Clipboard→Paste. You are prompted to name the new query.
d) Change Copy Of qryProjectPacks to qryProjectPackPricer and select OK.
e) Run the qryProjectPackPricer query and observe the results. Like the qryProjectPacks query from
which it was copied, at this point, the only thing the query does is filter the inventory records to show
only project packs.

Lesson 4: Creating Advanced Queries | Topic B


Microsoft® Office Access® 2013: Part 1 | 113

f) Note the current prices of the project packs. You can verify later that your price updater is working
correctly by comparing against these prices.
g) Display qryProjectPackPricer in Design view.

3. Change the select query to an update query.


a) Select DESIGN→Query Type→Update.
b) Observe that the Select icon is no longer selected within the DESIGN→Query Type ribbon group.
Update is now selected, and the Update To row has been added to the query design grid.
c) In the query design grid, in the RetailPrice column, in the Update To row, type [RetailPrice]*[Adjust
project pack prices by what factor]

Note: You may find it helpful to right-click the Update To cell in the RetailPrice
column and select Zoom before you enter the expression.
d) Observe the expression you just entered. It prompts for a price update factor, which it multiplies by
the current retail price to produce a new price. If the Zoom dialog box is open, select OK.
e) Save the database and run the query. You are prompted to enter the price update factor.
f) Type 1.02 and select OK. You will raise prices by 2 percent (1.02 times the current price).

Caution: The Undo command is unable to reverse an action query, which is


why you created a backup table earlier.
g) Select Yes.
h) Run the qryProjectPacks query to view all project packs.

i) Observe the updated prices of the project packs.

4. Save the database.

5. Close qryProjectPacks and qryProjectPackPricer.

Lesson 4: Creating Advanced Queries | Topic B


114 | Microsoft® Office Access® 2013: Part 1

TOPIC C
Create Unmatched and Duplicate Queries
Part of the process of managing a database is simply keeping the database clean and efficient. In a
large database, it is easy to end up with orphaned records over time—table entries that are no longer
used or needed anywhere but are still in the database. Similarly, it is possible to end up with
duplicated records. For example, you might have two different product codes (and separate records)
representing the same product. There are two types of action queries—unmatched and duplicate—
that can help you automate the process of finding and correcting such problems.

The Find Unmatched Query Wizard


The Find Unmatched Query Wizard finds records in a table or query that have no related records
in another table or query. This can help you find unused records that can be deleted or archived.

The Find Duplicates Query Wizard


The Find Duplicates Query Wizard enables you to find records that have duplicate field values
within a table or query. This can help you find records that have been inadvertently duplicated.

Access the Checklist tile on your LogicalCHOICE course screen for reference
information and job aids on How to Create Unmatched and Duplicate Queries

Lesson 4: Creating Advanced Queries | Topic C


Microsoft® Office Access® 2013: Part 1 | 115

ACTIVITY 4-5
Creating Queries to Search for Unmatched and
Duplicate Records

Before You Begin


The My Inventory Query 2 database is open, and no objects are currently open in the documents
pane.

Scenario
You have some suppliers from whom you stopped purchasing products a while ago. You want to
prune down the records in tblSuppliers by removing any suppliers that have no products listed in
tblInventory.
You also suspect you have some duplicate records for products in your inventory table. You will use
a query to eliminate the extra entries.

1. Create a query to find suppliers in tblSuppliers that are not referenced in tblInventory.
a) Select CREATE→Queries→Query Wizard to open the New Query dialog box.
b) In the New Query dialog box, select Find Unmatched Query Wizard and select OK.
c) Select Table: tblSuppliers. Verify the View Tables option is selected.

d) Select Next.
e) Select Table: tblInventory.

Lesson 4: Creating Advanced Queries | Topic C


116 | Microsoft® Office Access® 2013: Part 1

f) Select Next.
g) Observe that the SupplierID field is already matched as the default, so you do not need to change
anything.

h) Select Next.
i) Select the >> button to show all fields in the query results.

Lesson 4: Creating Advanced Queries | Topic C


Microsoft® Office Access® 2013: Part 1 | 117

j) Select Next.
k) Change tblSuppliers Without Matching tblInventory to qryUnusedSuppliers and verify that the View
the results option is selected.

l) Select Finish.
m) Observe the seven vendors are not currently associated with products in tblInventory. You won't do
so now, but if you wanted to, at this point you could delete some or all of these records.
n) Close the qryUnusedSuppliers query.

Lesson 4: Creating Advanced Queries | Topic C


118 | Microsoft® Office Access® 2013: Part 1

2. Create a query to find products that have multiple entries in tblInventory.


a) Select CREATE→Queries→Query Wizard to open the New Query dialog box.
b) In the New Query dialog box, select Find Duplicates Query Wizard and select OK.
c) Select Table: tblInventory.

d) Select Next.
e) Select ItemDescription and select the > button. You will look for records that have duplicate
information in the ItemDescription field.

Lesson 4: Creating Advanced Queries | Topic C


Microsoft® Office Access® 2013: Part 1 | 119

f) Select Next.
g) Select the >> button to show all fields in the query results.

h) Select Next.
i) Change Find duplicates for tblInventory to qryDuplicateProducts

j) Select Finish.

Lesson 4: Creating Advanced Queries | Topic C


120 | Microsoft® Office Access® 2013: Part 1

k) Observe the three duplicates. The hinge-15 and hinge-25 records are extras. The hinge-12 record is
the only one you want to keep.
l) Delete the records for hinge-15 and hinge-25. When you are prompted to confirm deletion, select
Yes.
m) Close qryDuplicateProducts.

Lesson 4: Creating Advanced Queries | Topic C


Microsoft® Office Access® 2013: Part 1 | 121

TOPIC D
Summarize Data
Crosstab queries display data in a way that may provide insights that are not readily apparent
through a normal query.

Crosstab Queries
A crosstab query displays data grouped by category to summarize results or reveal patterns in
categories of data. Unlike a select query, which lists values below the field name, a crosstab query
displays the values of a field as a row heading, column heading, or in the cell intersection of the row
and column. The name "crosstab" derives from "cross tabulation," and refers to the way values are
distributed across the table, with categories labeled along the left and top. Values are placed where
the column and row of the two category values intersect.

Access the Checklist tile on your LogicalCHOICE course screen for reference
information and job aids on How to Summarize Data

Lesson 4: Creating Advanced Queries | Topic D


122 | Microsoft® Office Access® 2013: Part 1

ACTIVITY 4-6
Creating a Crosstab Query

Before You Begin


The My Inventory Query 2 database is open, and no objects are currently open in the documents
pane.

Scenario
You would like to analyze products from your various suppliers to get a sense of where their
products are manufactured. You will create a crosstab query as shown here, with suppliers listed
along the left side of the table, the countries of origin listed along the top of the table, and product
counts in each cell intersection.
Analyzing Country of
Origin

Create a crosstab query.


a) Select CREATE→Queries→Query Design.
b) Select tblInventory and select Add.
c) Select Close.
d) Double-click the following fields to add them to the query design grid.
• Origin
• SupplierID
• ProductCode
e) Save the database and name the query qryOrigin when you are prompted.
f) Select DESIGN→Query Type→Crosstab.
g) Observe that there is now a Crosstab row in the query design grid.

Lesson 4: Creating Advanced Queries | Topic D


Microsoft® Office Access® 2013: Part 1 | 123

h) In the query design grid, click in the Crosstab row of the Origin field, and then from the drop-down
list, select Column Heading.

i) In the query design grid, click in the Crosstab row of the SupplierID field, and then from the drop-
down list, select Row Heading.
j) In the query design grid, click in the Crosstab row of the ProductCode field, and then from the drop-
down list, select Value.
k) In the query design grid, in the Total row of the ProductCode field, in the drop-down list, select
Count.
l) Save and run the qryOrigin query.
m) Observe the details shown in the query results. The number of each product that matches the row
and column criteria is listed. For example, at the intersection of KER and Canada there are three
products. This is the number of Canadian products purchased from the KER supplier.
n) Save and then close the database.

Lesson 4: Creating Advanced Queries | Topic D


124 | Microsoft® Office Access® 2013: Part 1

Summary
In this lesson, you learned how to create a parameter query to prompt the user for an input
parameter when a query runs. You then constructed an action query to make a mass update to table
values. You also created a crosstab query.
What is the primary benefit of a crosstab query?
A: Answers may vary, but a major benefit of a crosstab query is that it provides a view that can be helpful
to analyze patterns of categorical data.

When would you use an action query?


A: Answers will vary, but the major benefit of an action query is making data modifications on a large
scale. Because an action query cannot be undone, you should back up your database or affected
tables before you run an action query so you can restore the data if you are not satisfied with the
results.

Note: To learn more about writing query expressions, refer to the LearnTO Manipulate Text
Results in a Query presentation from the LearnTO tile on the LogicalCHOICE Course
screen.

You may want to show


LearnTO Manipulate Note: Check your LogicalCHOICE Course screen for opportunities to interact with your
Text Results in a Query classmates, peers, and the larger LogicalCHOICE online community about the topics covered in
from the LogicalCHOICE this course or other topics you are interested in. From the Course screen you can also access
Course screen or have available resources for a more continuous learning experience.
students navigate out to
the Course screen and
watch it themselves as a
supplement to your
instruction. If not, please
remind students to visit
the LearnTOs for this
course on their
LogicalCHOICE Course
screen after class for
supplemental
information and
additional resources.
Encourage students to
use the social
networking tools
provided on the
LogicalCHOICE Home
screen to follow up with
their peers after the
course is completed for
further discussion and
resources to support
continued learning.

Lesson 4: Creating Advanced Queries |


5 Generating Reports
Lesson Time: 1 hour, 10 minutes

Lesson Objectives
In this lesson, you will create and format custom reports. You will:
• Create a report.
• Add a control to a report.
• Apply themes, fonts, and layout options to a report.
• Prepare a report to be printed.

Lesson Introduction
You created a database and have managed its content using a variety of tools provided by
Microsoft® Office Access® 2013. For many, the ultimate reason to collect and organize data
is to produce a report. In this lesson, you will create a report, add controls and change the
report's layout, apply themes and layout options, and prepare a report to be printed.
126 | Microsoft® Office Access® 2013: Part 1

TOPIC A
Create a Report
As your database starts to accumulate useful information, you may want to produce reports that you
can use for analysis and subsequent publishing to print or digital form.

Report Creation Tools


Report Creation Tools You can create a report based on data in tables or from queries. Access 2013 includes a number of
tools that help you create reports.

Tool Description Use When

Report Create a report that includes all the You would like to start with all fields
fields in a table or query. The report will from a certain table or query, then
be displayed in Layout view. remove fields you don't want to use.
Blank Report Add fields from tables and queries to You would like to begin with no fields,
create a report by displaying a blank and one-by-one add only those that you
report with necessary options. The want.
report will be displayed in Layout view.
You can create the report by adding
and positioning controls according to
your requirements.
Report Create a new report or edit an existing You are building a new report based on
Design one in Design view. You can add fields an existing one.
from tables and queries. The report will
be displayed in Layout view.
Report Wizard Create a report by adding fields from You would like a wizard to guide you
tables and queries. You can also group through steps to quickly create a new
and sort the data in a report and report with only the fields you require.
customize the layout of a report.

Report Object Views


The following table describes the various views Access provides for creating and using reports.

View Use This View To

Report View data from a table or query in the layout defined by the report.
Print Preview Examine how a report will appear when printed. Use options in the
Page Layout group to configure print settings.
Design Examine and change the structure of a report, including adding,
removing, or modifying controls to define how the report will appear.
Layout Create or modify a report layout. This view presents data similar to
Report view, but enables you to change the report design, similar to
Design view. This view is optimized for making changes to the report's
layout, such as resizing and rearranging report elements.

Lesson 5: Generating Reports | Topic A


Microsoft® Office Access® 2013: Part 1 | 127

The Report Wizard


The Report Wizard guides you through steps to create a report based on one or more tables or The Report Wizard
queries, enabling you to select which fields you want to include in the report. The wizard also
provides options to group and sort data, and to customize the layout of reports. However, there
may be some options you want to use that the wizard doesn't provide. Once you have created a
report, however, you can always make modifications to the report in Design View.

Figure 5-1: The Report Wizard.

Access the Checklist tile on your LogicalCHOICE course screen for reference
information and job aids on How to Create a Report

Lesson 5: Generating Reports | Topic A


128 | Microsoft® Office Access® 2013: Part 1

ACTIVITY 5-1
Creating Reports

Data Files
C:\091004Data\Generating Reports\Inventory Reporting.accdb

Scenario
As a "cheat sheet" for your employees to refer to when counting inventory, placing orders, and so
forth, you periodically prepare an updated list of all current department codes. You will create a
report to accomplish this directly from the inventory database.

1. Open theInventory Reporting database. Select Enable Content if you are prompted.

2. Save the database in C:\091004Data\Generating Reports as My Inventory Reporting and select Enable
Content if you are prompted.
For this question, refer
learners back to the 3. What approach would you use to quickly create a report that lists all of the fields from the tblInventory
table in the section table?
Report Creation Tools. A: The Report command (CREATE→Reports→Report) might be the most direct approach in this case.
Involve remote learners It quickly creates a report that uses all fields from the selected table or query.
by having learners post
responses in the class 4. Generate a report.
chat/messaging system.
a) In the navigation pane, select tblDepartments.
b) Select CREATE→Reports→Report. A report is generated from the table.

Note: Reports can also be generated directly from a query. All fields are
included. When you create a report this way, Access makes assumptions
about the fields and the layout, but you could revise the layout and remove
fields if you desired.
c) Save the database, naming the report rptDepartments when you are prompted.

5. Examine the various report views.


a) Right-click the rptDepartments tab and select Print Preview. This view enables you to see the report
as it will appear when printed, and provides ribbon options related to printing. Page breaks are in
effect, so you can see how many pages will be in the report when printed, and what each page will
contain. The navigation bar at the bottom of the screen provides navigation buttons if the report
contains more than one page.
b) Right-click the rptDepartments tab and select Layout View. This view provides a preview of the
report similar to Print Preview, but includes ribbon options for adjusting the layout and controls used
in the report.
c) Right-click the rptDepartments tab and select Design View.

Note: While Print Preview and Layout view are oriented toward showing the
graphical design of the finished report, Design view is optimized for adjusting
the logical design of the report. For example, you can use this view to add and
set properties of controls used in the report.
d) Close rptDepartments and any other open database objects.

Lesson 5: Generating Reports | Topic A


Microsoft® Office Access® 2013: Part 1 | 129

ACTIVITY 5-2
Using The Report Wizard

Before You Begin


The My Inventory Reporting database is open, and no objects are currently open in the documents
pane.

Scenario
You will create a report to facilitate printing out your weekly list of orders that need to be placed to
your suppliers.

Use the Report Wizard to create a report.


a) Select CREATE→Reports→Report Wizard.
b) In the Tables/Queries drop-down list, select Query: qryReorderNow and observe that fields from
qryReorderNow are listed in the Available Fields list box.
c) Double-click each of the following field names to move them from Available Fields to Selected
Fields.
• SupplierID
• ProductCode
• ItemDescription
• OrderQty
• OurUnitCost
• OrderCost
• Company
d) Observe that the company's address is not available in the Available Fields list. It was not included
in the qryReorderNow query.

Lesson 5: Generating Reports | Topic A


130 | Microsoft® Office Access® 2013: Part 1

e) In the Tables/Queries drop-down list, select Table: tblSuppliers and observe that fields from
tblSuppliers are listed in the Available Fields list box.
f) Double-click each of the following field names to move them from Available Fields to Selected
Fields.
• ContactPhone
• ContactEmail
• Address
• City
• StateProvince
• Country
• PostalCode
g) Select Next.

Lesson 5: Generating Reports | Topic A


Microsoft® Office Access® 2013: Part 1 | 131

h) Select Next to accept the default view by qryReorderNow.

i) Select Next to accept the default grouping.


j) In the 1 drop-down list, select SupplierID and select Next.

Lesson 5: Generating Reports | Topic A


132 | Microsoft® Office Access® 2013: Part 1

k) Verify that Tabular and Portrait are selected, and select Next.

l) Change the report title to rptListOfOrders and select Finish.


m) Observe that the report is shown in a tabular format. Columns have been truncated at the page's
right margin, so some layout adjustments are needed.
n) Close the report.

Lesson 5: Generating Reports | Topic A


Microsoft® Office Access® 2013: Part 1 | 133

TOPIC B
Add Controls to a Report
The various tools to generate a report are often able to create most or all of the controls and layout
for you. However, there are times when you will need to add controls manually.

Report Sections
The Report Design view is similar to the Form Design view. It provides bands for various Sections in a Report
sections of the report, including the report header, page header, group header, detail, group footer,
page footer, and report footer. The Detail section is repeated for each record. Place information
that should appear at the beginning and end of the report in the report header and footer. Place
information that should appear on every page of the report in the page header and footer. Finally,
place information that should appear for each group of data (if your report is organized by group) in
the group header and footer.

Figure 5-2: The sections in a report.

The table describes the controls you can add to a report.

Control Description

Text Box Used to display values retrieved from tables and queries.
Label Used to display headings and descriptive text.
Hyperlink Used to display links to websites.
Combo Box Used to allow users to select a value from a list or enter a value.
List Box Used to allow users to select from a list of values.

Lesson 5: Generating Reports | Topic B


134 | Microsoft® Office Access® 2013: Part 1

Control Properties
Use the Property Sheet to set control properties. The Property Sheet organizes properties within
tabs to make them easier to find. Tabs include Format, Data, Event, Other, and All.

Access the Checklist tile on your LogicalCHOICE course screen for reference
information and job aids on How to Edit Controls in a Report

Lesson 5: Generating Reports | Topic B


Microsoft® Office Access® 2013: Part 1 | 135

ACTIVITY 5-3
Adjusting Report Control Layout

Data Files
C:\091004Data\Generating Reports\Inventory Reporting 2.accdb

Before You Begin


The My Inventory Reporting database is open, and no objects are currently open in the documents
pane.

Scenario
You are working toward producing a useful report layout for your orders. You will adjust the layout
of controls in rptListOfOrders to better use the available space, as in the completed report.
The Completed Report

Figure 5-3: The completed report.

1. Preview the current report layout.


a) In the navigation pane, right-click rptListOfOrders and select Print Preview.
b) Observe that the report does not fit completely on one page's width.

2. Move and resize the fields.


a) Right-click the rptListOfOrders tab and select Design View. To enable each record to display across
several rows, you will need to make the Detail band taller.
b) Point at the top edge of the Page Footer section header. The mouse pointer becomes a double
arrow.
c) Drag the Page Footer section header down to create room to arrange fields in multiple rows.

Lesson 5: Generating Reports | Topic B


136 | Microsoft® Office Access® 2013: Part 1

Note: You do not have to set the height perfectly on the first attempt. You can
always readjust the height later, after you have rearranged the text boxes.
d) Click the Company text box to select it. Point at one of the edges of the Company text box until you
get a four-headed "move" arrow. Drag the Company text box into its new position below the
SupplierID text box.

e) Make sure that the Company text box is still selected. Position the mouse pointer over the right edge
of the Company text box so the mouse pointer becomes a resize arrow, as shown.

f) Drag to resize the Company text box as shown.

Lesson 5: Generating Reports | Topic B


Microsoft® Office Access® 2013: Part 1 | 137

Note: As you perform this step, you may need to use the horizontal scroll bar
to see the other text boxes.

Note: To make fine adjustments, you may find it easier to use the keyboard
than the mouse. Press the arrow keys to move the selected field or label. Hold
the Shift key while pressing the arrow keys to change the width or height of
the selected field or label.
g) Drag to move the label for Company from the Page Header band to the area above Company.
Moving the label into the Detail area will cause it to repeat for every record in the report.

Note: If the Company label in the Page Header will not drag to the Detail area,
then you can cut and paste it instead.
h) Save the database.

3. Open a more completed version of the report layout.


a) Close My Inventory Reporting.
b) From the C:\091004Data\Generating Reports folder, open the Inventory Reporting 2.accdb
database. Select Enable Content if you are prompted.
c) Save the database in C:\091004Data\Generating Reports as My Inventory Reporting 2 and select
Enable Content if you are prompted.
d) View the rptListOfOrders report in Design view. Observe that all of the fields and labels have been
arranged in the Detail band using the same steps you used to move the Company field and label.

Lesson 5: Generating Reports | Topic B


138 | Microsoft® Office Access® 2013: Part 1

TOPIC C
Enhance the Appearance of a Report
Access provides numerous options to enhance the appearance of a report. For example, you can
apply color themes and font styles, and add graphics to any band in a report design.

Galleries
A gallery provides a collection of layout elements or appearance settings that you can apply to a
report or other database elements. The Themes gallery, for example, provides style options (a
combination of color schemes and fonts) that you can apply to a report.

Themes
Access provides various design themes that you can apply to forms and reports. To apply the theme,
you open your form or report, and on the DESIGN tab, select the Themes drop-down arrow. As
you hover the mouse pointer over each theme, you can preview its effect on your design. Select the
theme to apply it. The feature that enables you to preview the effect before you apply it is called Live
Preview.

Access the Checklist tile on your LogicalCHOICE course screen for reference
information and job aids on How to Enhance the Appearance of a Report

Lesson 5: Generating Reports | Topic C


Microsoft® Office Access® 2013: Part 1 | 139

ACTIVITY 5-4
Enhancing the Appearance of a Report

Data Files
C:\091004Data\Generating Reports\ww_logo.png

Before You Begin


The My Inventory Reporting 2 database is open, and rptListOfOrders is displayed in Design view.

Scenario
You will make some final touches to your rptListOfOrders report, including changing the color
theme and adding a graphic element.

1. Apply a theme to the report.


a) Switch to Layout view.
b) Select DESIGN→Themes, and then select the Themes drop-down arrow. The gallery displays
various graphic themes that you can apply to the report.
c) Point at various themes in the gallery, and observe that a live preview of the theme is shown in the
report. The themes are sorted alphabetically, and the name of each theme appears in tooltip text as
you point at the theme.

d) Select the Office Theme Dark theme to apply it to the report. If this theme is not available, you can
select any of the other themes.

Lesson 5: Generating Reports | Topic C


140 | Microsoft® Office Access® 2013: Part 1

2. In the DESIGN→Themes group, observe the buttons for the Colors and Fonts galleries. You can apply
the colors and fonts from each theme separately. You could apply the colors from one theme and the
fonts from another.

3. Add an image to the report.


a) Display rptListOfOrders in Design view.
b) Select DESIGN→Controls→Insert Image, and then select Browse.
c) Navigate to the folder C:\091004Data\Generating Reports, select ww_logo.png, and select OK. The
mouse pointer becomes an Image icon.
d) In the Report Header section, click just to the right of the rptListOfOrders title to place the image.
e) Drag the image and the title caption to rearrange them as shown.

f) Select the rptListOfOrders label, and then double-click in the label to select it for editing. Type Order
List

g) Right-click in the gray background of the header section.


h) Select Fill/Back Color.
i) Select the color white.

j) Right-click the rptListOfOrders tab and select Print Preview.

4. Save the database.

Lesson 5: Generating Reports | Topic C


Microsoft® Office Access® 2013: Part 1 | 141

TOPIC D
Prepare a Report for Print
When you print a report, you may find that the report contains too much information to fit within a
page. Just a small amount of overlap into the page margin can cause odd page breaks when you
print. It is often necessary to adjust page setup and layout options when you first set up a report for
printing.

Page Setup Options


The Page Setup tab provides options that you can use to customize page properties before you
print a report.

Option Enables You To

Size Select the paper size of the printed report.


Margins Set the print margins to Normal, Wide, or Narrow.
Show Margins Preview margin breaks.
Print Data Only Print a report without column headers.
Portrait Print a report using vertical paper orientation.
Landscape Print a report using horizontal paper orientation.
Columns Print a report in multiple columns.
Page Setup Open the Page Setup dialog box.

The Print Preview Tab


The Print Preview tab provides various options to preview a report as it will appear when printed,
before you actually print it.

Group Description

Print Provides a Print button, which you select to send the report to the
printer.
Page Size Includes various options related to paper size, page margins, and the
Print Data Only option.
Page Layout Includes options to change print orientation and column settings, and
to display the Page Setup dialog box.
Zoom Provides options to change the magnification and number of pages
shown at one time in Print Preview mode.
Data Includes commands to export a report to PDF and various other file
formats.
Close Preview Includes a button to exit Print Preview mode.

Access the Checklist tile on your LogicalCHOICE course screen for reference
information and job aids on How to Prepare a Report for Print

Lesson 5: Generating Reports | Topic D


142 | Microsoft® Office Access® 2013: Part 1

ACTIVITY 5-5
Preparing a Report for Print

Before You Begin


The My Inventory Reporting 2 database is open, and rptListOfOrders is displayed in Print Preview
view.

Scenario
Your report is just about ready to print. You will preview it and make any final adjustments that are
necessary before printing.

Ensure that all of the controls fit within the page boundaries.
a) On the Record navigation bar, select the Next Page button.

b) Observe that a blank page 2 appears.


c) View several more pages and observe that there is a problem with page breaks.
d) Display rptListOfOrders in Layout view.
e) Observe that no page content appears to spill across the page breaks, shown as dotted lines.

Note: Scroll to the left and right if your screen does not show the full page
width.
f) Select FORMAT→Selection→Select All. With all of the controls selected, you can see that
ItemDescription overlaps the page breaks.
g) Click in an area of the report that contains no control to deselect the controls.

Caution: If you have multiple controls selected, when you drag to resize, you
will resize all of the selected controls together.
h) Select the ItemDescription text field to select it.
i) Drag the right edge of the ItemDescription text field to the left until it fits within page boundaries.

j) Display rptListOfOrders in Print Preview.


k) Use the Record navigation bar to navigate to page 2.

Lesson 5: Generating Reports | Topic D


Microsoft® Office Access® 2013: Part 1 | 143

l) Verify that the pagination problem has been resolved.


m) Save and then close the database.
If you have a printer set
up in the classroom, to
conserve paper, you
might have one learner
actually print the report,
then pass the example
around the room.
Remote learners may
opt to print their own
reports.

Lesson 5: Generating Reports | Topic D


144 | Microsoft® Office Access® 2013: Part 1

Summary
In this lesson, you learned how to create a report, add controls and change the report's layout, apply
themes and layout options, and prepare the report for print.
What sorts of reports will you need to produce?
A: Answers will vary, depending on the needs of the organization. Examples include producing executive
reports, circulating regular quality reports to the production team, publishing research results, and so
forth.

You can print a datasheet. Why would you go to the additional effort to produce a report layout?
A: Answers will vary, but may include: Reports provide graphics, layout, and formatting features that go
far beyond what you can do in a datasheet. If you need more control over appearance, you should
use a report.

Note: Check your LogicalCHOICE Course screen for opportunities to interact with your
classmates, peers, and the larger LogicalCHOICE online community about the topics covered in
this course or other topics you are interested in. From the Course screen you can also access
available resources for a more continuous learning experience.

Encourage students to
use the social Note: To learn more about enhancing reports, refer to the LearnTO Apply Conditional Row
networking tools Formatting to a Report presentation from the LearnTO tile on the LogicalCHOICE Course
provided on the screen.
LogicalCHOICE Home
screen to follow up with
their peers after the
course is completed for
further discussion and
resources to support
continued learning.
You may want to show
LearnTO Apply
Conditional Row
Formatting to a Report
from the LogicalCHOICE
Course screen or have
students navigate out to
the Course screen and
watch it themselves as a
supplement to your
instruction. If not, please
remind students to visit
the LearnTOs for this
course on their
LogicalCHOICE Course
screen after class for
supplemental
information and
additional resources.

Lesson 5: Generating Reports |


6 Customizing the Access
Environment
Lesson Time: 30 minutes

Lesson Objectives
In this lesson, you will customize Access configuration options. You will:
• Set configuration options in the Access Options dialog box.

Lesson Introduction
Access provides numerous options to enable you to customize the Microsoft® Office
Access® 2013 application environment to meet your specific needs. In this lesson, you will
explore the scope of options available in the Access Options dialog box, and will identify
what configuration options would be appropriate to change in various situations.
146 | Microsoft® Office Access® 2013: Part 1

TOPIC A
The Access Options Dialog Box
The Access Options dialog box provides a variety of configuration settings that enable you to
customize database behavior and the Access user interface to meet your needs.

Access Options
Access Options Use the Access Options dialog box to customize and configure your installation of Access.
Customization categories include General, Current Database, Datasheet, Object Designers,
Proofing, Language, Client Settings, Customize Ribbon, Quick Access Toolbar, Add-ins,
and Trust Center.

Figure 6-1: The Access Options dialog box.

Access the Checklist tile on your LogicalCHOICE course screen for reference
information and job aids on How to Set Access Options

Lesson 6: Customizing the Access Environment | Topic A


Microsoft® Office Access® 2013: Part 1 | 147

ACTIVITY 6-1
Setting Access Options

Data Files
C:\091004Data\Customizing the Access Environment\Inventory Database.accdb

Scenario
To make sure all the Access settings are appropriate for your needs, you will explore Access
configuration options.

1. Open a database.
a) Open the Inventory Database.accdb database. Select Enable Content if you are prompted.

2. Examine the scope of settings available in the Access Options dialog box.
a) Select FILE→Options. The Access Options dialog box displays.
b) Select each button in the left pane to view various options in the right pane. As you select each
button, observe the summary description shown in the top of the right pane, and scroll the right pane
to view the scope of the settings available in each pane.
If you have remote
3. Some users in your organization are still using Access 2003, so you want the default file format for new learners, involve them in
blank databases to be Access 2003. What setting would you apply? the discussion by having
A: In the General section, you would set Default file format for Blank Database to Access 2002 - them post responses in
2003. the class chat/
messaging system.
4. You have a large high-resolution display monitor, and you want datasheets to display in a larger default
font. What setting would you apply?
A: In the Datasheet section, in the Default font group, you would set the size to a larger value.

5. On a daily basis, you export data from various databases to a PDF file, which you post on a website. To
save time, you want to add a shortcut to the Quick Access Toolbar to publish to a PDF. How would you
add this shortcut?
A: In the Quick Access Toolbar section, you would add PDF or XPS to the Quick Access Toolbar.

6. Your company develops databases for government and military projects that use many uppercase
acronyms. You want to take advantage of Office's proofing features, but you don't want the spelling
checker to flag every acronym as a misspelling. What setting would you apply?
A: In the Proofing section, in the When correcting spelling in Microsoft Office programs group, you
would make sure that Ignore words in UPPERCASE is checked.
Advise learners that they
7. Your organization shares a database that is stored in a secure location on your network. You want to should change Trust
configure your installation of Access to enable advanced features only for databases opened from that Center settings only for
trusted location. What steps would you take? a legitimate business
A: In the Trust Center section, select the Trust Center Settings button to display the Trust Center reason, as making
dialog box. Select Trusted Locations to display the pane in which you can specify trusted changes can adversely
locations. Select the appropriate location. Select Cancel. affect the computer's
security. Have learners
Caution: Changing the Trust Center settings can potentially compromise your select Cancel to back
computer's security. Only make changes when advised to do so. Select Cancel to out of any changes they
leave the default Trust Center settings intact. might make while
examining Trust Center
settings.

Lesson 6: Customizing the Access Environment | Topic A


148 | Microsoft® Office Access® 2013: Part 1

8. Customize the Quick Access Toolbar.


Since this is the last a) Select the Quick Access Toolbar tab to show the Customize the Quick Access Toolbar page.
activity, if you have time, b) In the Choose commands from drop-down list, select All Commands.
you might encourage
c)
learners to experiment In the list box beneath the Choose commands from drop-down list, select Find and select Add > > to
with other Access add the Find command to the Quick Access Toolbar.
options and share any d) Select OK. Verify that the Find command has been added to the Quick Access Toolbar. (It will be
interesting options they dimmed if you do not have a table or query result open.)
discover with other
learners. Note: You can add any ribbon command to the Quick Access Toolbar,
There are two Find including some commands that are not displayed in the Quick Access Toolbar.
commands that the
students could add. The e) Exit Access.
one with the binoculars
icon opens the Find and
Replace dialog box. The
one without the icon is a
drop-down menu for the
Find group on the
HOME tab.

Lesson 6: Customizing the Access Environment | Topic A


Microsoft® Office Access® 2013: Part 1 | 149

Summary
In this lesson, you learned about configuration options that are available in the Access Options
dialog box, and you added a command to the Quick Access Toolbar.
What sorts of configuration options do you think you will you use?
A: Answers will vary, depending on the needs of the user.

Are some locations safer to set as trusted locations than others?


A: If you have a storage location that is already secured by password, such as your My Documents
folder, it may be safer to set that as a trusted location than a location not on your computer, such as a
network share.

Note: Check your LogicalCHOICE Course screen for opportunities to interact with your
classmates, peers, and the larger LogicalCHOICE online community about the topics covered in
this course or other topics you are interested in. From the Course screen you can also access
available resources for a more continuous learning experience.

Encourage students to
use the social
networking tools
provided on the
LogicalCHOICE Home
screen to follow up with
their peers after the
course is completed for
further discussion and
resources to support
continued learning.

Lesson 6: Customizing the Access Environment |


Microsoft® Office Access® 2013: Part 1 | 151

Course Follow-Up
Congratulations! You have completed the Microsoft® Office Access® 2013: Part 1 course. You have
successfully created an Access database, including tables, forms, queries, and reports. With this
knowledge, you will be able to effectively organize, manage, and analyze large amounts of data.

What's Next?
Microsoft® Office Access® 2013: Part 2 is the next course in this series. In that course, you will
delve into database design; structure databases to optimize for efficiency, performance, and to
maintain data integrity; share data between Access and other applications; and create advanced
reports and forms.
You are encouraged to explore Access further by actively participating in any of the social media
forums set up by your instructor or training administrator through the Social Media tile on the
LogicalCHOICE Course screen.

Course Follow up
A Microsoft Office Access
2013 Exam 77-424
Selected Logical Operations courseware addresses Microsoft Office Specialist (MOS)
certification skills for Microsoft Office 2013. The following table indicates where Access
2013 skills that are tested on Exam 77-424 are covered in the Logical Operations Microsoft
Office Access 2013 series of courses.

Objective Domain Covered In

1. Create and Manage a Database


1.1. Create a New Database
1.1.1. Create New Databases Part 1, Topic 1-B
1.1.2. Create Databases Use Templates Part 1, Topic 1-B
1.1.3. Create Databases in Older Formats Part 1, Topic 1-B
1.1.4. Create Databases Use Wizards Part 1, Topic 1-B
1.2. Manage Relationships and Keys
1.2.1. Edit References Between Tables Part 2
1.2.2. Create and Modify Relationships Part 2
1.2.3. Set Primary Key Fields Part 1, Topic 2-C
1.2.4. Enforce Referential Integrity Part 2
1.2.5. Set Foreign Keys Part 2
1.2.6. View Relationships Part 2
1.3. Navigate Through a Database
1.3.1. Navigate to Specific Records Part 1, Topic 1-A
1.3.2. Set a Form as the Startup Option Part 3
1.3.3. Use Navigation Forms Part 3
1.3.4. Set Navigation Options Part 3
1.3.5. Change Views Part 1, Topic 1-B; Part 3
1.4. Protect and Maintain a Database
1.4.1. Compact Databases Part 3
1.4.2. Repair Databases Part 3
1.4.3. Backup Databases Part 3
154 | Microsoft® Office Access® 2013: Part 1

Objective Domain Covered In


1.4.4. Split Databases Part 3
1.4.5. Encrypt Databases with a Password Part 3
1.4.6. Merge Databases Part 2
1.4.7. Recover Data From a Backup Part 3
1.5. Print and Export a Database
1.5.1. Print Reports Part 1, Topic 1-A
1.5.2. Print Records Part 1, Topic 1-A
1.5.3. Maintain Backward Compatibility Part 1, Topic 1-A
1.5.4. Save Databases as Templates Part 3
1.5.5. Save Databases to External Locations Part 2
1.5.6. Export to Alternate Formats Part 2
2. Build Tables
2.1. Create a Table
2.1.1. Create New Tables Part 1, Topic 1-A
2.2.1. Import External Data Into Tables Part 3
2.1.2. Create Linked Tables from External Sources Part 3
2.1.3. Import Tables from Other Databases Part 2
2.1.4. Create Tables from Templates and Application Parts Part 1, Topic 1-A; Part 3
2.1.5. Freeze or Unfreeze fields Part 1, Topic 2-B
2.2. Format a Table
2.2.1. Hide Fields in Tables Part 1, Topic 1-B
2.2.2. Change Data Formats Part 1, Topic 1-B
2.2.3. Add Total Rows Part 1, Topic 2-A
2.2.4. Add Table Descriptions Part 2
2.2.5. Rename Tables Part 1, Topic 1-B
2.3. Manage Records
2.3.1. Update Records Part 1, Topic 2-A
2.3.2. Add New Records Part 1, Topic 1-B
2.3.3. Delete Records Part 1, Topic 1-A
2.3.4. Append Records from External Data Part 2
2.3.5. Find and Replace Data Part 1, Topic 2-A
2.3.6. Sort Records Part 1, Topic 2-B
2.3.7. Filter Records Part 1, Topic 2-B
2.3.8. Group Records Part 1, Topic 2-B
2.4. Create and Modify Fields
2.4.1. Add Fields to Tables Part 1, Topic 1-B

Appendix A : Microsoft Office Access 2013 Exam 77-424 |


Microsoft® Office Access® 2013: Part 1 | 155

Objective Domain Covered In


2.4.2. Add Validation Rules to Fields Part 3
2.4.3. Change Field Captions Part 2
2.4.4. Change Field Sizes Part 2
2.4.5. Change Field Data Types Part 1, Topic 1-B
2.4.6. Configure Fields to Auto-Increment Part 1, Topic 1-B
2.4.7. Set Default Values Part 2
2.4.8. Use Input Masks Part 2
2.4.9. Delete Fields Part 1, Topic 1-B
3. Create Queries
3.1. Create a Query
3.1.1. Run Queries Part 1, Topic 3-A
3.1.2. Create Crosstab Queries Part 1, Topic 4-D
3.1.3. Create Parameter Queries Part 1, Topic 4-A
3.1.4. Create Action Queries Part 1, Topic 4-B
3.1.5. Create Multi-Table Queries Part 1, Topics 4-B, 4-C
3.1.6. Save Queries Part 1, Topic 3-A
3.1.7. Delete Queries Part 1, Topic 4-B
3.2. Modify a Query
3.2.1. Rename Queries Part 1, Topic 1-A
3.2.2. Add New Fields Part 1, Topic 3-A
3.2.3. Remove Fields Part 1, Topic 3-B
3.2.4. Hide Fields Part 1, Topic 3-B
3.2.5. Sort Data within Queries Part 1, Topic 3-B
3.2.6. Format Fields within Queries
3.3. Utilize Calculated Fields and Grouping within a
Query
3.3.1. Add Calculated Fields Part 1, Topic 3-C
3.3.2. Add Conditional Logic Part 1, Topic 3-C
3.3.3. Group and Summarize Data Part 1, Topic 4-S
3.3.4. Use Comparison Operators Part 1, Topic 3-C
3.3.5. Use Basic Operators Part 1, Topic 3-C
4. Create Forms
4.1. Create a Form
4.1.1. Create New Forms Part 1, Topic 1-B
4.1.2. Create Forms with Application Parts Part 3
4.1.3. Save Forms Part 1, Topic 1-B
4.1.4. Delete Forms Part 1, Topic 1-B

Appendix A : Microsoft Office Access 2013 Exam 77-424 |


156 | Microsoft® Office Access® 2013: Part 1

Objective Domain Covered In


4.2. Set Form Controls
4.2.1. Move Form Controls Part 1, Topic 2-C
4.2.2. Add Form Controls Part 1, Topic 2-C
4.2.3. Modify Data Sources Part 3
4.2.4. Remove Form Controls Part 1, Topic 3-B
4.2.5. Set Form Control Properties Part 1, Topic 2-C
4.2.6. Manage Labels Part 3
4.3. Format a Form
4.3.1. Modify Tab Order in Forms Part 3
4.3.2. Format Print Layouts Part 1, Topic 1-A
4.3.3. Sort Records Part 1, Topic 2-B
4.3.4. Apply Themes Part 1, Topic 5-C
4.3.5. Change Margins Part 1, Topic 1-A
4.3.6. Insert Backgrounds Part 3
4.3.7. Auto-Order Forms Part 3
4.3.8. Insert Headers and Footers Part 1, Topic 1-B
4.3.9. Insert Images Part 3
4.3.10. Modify Existing Forms Part 3
5. Create Reports
5.1. Create a Report
5.1.1. Create new Reports Part 1, Topic 5-A
5.1.2. Create Reports with Application Parts Part 3
5.1.3. Delete Reports Part 1, Topic 5-A
5.2. Set Report Controls
5.2.1. Group Data by Fields Part 1, Topic 5-A; Part 2
5.2.2. Sort Data Part 1, Topic 5-A
5.2.3. Add Sub-Forms Part 2
5.2.4. Modify Data Sources Part 1, Topic 5-A
5.2.5. Add Report Controls Part 2
5.2.6. Manage Labels Part 1, Topic 5-B
5.3. Format a Report
5.3.1. Format Reports into Multiple Columns
5.3.2. Add Calculated Fields Part 2
5.3.3. Set Margins Part 1, Topic 5-D; Part 2
5.3.4. Add Backgrounds Part 2
5.3.5. Change Report Orientation Part 2

Appendix A : Microsoft Office Access 2013 Exam 77-424 |


Microsoft® Office Access® 2013: Part 1 | 157

Objective Domain Covered In


5.3.6. Change Sort Order Part 1, Topic 5-A
5.3.7. Insert Headers and Footers Part 1, Topic 5-A
5.3.8. Insert Images Part 1, Topic 5-C
5.3.9. Insert Page Numbers Part 2
5.3.10. Apply Themes Part 1, Topic 5-C
5.3.11. Modify Existing Reports Part 1, Topic 5-C

Appendix A : Microsoft Office Access 2013 Exam 77-424 |


B Microsoft Access 2013
Common Keyboard
Shortcuts
The following table lists common keyboard shortcuts you can use in Access 2013.

Function Shortcut

Open a new database Ctrl + N


Open an existing database Ctrl + O
Open the Print dialog box Ctrl + P
Open the Find tab Ctrl + F
Copy the selected contents Ctrl + C
Cut the selected contents Ctrl + X
Paste the selected content Ctrl + V
Undo typing Ctrl + Z
Cycle between open windows Ctrl + F6
Check spelling F7
Rename a selected object F2
Show the access keys F10
Switch to the next tab in a dialog box Ctrl + Tab
Switch to the previous tab in a dialog box Ctrl + Shift + Tab
Move to the beginning of an entry Home
Move to the end of an entry End
Toggle the property sheet tab F4
Toggle the Field List pane Alt + F8
Insert the current data Ctrl + ;
Insert the current time Ctrl + Shift + :
Add a new record Ctrl + +
Delete the current record Ctrl + -
Save changes to the current record Shift + Enter
Lesson Labs

Lesson labs are provided for certain lessons as additional learning resources for this course.
Lesson labs are developed for selected lessons within a course in cases when they seem
most instructionally useful as well as technically feasible. In general, labs are supplemental,
optional unguided practice and may or may not be performed as part of the classroom
activities. Your instructor will consider setup requirements, classroom timing, and
instructional needs to determine which labs are appropriate for you to perform, and at what
point during the class. If you do not perform the labs in class, your instructor can tell you if
you can perform them independently as self-study, and if there are any special setup
requirements.
162 | Microsoft® Office Access® 2013: Part 1

Lesson Lab 1-1


Creating an Access Database

Activity Time: 10 minutes

Data Files
C:\091004Data\Getting Started with Access\Create Practice.accdb

Scenario
You have started creating your inventory management database for the Woodworker's
Wheelhouse. You have already created the first table, which will hold inventory data.
Your administrative assistant has entered data in that table, but more tables are needed.
The next table you will create will hold contact information for each of your product
suppliers. You will add a table to a database and populate the first record.

1. From the C:\091004Data\Getting Started with Access folder, open the Create
Practice.accdb database. Select Enable Content, if prompted.

2. Save the database in C:\091004Data\Getting Started with Access as My Create


Practice.accdb and select Enable Content, if prompted.

3. View tblInventory. This version of the database contains a table tblInventory that has
been populated with 50 records of data.

4. Create a new table named tblSuppliers with the following fields.

Field Name Data Type

SupplierID Short Text


FirstName Short Text
LastName Short Text
ContactPhone Short Text
Company Short Text
ContactEmail Short Text
Address Short Text
City Short Text
StateProvince Short Text
Country Short Text
PostalCode Short Text

5. Create a primary key for the table when you are prompted.

6. In the tblSuppliers table, enter the following record.

Lesson Labs
Microsoft® Office Access® 2013: Part 1 | 163

Field Name Value

SupplierID ARBORHARVEST
FirstName James
LastName Krenoff
ContactPhone 555-394-1212
Company Arbor Harvest Lumber Inc.
ContactEmail krenoff@arbharvlum.com
Address 555 Skunk Hollow Road
City Holsopple
StateProvince PA
Country USA
PostalCode 15935

7. Save and close the database.

Lesson Labs
164 | Microsoft® Office Access® 2013: Part 1

Lesson Lab 2-1


Working with Tables

Activity Time: 10 minutes

Data Files
C:\091004Data\Working with Table Data\Table Practice.accdb

Scenario
To minimize data entry errors when users select a department, you will change the
Dept field to use a table lookup.

1. From the C:\091004Data\Working with Table Data folder, open Table Practice.accdb.
Select Enable Content if you are prompted.

2. Save the database in C:\091004Data\Working with Table Data as My Table


Practice.accdb and select Enable Content if you are prompted.

3. Change the Dept field of frmInventory to be a combo box. Set its row source to provide a
drop-down list of departments that are available in the tblDepartments table.

4. Close all open tabs.

5. Establish a table relationship between the Department field of tblDepartments and the
Dept field of tblInventory. Enforce referential integrity so only valid values are permitted in
the Dept field.

6. Save the database.

7. To test your new lookup field, display frmInventory in Form View. Use the drop-down list
to change the Dept for bathhw-2 from "Bathroom" to "Décor."

8. Save and close the database.

Lesson Labs
Microsoft® Office Access® 2013: Part 1 | 165

Lesson Lab 3-1


Queries

Activity Time: 15 minutes

Data Files
C:\091004Data\Querying a Database\Query Practice.accdb

Scenario
You need to print inventory tags that you fasten to all of the storage racks in your showroom and
warehouse. The tags each include the product code, the storage location and rack number, and the
name of the manufacturer. To produce a list of information you will need for all inventory, you will
produce the query shown here.

1. From the C:\091004Data\Querying a Database folder, open the Query Practice.accdb database. Select
Enable Content if you are prompted.

2. Save the database in C:\091004Data\Querying a Database as My Query Practice.accdb and select


Enable Content if you are prompted.

3. Create a query that displays the following fields.


• tblInventory: ProductCode
• tblInventory: Location

Lesson Labs
166 | Microsoft® Office Access® 2013: Part 1

• tblInventory: Rack
• tblSuppliers: Company

4. Configure the query to sort the results in ascending order by company.

5. Name the query qryInventoryTags and save the database.

6. Run the query and verify that it is producing the required results.

7. Close the database.

Lesson Labs
Microsoft® Office Access® 2013: Part 1 | 167

Lesson Lab 4-1


Advanced Queries

Activity Time: 10 minutes

Data Files
C:\091004Data\Creating Advanced Queries\Advanced Query Practice.accdb

Scenario
So that you can quickly find the location of a product in your store, you want to create a query that
will find text within the ItemDescription field and return any matches, along with product code
and location.

1. From the C:\091004Data\Creating Advanced Queries folder, open the Advanced Query Practice.accdb
database. Select Enable Content if you are prompted.

2. Save the database in C:\091004Data\Creating Advanced Queries as My Advanced Query


Practice.accdb and select Enable Content if you are prompted.

3. Create a query that meets the following requirements:


• Returns the fields ProductCode, ItemDescription, RetailPrice, Location, and Rack from the
tblInventory table.
• When the query runs, it displays the prompt Search Item Description For
• Based on the value the user enters, the query will return a list of products whose ItemDescription
contains the text that was entered. Text that appears anywhere within ItemDescription will be found.

4. Name the query qryDescriptionSearch

5. Save the database.

6. Test the query to verify that it works correctly.

7. Close the database.

Lesson Labs
168 | Microsoft® Office Access® 2013: Part 1

Lesson Lab 5-1


Reports

Activity Time: 10 minutes

Data Files
C:\091004Data\Generating Reports\Report Practice.accdb

Scenario
You need to print out tags that can be cut and slipped into a clear envelope on the
storage bins and racks in the Woodworker's Wheelhouse store. An example report is
shown here.

1. From the C:\091004Data\Generating Reports folder, open the Report Practice.accdb


database. Select Enable Content if you are prompted.

2. Save the database in C:\091004Data\Generating Reports as My Report Practice.accdb


and select Enable Content if you are prompted.
If learners can share the
display of their desktop,
3. Create a report named rptInventoryTags that shows all of the fields in qryInventoryTags.
as they complete the
The report should produce tags that can be slipped into a clear envelope on the storage
activity, those who finish
bins and racks in the Woodworker's Wheelhouse store. Refer to the layout example in the
early could share and
scenario. Your layout does not need to match the example exactly.
show their Print Preview
and Design view so
other learners can see 4. Save the database.
what they did and how
they did it.

Lesson Labs
Microsoft® Office Access® 2013: Part 1 | 169

5. Test your report layout, and verify that it meets the requirements described.

6. Close the database.

Lesson Labs
Solutions

ACTIVITY 1-1: Considering Potential Uses for Access

1. Why did you decide to use Access?


A: Answers will vary.

2. Considering the work you do, what sorts of tools or databases would you like to create in
Access?
A: Answers will vary depending on individual needs.

3. Regarding your response to the previous question, what data might you need to keep within
such a database?
A: Answers will vary. To know what information needs to go into the database, it is helpful to
know what information you want to get out of the database. Will it drive a monthly report? Will it
help you track the status of certain tasks or products? Will it help you know where things are
stored? Will it hold information you intend to publish? What you want the database to do for
you will help determine what information you need within the database.

ACTIVITY 1-10: Getting Help in Access

2. If you have remote learners accessing through a web conference, be sure to keep them
involved in this activity. For example, if your web conferencing system enables learners to
easily share their desktops, you can have learners show what they have found in their search
so that the entire class can view their findings.
What are the first three steps of a database design process?
A: Answers may vary, depending on which article you find. For example, one Help article ("The
Design Process") provides the following steps to designing a database: 1) Determine the
purpose of your database, 2) Find and organize the information required, 3) Divide the
information into tables, 4) Turn information items into columns, 5) Specify primary keys, 6) Set
up the table relationships, 7) Refine your design, and 8) Apply the normalization rules.

ACTIVITY 2-7: Configuring a Form Lookup Field

7. What is the benefit of establishing a lookup field?


A: A lookup field enables users to pick from a list of acceptable values.
172 | Microsoft® Office Access® 2013: Part 1

8. What is the benefit of establishing a table relationship and enforcing referential integrity?
A: Referential integrity ensures that every value in one table is contained within the
related field of another table. This is important for keeping the table relationship useful as
a means of connecting the two tables.

ACTIVITY 3-3: Filtering a Query Using a Comparison


Operator

2. Which fields would enable you to determine which items need to be reordered?
A: UnitsInStock could be compared to ReorderLevel. If UnitsInStock is less than or equal
to ReorderLevel, then it's time to place an order.

ACTIVITY 3-6: Performing Calculations in a Query

2. How might you determine how many of each item you need to order?
A: The UnitsInStock field shows how many items are currently in stock. The ReorderLevel
field shows how few items should be in stock to trigger reordering. The TargetInventory
field shows the number of items you should have in stock after replenishing your supply.
Subtract UnitsInStock from TargetInventory to produce the replenish amount.

ACTIVITY 5-1: Creating Reports

3. What approach would you use to quickly create a report that lists all of the fields from the
tblInventory table?
A: The Report command (CREATE→Reports→Report) might be the most direct approach
in this case. It quickly creates a report that uses all fields from the selected table or query.

ACTIVITY 6-1: Setting Access Options

3. Some users in your organization are still using Access 2003, so you want the default file
format for new blank databases to be Access 2003. What setting would you apply?
A: In the General section, you would set Default file format for Blank Database to Access
2002 - 2003.

4. You have a large high-resolution display monitor, and you want datasheets to display in a
larger default font. What setting would you apply?
A: In the Datasheet section, in the Default font group, you would set the size to a larger
value.

5. On a daily basis, you export data from various databases to a PDF file, which you post on
a website. To save time, you want to add a shortcut to the Quick Access Toolbar to
publish to a PDF. How would you add this shortcut?
A: In the Quick Access Toolbar section, you would add PDF or XPS to the Quick Access
Toolbar.

Solutions
Microsoft® Office Access® 2013: Part 1 | 173

6. Your company develops databases for government and military projects that use many uppercase
acronyms. You want to take advantage of Office's proofing features, but you don't want the spelling
checker to flag every acronym as a misspelling. What setting would you apply?
A: In the Proofing section, in the When correcting spelling in Microsoft Office programs group, you
would make sure that Ignore words in UPPERCASE is checked.
Advise learners that they should change Trust Center settings only for a legitimate business reason, as
making changes can adversely affect the computer's security. Have learners select Cancel to back out
of any changes they might make while examining Trust Center settings.

7. Your organization shares a database that is stored in a secure location on your network. You want to
configure your installation of Access to enable advanced features only for databases opened from that
trusted location. What steps would you take?
A: In the Trust Center section, select the Trust Center Settings button to display the Trust Center dialog
box. Select Trusted Locations to display the pane in which you can specify trusted locations. Select the
appropriate location. Select Cancel.
Changing the Trust Center settings can potentially compromise your computer's security. Only make
changes when advised to do so. Select Cancel to leave the default Trust Center settings intact.

Solutions
Glossary

action query database


A type of query that modifies data in An organized collection of data. This term
records that meet search criteria. also refers to the file (such as an
Access .accdb file) that stores a database.
append query
A type of action query that copies fields or delete query
records from one table to another. A type of action query that deletes fields or
records from a table.
arithmetic operators
Symbols or signs used to perform expression
mathematical operations on field values. A combination of functions, field names,
numbers, text, and operators that produces
Backstage view a result.
A portion of the interface found on the
FILE tab of the Access ribbon. It Expression Builder
provides options related to file format and An Access dialog box that supports a
file management. database developer in selecting database
objects and building formulas used in
calculated field queries and reports.
A field that displays values produced
mathematically based on values in other filtering
fields. A database operation that shows only
those records where values within a
comparison operators specified field meet required query criteria.
Signs or symbols, or combinations of signs For example, a filter may show all those
and symbols, that compare values and records that include telephone numbers in
produce a true, false, or null result based the area code "555."
on the relationship between the values;
examples include <, <=, >, >=, =, and find duplicates query
<>. A type of query that finds records that
contain duplicate field values within a table
crosstab query or query.
A query that calculates and summarizes
table data by category. find unmatched query
A type of query that finds records that
data exist in one record set but not the other,
Qualitative or quantitative values that can when comparing two tables or queries.
be recorded in a database.
176 | Microsoft® Office Access® 2013: Part 1

flat database make table query


A database that contains a single table of A type of action query that copies values
data. from one or more existing tables or queries
into another table.
foreign key
A field that is linked to the primary key in multi-level sort
another table. To establish such a link, the A type of sort that arranges records in
primary key and foreign key fields must order based on the values in more than
have the same data type. Duplicate values one field.
can appear in foreign key fields, but unique
values must exist in primary key fields. parameter query
A type of query that enables a user to pass
gallery information into a query just before it runs.
An Access feature that displays a list of
layout elements or appearance settings that primary key
you can apply to a report or other database A field that is configured to require a
elements. unique value in each record. No two
records in the table may have the same
information field value, and each record must contain a
In the context of database development, value in the primary key field. Because the
data that has been organized or field contains unique values, it can be used
transformed to produce a message or as a unique identifier for a record. Fields
meaning. that are designated as a primary key are
shown in Design view with a Key icon.
knowledge
In the context of database development, primary sort
data that has been organized or The sort that is done last in a multi-level
transformed to produce results that inform sort. It will have the most apparent effect
action. on the resulting sort order, since it may
shuffle the results of previous sorts.
like operator
An operator that is used within a query Property Sheet
criterion to search for records based on a An Access window in which you can
wildcard pattern. change the property values of the selected
database object.
Live Preview
An Access feature that shows style and query criteria
theme changes immediately as you point at Expressions that provide rules by which a
various style and theme commands in query determines which records to display
Access so you can see the result of a style in its output. Criteria are written as
or theme change before you actually apply mathematical or logical expressions that
it. evaluate to true (a matching record, which
will be displayed) or false (not a matching
logical operators record, which will not be displayed).
Established words used in an expression
that evaluate values passed into them and Query Design
produce a true or false result based on A view of a query that is optimized for
logic; examples include AND, OR, and performing query-defining tasks such as
NOT. adding fields to the query, specifying sorts,
adding criteria, and so forth.

Glossary
Microsoft® Office Access® 2013: Part 1 | 177

Record navigation bar Simple Query Wizard


Shown in datasheet and form views, a A dialog box that prompts you through steps
screen element that provides controls that to create a query. Advanced features can be
you can use to navigate among records. applied in Query Design view after the wizard
has finished creating the query.
referential integrity
A database quality where every foreign key in sorting
every table has a link to a primary key in A process that involves arranging items in
another table. Ensuring referential integrity alphanumeric order based on the values each
prevents entry of invalid data. record contains within the field on which the
sort is applied.
relational database
A database that contains multiple tables of data update query
that relate to each other through certain key A form of action query that performs an
fields. update operation on the values in records that
meet specific query criteria. For example, an
relationship update query might apply a price discount to all
A link between two tables based on values in products in the Tools department.
fields that share a common data type.
wildcard
Report Wizard Symbols that you can place in a query criterion
A dialog box that guides you through steps to to match records based on patterns, rather
create a report based on one or more tables or than requiring a literal character-by-character
queries, enabling you to select which fields you match.
want to include in the report. The wizard also
provides options to group and sort data, and to
customize the layout of reports.

Run command
Available from the DESIGN tab on the
ribbon, a command that enables you to launch
a query from Design view to see the results of
the query.

secondary sort
A sort done before the primary sort in a multi-
level sort. The secondary sort will have a lesser
effect on the resulting sort order, since the
primary sort may shuffle the results of the
secondary sort when it runs. Use a secondary
sort as a sub-sort. For example, if the primary
sort is on the Department and the secondary
sort is on the ProductCode, then groups of
records that are all from the same Department
will be sorted by ProductCode.

select query
A type of query that pulls a copy of one or
more fields from one or more data sources
based on selection criteria.

Glossary
Index

A crosstab query 77, 121


Currency field 32
Access
and web development 4
applications 27 D
choosing 3 data 2
Developer Reference 43 Data/Time field 32
Help 42 database
Options, setting 146 objects 4
Templates 43 templates 29
Training 43 Database Tools tab 25
vs. Excel 3 datasheet totals 56
action query Datasheet view 76
types 110 See also Design View
ampersand operator 105 data types
append query 110 field 32
applications 27 delete query 110
application window 9 Design View 32, 76
arithmetic operators 95 Detail 37
Attachment field 32 dialog boxes
Autocorrect 50 Zoom 92
Autonumber field 32 document windows
tabbed 10
C
Calculated field 32 E
Close Database 26 enable content 5
commands Exit 26
filter 60 expression 85
Run 77 Expression Builder 81
Commit 50 External Data tab 25
comparison operator 86
contextual tabs 26 F
control properties 134
Create tab 25 features
creating forms 37 Query Design 80
180 | Microsoft® Office Access® 2013: Part 1

field logical operators 87


data types 32 lookup fields 64
lookup 64 Lookup Wizard 32
field definition 32
file 5 M
file options 26
File tab 25, 31 make table query 110
filter Memo field 32
command 60 multi-level sort 87
feature 59
filtering 3 N
Find 53 navigation pane 10
Find and Replace 53 New 26
find duplicates query 77 Number field 32
Find Duplicates Query Wizard 114
find unmatched query 77
Find Unmatched Query Wizard 114
O
flat database 11 object
Footer 37 names 32
foreign key 66 views for reports 126
form OLE Object field 32
creation 37 Open 26
form views 37 operators
object 37 ampersand 105
object views 37 arithmetic 95
sections 37 comparison 86
Form Design View 133 like 86
Form Wizard 37 logical 87
options
G Page Setup 141
Options 26
gallery 138
P
H
page properties
Header 37 customization 141
Help 26, 42 page setup options 141
Home tab 25 parameter query
Hyperlink field 32 and wildcards 105
primary key 32
I primary sort 59
Info 26 Print 26
information 2 print preview 22
Print Preview 126, 141
Property Sheet 67, 134
K
knowledge 2 Q
query
L action 110
like operator 86 and reports 22
Live Preview 138 criteria 85

Index
Microsoft® Office Access® 2013: Part 1 | 181

crosstab 121 T
Design view 81
tabbed document windows 10
join 19
table 11
objects 76
Table of Contents 42
parameter 104
table relationship 64
saving a filter as 60
table templates 9
select 110
tabs
types 77
contextual 26
update 111
Text field 32
Query Design 80
theme 138
Query Wizard 77
Theme gallery 138
Quick Access Toolbar 10
the ribbon, See ribbon
Quick Search 52
Title bar 10
toolbar 42
R tools
Recent 26 for report creation 126
record 11 Totals 56
Record navigation bar 16, 52
referential integrity 66 U
relational database 11
Undo 50
relationship 64
update query 110, 111
relationship view 65
Replace 53
report V
creation tools 126 value 11
object views 126 view 26
sections 133 views
Report Design View 133 Backstage 26
Report Wizard 127 Design 32
ribbon 10, 25, 60 Form Design 133
ribbon tabs 25 relationship 65
Run command 77 Report Design 133

S W
Save web apps 8
options 31 web app templates 30
Save & Publish 26, 31 web development and Access 4
Save Database As 26, 31 wildcards
Save Object As 26 and parameter queries 105
Search 42, 52 Windows Live
secondary sort 59 and sharing templates 29
select query 110 wizards
set Access Options 146 Find Duplicates Query 114
simple query 77 Find Unmatched Query 114
Simple Query Wizard 76 Form 37
Sort & Filter 60 Lookup 32
sort feature 59 Query 77
sorting 3, 87 Report 127
SQL view 76 Simple Query 76
Status bar 10

Index
182 | Microsoft® Office Access® 2013: Part 1

Y
Yes/No field 32

Z
Zoom dialog box 92

Index
091004S rev 2.2

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy