2. Section Objectives
• Learn how to use Microsoft Access to:
• Create a database
• Create tables
• Enter table data
• Modify table data
• Delete table data
• Create single-table forms
• Create single-table reports
• Note
– These instructions use Windows 7 and Microsoft Access 2007
• Access 2000 format for backward compatibility
– In this section, we will work with only one table in a database.
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
3. Sample Database: WMCRM
• A database for a Car Dealership
– Wallingford Motors, Seattle, Washington
• dealer for a new line of hybrid cars named Gaea
• SUHi - The Sport Utility Hybrid
• HiLuxury - A luxury class four-door sedan hybrid
• HiStandard – A basic four door sedan hybrid
• HiElectra - A variant of the HiStandard that uses a higher
proportion of electrical power
– CRM application
• to track current, past, and potential customers, as well as
their contacts
• used by a salesperson(s)
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
4. Getting Starting with MS Access 2007
The Getting
Started with
Microsoft
Office Access
page
Click Blank
Database
KROENKE and AUER - DATABASE CONCEPTS 4th Edition)
5. Creating the Access Database WMCRM
The Blank
Database pane
If you don’t want
the database to
be created in My
Documents, use
the Open
button to
browse to the
desired location
Type the
database name
WMCRM.accdb
here
The Create
button
KROENKE and AUER - DATABASE CONCEPTS 4th Edition)
6. The New Access Database (WMCRM.accdb)
The database
name WMCRM:
Database
(Access 2007)
The Document
Window using
the tabbed
documents
interface
The Close
Document
button
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
7. The Microsoft Office Fluent User Interface
The Microsoft
Office button
The Quick
Access Toolbar
The tabbed
Ribbon
The object
Navigation
Pane
The document
window
The Close [Exit]
button
The Help
button
The Help
button
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
8. The Status
The Close [Exit]
button
The Help
button
The Status Bar
—Access in in
Ready mode
waiting for the
user to take an
action
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition) AW-1-8
9. Opening a Recently Opened Access Database
The Open
Recent
Database Pane
The
WMCRM.accdb
database
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition) AW-1-9
10. The Recent Documents Pane in the File Menu
The Recent
Documents
Pane
The
WMCRM.accdb
database
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
11. The Security Warning Bar
The Options…
button
The Security
Warning bar
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition) AW-1-11
12. The Microsoft Office Security Options
Dialog Box
The Microsoft Office
Security Options
dialog box
Click the Enable this
content radio button
The OK button
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
13. Database Column Characteristics
• The CUSTOMER Table
Column Name Type Key Required Remarks
CustomerID AutoNumber Primary Key Yes Surrogate Key
LastName Text (25) No Yes
FirstName Text (25) No Yes
Address Text (35) No No
City Text (35) No No
State Text (2) No No
ZIP Text (10) No No
Phone Text (12) No Yes
Fax Text (12) No No
Email Text (100) No No
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition) AW-1-13
14. Microsoft Access Data Types
Name Type of Data Size
Text Characters and numbers Maximum 255 characters
Memo Large text Maximum 65,535 characters
Number Numeric data Varies with Number type
Date/Time Dates and times from the Stored as 8-byte double-
year 100 to the year 9999 precision integers
Currency Numbers with decimal places 1 to 4 decimal places
AutoNumber A unique sequential number Incremented by 1 each time
Yes/No Fields that can contain only Yes/No, On/Off, True/False,
two values etc.
Hyperlink A hyperlink address Maximum 2048 characters in
each of three parts of the
hyperlink address
OLE Object An object embedded in or Maximum 1 gigabyte
linked to an Access table
Attachment Any supported type of file Independent of Access
may be attached to a record
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
15. Creating the CUSTOMER Table
The Create
command tab
The Create
Ribbon
The Table Design
button
The information
box for the button
shows that a new
table object will
be created
Click the Table Design button
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition) AW-1-15
16. The Table1 Tabbed Document Window
The Table Tools
contextual tab is
displayed along
with the set of
command tabs and
ribbons that
comprise the Table
Tools
The Design
command tab and
its Ribbon are
displayed
The Table1 tabbed
document window
in Design view
17. Selecting the Data Type
The Data Type
drop-down list
arrow button
The Data Type
drop-down list
Select
AutoNumber
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition)
18. The Completed CustomerID Column
The completed
CustomerID
column definition
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition) AW-1-18
19. Editing the Text Field Size
Edit this number
to set the number
of characters
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
20. Setting the Column Required Property Value
Click anywhere in
the Required text
box to display the
arrow the Required
property drop-
down list arrow
Select Yes from
the Required
property drop-
down list
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition)
21. Selecting the CustomerID Row
The row selector
column—move the
mouse cursor into
this column to
select a specific
row
Move the mouse
pointer here, then
click to select the
CustomerID row
KROENKE and AUER - DATABASE CONCEPTS (4th Edition) AW-1-21
22. Setting the Primary Key
Click the Primary
Key button in the
Tools group of the
Design ribbon to
set CustomerID as
the primary key
A key symbol is
placed here to
indicate that
CustomerID is the
primary key of the
table
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
23. Naming and Saving the CUSTOMER Table
Click the Save
button in the Quick
Access Toolbar to
display the Save
As dialog box
Type the table
name CUSTOMER
in the Table Name
text box and click
OK
KROENKE and AUER - DATABASE CONCEPTS (4th Edition) AW-1-23
24. The Named CUSTOMER Table
The table object
CUSTOMER is
displayed in the
Navigation Pane
The table is now
named
CUSTOMER—the
table name
CUSTOMER now
appears on the
document tab
Click the Close
button to close the
CUSTOMER table
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
25. The CUSTOMER Table Object
After the table is
closed, the
CUSTOMER table
object remains
displayed in the
Navigation Pane
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
26. Inserting Data into Tables—The
CUSTOMER Data
LastName FirstName Address City State ZIP Phone Fax Email
Griffey Ben 5678 25th NE Seattle WA 98178 206-456-2345 BGriffey@somewhere.com
Christman Jessica 3456 36th SW Seattle WA 98189 206-467-3456 JChristman@somewhere.com
206-478-
Christman Rob 4567 47th NW Seattle WA 98167 206-478-4567 9998 RChristman@somewhere.com
234 Highland
Hayes Judy Place Edmonds WA 98210 425-354-8765 JHayes@somewhere.com
KROENKE and AUER - DATABASE CONCEPTS 4th Edition)
27. Inserting Data into Tables
• Three commonly used methodsof adding
data to a table:
– Entering data in the Datasheet view (similar to
working with Excel worksheet)
– Build a data entry form for the table, and then
add data using the form.
– Using SQL to insert data into tables (to be
discussed later)
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
29. Inserting Data into Tables - The
Datasheet View
The Datasheet
command tab
If you need to
switch between
the Datasheet
View and the
Design View we
used to create the
table, use the
Design View
button
The Shutter Bar
Open/Close
Button
The CUSTOMER
tabbed document
window with the
table in Datasheet
view
30. The Collapsed Navigation Pane
The Shutter Bar
Open/Close
Button
The collapsed
Navigation Pane
The CUSTOMER
tabbed document
window with the
table in Datasheet
view
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
31. Entering Data Values for Ben Griffey
This row has been A new, blank row
autonumbered as is added to the
CustomerID 1 datasheet
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
32. The Completed CUSTOMER
Datasheet
When entering the Email, Column widths
the Access editor will can be adjusted
A new, blank row is Click the Close
change the second capital by using the
added to the button to close the
letter to lowercase—be mouse to drag the
datasheet CUSTOMER
sure to change it back! column border to
datasheet
the desired width
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
33. Modifying Data in the CUSTOMER
Table in Datasheet View
2. Click a cell in this
column to select an
entire row – a left-
click will simply
select 3. The Delete Record
the row, whereas a command in the 1. The phone number
right-click will select shortcut menu has been modified
the row and display a
shortcut menu
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
34. The Access Deletion Warning Box
The row with Jessica
Christman’s data has Click the Yes button
already been visually to actually delete the
removed! row
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
35. The New CustomerID Number
The row with the reentered
Jessica Christman data now
has a CustomerID of 3—
AutoNumber numbers are
sequential and will only be
used once by Access!
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition)
36. Inserting Data into Tables—Using a Form
Creating a Data Entry Form for the CUSTOMER
Table
The More Forms
Click the Create Gallery arrow Click The Form
command tab button Wizard button
The Create Ribbon !
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
37. The Form Wizard
The Form Wizard
The CUSTOMER
table is already
selected
Click the right-
facing single
chevron button to
select a single
field in the table
Click the right-
facing double
chevron button to
select all of the
fields in the table
Click the next
button
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition)
38. The Completed WMCRM Customer
Data Form
The WMCRM
Customer Data
Form tabbed
document window
The Forms
section of the
Navigation Pane
The WMCRM
Customer Data
Form object
New Record
button
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
39. The WMCRM Customer Data Form
for Customer Judy Hayes
The WMCRM
Customer Data
Form with the
data for Judy
Hayes
The Close button
The Last Record
button
The Next Record
button
New Previous
Record button
The First Record
button
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
40. The Delete Record Button
The Home
command tab
and Ribbon
The Records
group
The Delete drop-
down list arrow
button
The Delete
Record button
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition)
41. Creating Single Table Access Reports
Creating a Report for the CUSTOMER Table
Click the Create The Report
command tab The Create Ribbon ! Wizard button The Reports group
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
42. The Report Wizard
The Report Wizard
The CUSTOMER
table is already
selected
The Available
Field List
Click the right-
facing single
chevron button to
select the
highlighted field
in the table
Click the next
button
KROENKE and AUER - DATABASE CONCEPTS (4th Edition)
43. The Completed Column Selection
The Selected
Fields list
Click the next
button
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition)
44. Choosing the Sort Order
The sort field 1
drop-down list
button
Select
LastName from
the drop-down
list
Click the next
button
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition)
45. The Finished Report
The Wallingford
Motors Customer
Report tabbed
document window
The Reports
section of the
Navigation Pane
The Wallingford
Motors Customer
Report object
The report is
sorted by
LastName and
then FirstName
The Close button
KROENKE and AUER - DATABASE CONCEPTS (3rd Edition)