2. • Durham resident
• Teaching Microsoft Office for 20 years
• Favorite applications – Excel and Access
3. • What’s your name?
• What do you do?
• Have you used Access before?
• What are your expectations for the class?
• What is your favorite Microsoft application?
4. 1. Created a relational database from scratch before
2. Need to create a database from scratch
3. Have used Access or another database before
4. Need to maintain an existing database
5. Need to import data from Excel or another format
6. Have specific questions about Access
7. None of the above
Quick Survey
5. • Comfortable using other Microsoft Applications
• Familiar with Office 2010 Interface
• Check cell phones
• Does everyone have a book?
• No Lewis and Clarking, please
• Guided exploration
• Ask lots of questions
• Learn a lot
• Have fun
6. 1: Exploring Access 2010
2: Building a database
3: Maintaining a database
4: Querying a database
Today’s Lessons
8. 10
Lesson 1: Learning Objectives
After studying this lesson, you will be able to:
Define database and key terms associated with databases
Identify objects contained in modern databases and explain how they are
used
Launch Access 2010 and identify elements of the application window
Create a new blank database and database table
Use the Navigation Pane and enter data into a table
Save and close database objects
Preview and print datasheets
Use Help
Close a database and exit Access 2010
p. 2
9. Database Defined
What is a database?
A collection of related data stored together in one
electronic file
11 p. 4
17. Features of the Database Window
19
Navigation
Pane
Ribbon tabs
Shutter Bar
Open/Close
button Table1
p. 12
18. Identifying Object Types
Four basic types of objects
Tables: Hold data
Queries: Search table data
Forms: Input table data
Reports: Report table data as meaningful information
Each object type is represented by a different icon
Tables:
Queries:
Forms:
Reports:
20 p. 13
19. Using the Navigation Pane
Shutter button opens and closes the Navigation Pane
Organization appears in the Navigation Pane banner
Navigation Pane banner menu button ▼ displays the
Navigation Pane menu
Choose a different organization from the Navigation
Pane menu
Expand and collapse buttons to show/hide each object
list
21 p. 12
20. The Navigation Pane Menu
22
Menu button
Ways to organize the
Navigation Pane
Active display features p. 12
22. Creating Tables in Datasheet View
Access creates the first table when you create a new
blank database.
Table is generically named Table1
Additional tabs appear on Ribbon:
24
Table Tools:
Fields & Table
p. 15
23. Three Basic Terms Used in Databases
Field
The basic unit of database tables
Holds one piece of data—first name, last name, street
Record
A collection of all fields related to one item
All fields for a person or company
File
A collection of all related records stored together
All customers or all suppliers
25 p. 15
24. Navigating Datasheets
Tables and queries display in a row and column layout
called a datasheet
Datasheet resembles an Excel spreadsheet
To move from column to column, press [Tab] or [Enter]
or click the cell
26
Navigation buttons
p. 16
25. Table Guidelines
Each table has a primary key field
Primary key fields must contain data
Tables share at least one field with other tables in the
database
Fields shared with other tables are foreign keys
28 p. 16
26. What’s Wrong With This Table?
Employee
Name
First
Name
Address Telephone
Number
Car Age
John Smith John 393 Arundel Square
Durham, NC 27703
919-688-
3748
Toyota 42
Susan Baker Susan 7 Dapping Drive
Raleigh, NC 27614
919-847-
3284
Mazda 29
Todd Wilson Todd 103 Willow Way
Cary, NC 27511
919-468-
1208
Chrysler 38
Redundant Data
Not Smallest Logical Parts
Unrelated Data
Calculated Data
T - Employees
27. Pick A Primary Key
First
Name
Last
Name
Address City State Zip Code DOB
John Smith 393 Arundel Square Durham NC 27703 03/24/62
Susan Baker 7 Dapping Drive Raleigh NC 27614 12/10/75
Todd Wilson 103 Willow Way Cary NC 27511 6/13/66
Employee
ID
001
002
003
Characteristics Of A Primary Key
• Unique data
• Cannot be blank
• Typically an ID field
• Can be more than one field
AutoNumber???
T - Employees
28. Data Types
31
Some are self-explanatory
Most common types:
Text
Number
Currency
Date & Time
Each data type has unique
characteristics and limitations
p. 17
30. Entering Data into a Table Datasheet
Click the New Record button
Press [Tab] or [Enter] to
move to the next column
The new row is
identified with
an asterisk
33 p. 21
32. Closing Databases & Exiting Access
Closing Databases
File > Close Database
[Ctrl]+[F4] closes open objects such as tables
Exiting Access
File > Exit
[Alt]+[F4]
Access 2010 application window Close button
35 p. 27
33. Determine the Purpose of Your Database
Talk to people who will use the database.
Determine the information you would like the database
to provide.
Identify the data inputs for your database.
Collect and analyze forms you currently use to record
your data.
Examine a well-designed database similar to the one
you are creating.
Determine the data outputs for your database.
Sketch out the reports you would like to produce
with it.
36
34. IN THIS LESSON WE COVERED
37
Define database and key terms associated with databases
Identify objects contained in modern databases and explain how they are
used
Launch Access 2010 and identify elements of the application window
Create a new blank database and database table
Use the Navigation Pane and enter data into a table
Save and close database objects
Preview and print datasheets
Use Help
Close a database and exit Access 2010
36. Lesson 2: Learning Objectives
After studying this lesson, you will be able to:
Identify key database design techniques
Open an existing database
Create a database table using Design view
Create a form
Create a report
Create a table from an Excel worksheet
Create a new database using a template
40
p. 32
37. Planning a Database Design
Asking questions helps
identify objects
What info do you want to
obtain from the database?
What pieces of data do you
need for the info?
What groups do the fields fit
into?
How do the groups
interconnect?
What is the most efficient
way to input data?
What questions will the data
answer?
Reports
Fields
Tables
Foreign keys
Forms
Queries
41
p. 34
38. Opening a Database
Same basic procedures used to open files in other
computer programs
Enabling content to control security
42 p. 35
40. Saving a Database as a New File
File > Save As command in Access is different from
other applications
44
Save an existing
object as a new object Save an existing database
as a new database
p. 38
41. Opening Database Objects
Database objects are grouped by type on the
Navigation Pane
Procedures for opening database objects similar to
those used to open programs from the Desktop:
Double-click the object in the Navigation Pane
Right-click object in the Navigation Pane and choose
Open
Drag the object name from the Navigation Pane to the
work area of the Access window
45 p. 39
43. Working with Tabbed Objects
Each open object in the database window is identified
by a tab
To switch among open objects, click a tab
47
44. Creating Database Objects
The Create tab of the Ribbon contains tools for creating
all database objects
Tools on the Ribbon are grouped by object type
Each object type has several different formats to
choose from
48 p. 43
45. Creating a Simple Form – Input
Forms are used to input data into database tables
Forms obtain their field names and data from tables or
queries
Simple forms contain all fields for the table or query on
which they are based
49
p. 44
46. Creating Simple Reports – Output
Processes data into meaningful information
Formats data for printing
Contains all fields from the associated table
50 p. 47
50. Importing Data from Excel
Creates new tables from data stored in other programs
External Data tab on the Ribbon contains Import tools
Most import procedures use Wizards
54
p. 55
52. Create a Database Using a Template
In Access, database templates are ready-to-use
databases
Each template contains a set of objects designed for a
specific purpose
Storing contacts, tracking projects, etc.
Each object in the database created with a template
can be customized to meet specific needs
56 p. 57
53. Finding and Selecting Templates
57
Sample
templates
Search for more templatesBusiness templates group
downloaded from Microsoft
p. 57
56. IN THIS LESSON WE COVERED
60
Identify key database design techniques
Open an existing database
Create a database table using Design view
Create a form
Create a report
Create a table from an Excel worksheet
Create a new database using a template
60. Learning Objectives
After studying this lesson, you will be able to:
Change the layout of a table by adjusting column width,
hiding columns, and rearranging column layout
Locate and update records by sorting, filtering, and using
Find and Replace
Enhance a datasheet
Set table field properties
Rename, copy, and delete database objects
65 p. 70
61. Formatting Datasheet Layout
Changing column width
Moving and hiding columns
Saving a datasheet layout
66 p. 72
62. Changing Column Width
The mouse shape is important when selecting
columns and borders
Drag a column border to make the column on
the left of the border wider or narrower
Double-click a column heading border to
change the width of the column on the left to fit
the longest data entry in the column
67
Mouse shape on column
border for sizing column
Mouse shape on
field name for
selecting a column
p. 72
63. Moving and Hiding Columns
Hiding and moving fields in a datasheet has no impact
on the actual structure of the table
Data remains available but is hidden from view when
columns are hidden
Moving columns enables you to print datasheets in
different arrangements
68
Black bar identifies
location when dragging a
field to move it
Hide Fields
command on
context menu
p. 72
64. Saving Datasheet Layout
Each time you make a change to the layout of a table,
you must save the table
The Save button appears on the Quick Access toolbar
69 p. 73
66. Enhancing a Datasheet
Tools on the Home tab of the Ribbon
Gridline formatting tools
Font, font size, and font color
Table background color
71
p. 75
70. Setting Up Lookup Fields
Enables you to locate data contained in a table while
entering data into another table.
Lookup Wizard is a Data Type
Advantages:
Reduces the time required to enter the data repeatedly
Reduces errors associated with data entry
Restricts data to valid entries
75 p. 81
72. Setting Field Properties
Control the characteristics of data entered into fields
Properties available differ depending on data type of a
field
Provides automatic formatting for raw data
Example: Data entered: 3185554356
Property format applied: (318) 555-4356
Example: Data entered: la
Property format applied: LA
77 p. 85
73. Common Field Properties Used
Field Property Description
Field Size Sets a field length that controls the number of data
characters each field can hold.
Caption Sets a column heading title that describes the data
content better than the actual field name.
Input Mask Identifies the format of values entered—alphabetic or
numeric, uppercase or lowercase, with hyphens or
without, etc.
Validation Rule Controls actual values entered into fields—less than
100, greater than 1000, like RCE
Validation Text Provides a tip that identifies valid data entries.
Default Value Adds a default value for a specific field in each
record.
78
p. 85
74. Setting Field Properties
Control the way data displays
Accounts for different format (all caps, lowercase, etc.)
used by data entry clerks
Ensures consistent look in reports and other objects
Control values that can be entered
Provide tips for data entry
Set the number of characters that can be entered for a
field
Set a default field value
p. 86
75. Setting Field Size
Limits the number of characters allowed for field values
Triggers a warning message that data may be lost
Example:
Setting the State field size to 2 to accommodate state
abbreviations deletes all values containing more than 2
characters in the State field
80 p. 86
76. Setting Captions
Changes the text that appears in datasheet column
heading
Presents more descriptive field titles
Fname First Name
81 p. 86
77. Setting Input Masks
Sets data format
Provides a consistent display of data for all records
Uses many symbols to control format
Access adds characters that control how data displays:
1234567890(123) 456-7890
howard SMITHHoward Smith
82 p. 86
82. Retrieving Data
Three basic tools:
Sorting features
Filtering tools
Find and Replace feature
87 p. 95
83. Sorting Records
Sort ascending
Alphabetical order from A to Z
Numeric order from lowest to highest
Chronological order from first to last
Sort descending
Reverse alphabetical order from Z to A
Numeric order from highest to lowest
Reverse chronological order from last to first
88
p. 96
84. Sorting Records Using Multiple Fields
Access considers second fields when values in the first
field are equal
Example: Personal names
When the last name is the same, you can tell Access to
consider the first name
Last name is the primary sort field
First name is the secondary sort field
89 p. 97
85. How Multiple Column Sorts Work
Access sorts data on multiple fields from left to right
Columns in a table must appear side by side in the
datasheet
The column on the left must be the one you want
sorted first (primary sort field)
90 p. 97
87. Creating Validation Rules
Limits values entered into a field
Reduces errors associated with data entry
Restricts data entry to valid values
Data type should be set for the type values entered
Text provides instructions for data entry
Appears in status bar when field is active
Appears in message box when invalid values are entered
Wide variety of comparison operators
Wildcards can be used
92
p. 92
88. Setting Default Field Values
Adds a value to a field automatically
Can be edited to contain a different value
93
p. 94
89. Using Find and Replace
Techniques similar to those in other applications
Use Find and Replace to locate records to remove or
edit records
94 p. 99
93. Filtering Records
Filter by Selection
Selects records on the basis of the value contained in the
active field for the active record
Filter by Form
Selects records on the basis of values or conditions
(criteria) that you type in one or more form fields
98
Tip! Again, Access searches only the fields
you specify to find the match.
p. 103
94. Using the Toggle Filter Tool
After you apply a filter, clicking the Toggle Filter button
removes the filter and displays all records
After removing a filter, clicking the Toggle Filter button
reapplies the last filter applied
99
Tip! A ToolTip displays to let you know what action
you are performing: Remove Filter or Apply Filter.
p. 104
96. Identifying Comparison Operators
Identifies the comparison Access should perform
Operators include:
=
>
<
<>
>=
<=
101 p. 105
97. Using Wildcards
Used in place of specific characters
Primary wildcards used:
* Represents any number of characters
? Represents an individual character
Examples:
*Graham* locates all records with graham within the text
Gra?am locates all records with gra at the beginning of
the field value and am at the end of the field value with
only one letter between
102
p. 106
100. IN THIS LESSON WE COVERED
105
Change the layout of a table by adjusting column width,
hiding columns, and rearranging column layout
Locate and update records by sorting, filtering, and
using Find and Replace
Enhance a datasheet
Set table field properties
Rename, copy, and delete database objects
102. 108
Learning Objectives
After studying this lesson, you will be able to:
Create, save, and run select queries
Design a query using multiple tables
Set query criteria
Define a query sort order
Create and format a calculated field
Use functions in query expressions
Create a crosstab query
Create unmatched and duplicates queries
p. 122
103. Queries Defined
Queries are database objects that enable you to ask
questions of a database in order to retrieve data and
extract records that meet specific criteria
109 p. 124
104. Reviewing Query Features
Query results datasheet data remains stored in its
original table rather than in the query
Data edited in a query results datasheet changes data
stored in a table
Queries are dynamic objects that display up-to-date
data stored in database tables
Queries can be used to create forms and reports
containing fields from multiple tables
Query results datasheets enable you to filter or
organize data using the same techniques you use to
filter and organize table datasheets
110
p. 124
106. Creating Select Queries
Access contains two distinct tools for creating select
queries:
Query Wizard
Design View
112 p. 127
107. Using the Simple Query Wizard
Steps you through the creation of a select query
Enables you to identify table(s) and fields from each
table that you want to include in the query
Prompts you to save the query
113 p. 125
108. Using Query Design View
Presents a split window with table field lists at the top
and columns and rows at the bottom
114
p. 127
109. Adding Fields to the Query Grid
Double-click a field name to add the field to the next
available column of the query design grid
Drag a field to the next column in the grid
Click the Field row of a column in the query grid and
selecting the field from the drop-down list
Double-click the asterisk (*) that appears at the top of
the field list to add all fields to the grid
Double-click the field list title bar to place each field in
the table in a separate column of the query grid.
115
Note! When you use the asterisk to add all fields,
Access places the table name in field row, but
when you run the query, each field appears in a
separate column of the query results datasheet.
p. 128
117. Sorting a Query and Limiting Results
Sorting Query Results
Using sort tools after running the query
Setting a sort order in the query grid Sort row
123 p. 141
118. Limiting Results
Effective way of limiting results combines sorting with
restricting the number of results to display
The Return feature on Query Design tab enables you to
set the number of records you want to retrieve
124 p. 141
119. Please Excuse My Dear Aunt Sally
Parentheses
Exponentials
Multiplication/Division
Addition/Subtraction
(2+2)*32=6/2=33
125 p. 144
120. Calculated Fields
Have no value of their own
Perform calculations using other field values
Calculated
field name
Field names from
existing tables
Arithmetic or
comparison
operator
126 p. 144
122. Using Functions in Queries
Groups query results by field on which a sum or
average or other order is required
Multiple fields and calculated fields can be used for
grouping
Example shows minimum, maximum, and average
128 p. 146
127. Unmatched and Duplicates Queries
Checks database tables to ensure there is no
duplication of records
Also checks database to ensure that records
referenced in one table have a matching record in the
other table
Hoped-for result of running these two queries is that
Access finds nothing to report
133 p. 154
131. IN THIS LESSON WE COVERED
137
Create, save, and run select queries
Design a query using multiple tables
Set query criteria
Define a query sort order
Create and format a calculated field
Use functions in query expressions
Create a crosstab query
Create unmatched and duplicates queries
133. One-to-one Relationships
1. Simplest kind of relationship
2. Least common relationship
3. Link each record in one table to a single record in another table
4. Tables linked by primary keys
5. Tables with large number of fields
6. For security purposes
Employees
Employee ID
First Name
Last Name
Address
Telephone
Salaries
Employee ID
Salary
1 1
Primary
Key
Primary
Key
Salary
Tax Rate
Exemptions
…
135. Grade?
Many-To-Many Relationships
1. Requires a Junction Table
2. Two One-To-Many Relationships
∞
∞1
1
∞ ∞
T – Employees T – Training
∞ ∞
T - Employees
EmployeeID
FirstName
LastName
Address
Telephone
T - Training
ClassID
ClassName
ClassDescription
Instructor
Grade
…Primary
Key Primary
Key
TJ – Employees and Training
EmployeeID
ClassID
Junction
Table
Training says, “I was wondering… where are we going to put the GRADE field?”
Grade?
Hmmmm…
TJ – Employees and Training
Students would
get 1 grade for all
their classes Everybody in
class would get
the same grade
Where are we putting the GRADE field?
Bob
Bob
Bob
Sue
Sue
Sue
Joe
Joe
Joe
Excel
Word
Visio
Excel
Word
Visio
Excel
Word
Visio