Access 2007
Access 2007
Access 2007
Getting Started
Workshop Outline
Introduction to Database
What is Access 2007?
New features of Access 2007
Database design and creation
Essential tools and specific features
3/17/2010 2
Introduction to Database
Data, Information, Database
Data Information
MS Access
Database
3/17/2010 3
Introduction to Database (cont)
3/17/2010 4
Introduction to Database (cont)
A database application, however, is much more powerful than a
simple list in a Microsoft Word document. It lets the user:
– Store information: a database stores information that are related to a
particular subject or purpose (e.g. business information such as a list of
hundreds of thousands of customers)
– Find information: you can instantly locate information stored in a
database (find all the customers with the last name "Johnson" or
customers who live in the 55444 zip code)
– Analyze and print information: you can perform calculations on
information in a database and present information in a professional-
looking printed report
– Manage information: it is easy to work with and manage huge amounts
of information (with a few keystrokes you can change the area code for
hundreds of customers)
– Share information: Access allows more than one user to view and work
with the same information at once
3/17/2010 5
What is Access 2007?
Microsoft Office Access 2007 is a powerful relational
database management system (DBMS) allowing user to
create and process data in a database
3/17/2010 6
Access Database Objects
Tables (data entry and update) – allow to store, add, change, and delete
data
Queries (questions) – for finding and retrieving data. Allows to ask
complex questions concerning the data and receive quick answers
Forms – allow viewing and updating data in tables
Reports – allow to produce reports for analyzing, presenting and printing
data in professional-looking form
Database
Query
Table 1 Table 2 Form
Report
3/17/2010 7
Database Table Structure
A table is a collection of related data stored in rows and
columns
The rows in the tables are called records. A record contains
information about a person, product, or event
The columns in the tables are called fields. A field contains a
specific piece of information within a record (e.g. in the Client
table, the field City contains the name of the city where the
client is located)
Field
Record
3/17/2010 8
Primary Key
When you design a database, you divide information into tables in a
way that each table is about one subject, such as Clients or
Recruiters. This helps prevent data redundancy and contradictory:
– For example, each client might have many recruiters. Rather than store
the client's address in each record in the Recruiter table, you store that
information once in a record in the Client table. To combine the client
information with the rest of the information about the recruiter, you
create a relationship between the two tables by using key fields
3/17/2010 9
Primary Key (cont)
Thus, the primary key provides a unique value for each row in the
table. There cannot be more than one primary key, but there can be a
multiple-field primary key (one primary key defined on several fields)
Access can automatically create a primary key field when you create a
table, or you can specify the fields that you want to use as the primary
key
One of the reasons to create a primary key is to create table
relationships, in other words, to relate records to additional data
stored in other tables
You can add the primary key from one table to another table to create a
relationship between them. In the other table, it is called a foreign key.
– For example, you use the primary key of the Recruiters table in the Clients
table. In the Clients table, it is a foreign key:
Foreign
Primary Key
Key
3/17/2010 10
Foreign Key
Simply stated, a foreign key is “another” table's primary key
The values in a foreign key field match values in the primary key,
indicating that the two records are related
However, unlike primary keys:
– A table can have more than one foreign key in a table
– A foreign key does not necessarily have unique values
– A foreign key cannot reliably identify a particular record. For example, you
cannot always tell which record you are viewing from the Clients table by
looking at the Recruiter Number
Foreign
Key
3/17/2010 11
Designing a Database
Database design is the arrangement of data into tables and fields.
You should follow the general guidelines:
– Identify the tables. Identify the mail objects that are involved (e. g. clients
and recruiters). There will be a table for each object
– Determine the primary keys (Client Number and Recruiter Number)
– Determine the additional fields (client name, address, city, etc.)
– Determine relationships among the tables. If the tables are related,
include matching fields in the tables (recruiter can have several clients
assigned to him)
– Identify data types for the fields. Fields can contains: numbers, dates,
currency amount, text, etc.
– Identify and remove redundancy. Redundancy is the storing of a specific
data in more than one place. If it causes the problem (wasted space,
updates problem, and data inconsistency). Remove it (e.g. by splitting the
table into two)
– Determine a location for the database. The designed database will be
stored in a single file in a particular place (e.g. Access folder)
3/17/2010 12
Starting Access
Blank List of
Database recently
button opened
databases
Available
template
categories Available
templates
Links to additional
templates,
downloads, other
information
3/17/2010 13
Creating a Database
To create a
database:
– click the Blank
Database icon Blank
Database
– Type in the new
database name
in the “File
name:” field
instead of the
default file name Browse for
location …
– Click the button
“Browse for a
File Name:
location…” (enter your
button database name)
– Locate the
places where you
will store the Create button
database
– Click the Create
button
3/17/2010 14
The Access Window
Quick Access
Office Title bar with a
toolbar Database name
button
Ribbon
Design View
button
Datasheet
View button
(selected)
3/17/2010 15
Navigation Pane and Access
Work Area
Objects (tables,
forms, queries,
reports)
Record
Status bar Navigation View
controls buttons
3/17/2010 16
Navigation Pane
Shutter Bar
All Access
Open/Close
Objects
button
The Navigation Pane button
3/17/2010 17
Office Button
Quick Access Toolbar
Quick Access
Office
toolbar
button
Office button performs the
tasks previously available
on the File menu in earlier
versions of Access
Quick Access Toolbar Office
button
contains commands you menu
use most frequently
The commands always
are available. Initially,
there are Save, Undo,
and Redo commands
You can customize the
toolbar using Access
Options tab (see the
Word or Excel tutorials to
learn how to do that) Access
Options
tab
3/17/2010 18
Ribbon
Top-level tabs
Commands
Groups
Contextual
tabs
Instead of toolbars and drop-down menus, Access uses the Ribbon and the
Office button
The Ribbon is a control center. It consists of tabs, groups, and commands
Each tab surrounds a collection of groups, each group contains related
commands
By default, there are four top-level tabs: Home, Create, External Data, and
Database Tools. Home tab is a primary tab.
The tab currently displayed is called the active tab
3/17/2010 19
Ribbon (cont)
Dialog Box
Launcher Gallery
3/17/2010 20
Home Tab
3/17/2010 21
Working with Views
Each type of database
object has different views
available.
Click the View button to
switch between views. Or
click the View buttons on
the Status bar
– Datasheet View –allows
to view and enter data in
tables, forms, and queries
in a spreadsheet format
– Design View – allows to
change the design of
objects
– PivotTable View – allows
to create a pivot table
View buttons
form table or query data on Status bar
– PivotChart View - allows
to create a pivot chart Design
form table or query data Datasheet View
View
3/17/2010 22
Performing Calculations
You can perform a calculation
Totals
on one or more columns button
To sort a table
– click a cell in the
column on which
you want to sort
– In the Sort &
Filter group, click
either Ascending
or Descending
button Clear All
To clear the table’s Sorts
button
sorting, click the
Clear All Sorts
button
3/17/2010 25
Search and Replace
If you want to search the contents of a column, click the cell in
the column:
– On the Home tab, in the Find group, click Find
– In the Find and Replace pop-up window, in the Find What field,
type the value
– If you want to search the entire table for the value, click the arrow in
the Look In field and click the table name
– Click Find Next to find the first row the contains the value
To replace the value:
– In the Find group, click the Replace button
– In the Find and Replace pop-up window, in the Find What field,
type the value you want to search for
– In the Replace With field, type the value you want to replace it with
– Click Find Next. Confirm replacement by clicking Replace
3/17/2010 26
Create Tab
3/17/2010 27
Tables
Table
button
Table
Design
Table
Templates
3/17/2010 30
Field Properties
To set or change a
table’s field properties:
– In Design view,
click the General
tab in the Field Design
Properties pane View
3/17/2010 31
Deleting a Field or Row
Datasheet
Delete
contextual
button
Select the field or row you want tab
to delete
Do one of the following:
– In Datasheet view, click on
the Datasheet contextual tab Datasheet
View
and click the Delete button in
the Fields & Column group Delete
Record
– Or right click the selected row button
and click the Delete Record
button from the drop-down Design
Delete Rows contextual
menu button tab
– In Design view, click the
Design contextual tab and
click the Delete Rows button
in the Tools group
– Or right click the selected field
and click the Delete Rows
button from the drop-down Design
menu View
3/17/2010 32
Queries
Query
A Query helps to summarize Create Wizard
data from multiple tables, sort tab button
3/17/2010 33
Queries (cont) Query Design
button
Create
To design a query: tab
– From the Create tab, click the
Query Design button in the
Other group
Show
– Click the Tables, Queries, or Table box
Both tab in the appeared Show
Table dialog box and select a
table or query (to select multiple
related items, hold the Ctrl key
and click each item)
– Click the Add button
– Click the Close button Criteria
Design
To add a field to a query: grid
– Select the field in the field list
and double click it or drag it to a
column in the design grid
To enter criteria for the query, Run
Field
click in the Criteria cell and button
list
enter the criteria
Click the Run button in the
Design
Results group to view the query grid
3/17/2010 34
Forms
Forms provide a way to enter, Create Forms
tab group
edit, and display data from a
table or query. Forms can be
used to edit existing records,,
display information from
multiple tables and calculated
values
In Datasheet view, select the
table or query and click the
Datasheet
Create tab View
In the Forms group, do one of Form More
button Forms
the following: button
– To create a simple form, click
the Form button
– To create a form displaying
multiple records, click the Form
Multiple Items button Wizard
Multiple
– To use the Form Wizard, click Items
the More Forms button and button
select Form Wizard. Follow
the Wizard to create a form
3/17/2010 35
Creating a Split Form
Split Form
button
Table in
Datasheet
view
3/17/2010 36
Reports
Reports
Report group
button
Reports allow to
analyze, present, and Report
print data in Wizard
button
professional-looking
form
To create a report:
– Select the table or
query
– From the Create Report
Wizard
button, in the Reports box
group, do one of the
following
– To create a simple
report, click the
Report button
– To use the Report
Wizard, click the
Report Wizard button
and follow the wizard Created
to create a report Report
3/17/2010 37
External Data Tab
3/17/2010 38
Importing-Exporting Data
External
Data tab
In the External Data
tab, in the Import
group:
Get External
– Click Access, Data Wizard
Import
Excel, SharePoint, group window
etc. buttons and
follow the
instructions provided
by the Get External
Data wizard to
import the data
In the Export group:
– click the Excel,
SharePoint, Word, Export
etc. buttons and group
follow the
instructions provided
by the Export Export
wizard to export the Wizard
data window
3/17/2010 39
Database Tools Tab
3/17/2010 40
Table Relationships
Database
A relationship links tables Tools tab Relationships
together to provide distribution button
table
Show Table
To create a table relationship: button
Matching
fields
Drag the field in one
table to a matching
field in the second table
Create
– Access displays the button
Edit Relationships
dialog box
– Click the Create Edit
button in the box to Relationships
create the box
relationship
– Click the Save button
on the Quick Access
toolbar Close button
– Click the Close
button to close the
Relationships group
Relationship
link line
3/17/2010 42
Editing Relationships
Edit
Relationships
With the Database Tools and button
Design tabs, click the Relationship
Relationships button in the link line
Show/Hide group. Do any of
the following: Edit
Relationships
– To make changes in the button
relationship, double click (or
right click) the relationship
link line, or click the Edit
Relationship button in the
Tools group. Make changes Hide Table
button
in the dialog box and click the
OK button
– To delete a relationship, right
click the relationship link line
and click the Delete button in
the menu. Click Yes
– To hide a table, right click the Hide Table
button
table and click the Hide table
button, or click the Hide table
button in the Relationships
group on the Ribbon
3/17/2010 43
Editing Relationships (cont)
Direct
Relationships
button
– To display direct
relationships, select the
table and click the
Direct Relationships
button in the
Relationships group
– To clear the entire
relationship layout, click
the Clear Layout button
in the Tools group
Click the Save button and Clear Layout
button
then the Close button in
the Relationship group
3/17/2010 44
Referential Integrity
Referential Integrity is a
property that ensures that the
value in a foreign key in one
table must match a primary
key of another table Edit
– To specify referential integrity, Relationships
box
a relationship between tables
has to be defined by using the
Relationships tab in the
Show/Hide group Enforce
Referential
– If you want Access to Integrity
automatically maintain integrity
between the tables, select the Cascade
Enforce Referential Integrity Update Related
Fields
check box in the Edit
Relationships dialog box
– Click the Cascade Update
“One” part of
Related Fields check box relationship
and click OK
– A one-to-many type of
relationship is created (one
recruiter is related to may
“Many” part of
clients) relationship
3/17/2010 45
Backing Up a Database
Office
To prevent a database from button
Back Up
damage and loosing data, you Database tab
need to backup it
To backup a database:
– Save and close all object in
the database (the database
itself remains opened) Manage
tab
– Click the Microsoft Office
button and select the Manage
tab
– Click Back Up Database from
the menu and select the
location for the backup copy in
Compact and
the Save As dialog box Repair
– Enter a name of a copy and Database tab
click Save
To repair and compact
(remove any wasted space) a
database, click the Compact
and Repair Database tab
Manage
tab
3/17/2010 46
Additional Operation
To open another database
– Click the Office button and click the Open tab in the menu
– Select the database to be opened and click the Open button
To close a database without exiting Access
– Click the Office button and click Close Database
To check for dependent objects
– Select the object you wish to check
– Click the Database Tools tab on the Ribbon
– Click the Object Dependencies button in the Show/Hide group
– In the Object Dependencies pane, click the “Object that depend on me”
radio button to display any objects that depend on the selected object
To rename an object
– Right click the object and click the Rename tab on the shortcut menu,
type the new name
To delete an object
– Right click the object and click the Delete tab on the shortcut menu and
click Yes
3/17/2010 47
Textbook and Materials
Textbook
– Microsoft OFFICE 2007/ Introductory Concepts and Techniques,
Premium Video Edition, by Shelly, Cashman, Vermaat; ISBN: 978-
0-324-82684-5 © 2010.
Online Tutorials:
– http://office.microsoft.com/en-us/access/HA100140991033.aspx
– http://inpics.net/tutorials/access2007/basics.html
– http://www.functionx.com/access/
– http://cisnet.baruch.cuny.edu/holowczak/classes/2200/access/acce
ssall2007.html#sec_intro
3/17/2010 48