Office Automation Unit-V
Office Automation Unit-V
Introduction to Access
Access 2007 is a program that allows you to create and manage databases. A database is a
place where you can store information related to a specific topic. How you intend to use the
information will determine whether you need an Access database or a different program to create and
manage your data.
Opening a database
You have three main options on the Getting Started page. You can open a template
database stored locally or online, an existing database, or a blank database.
To view templates included with Access:
Click Local Templates in the left pane. The center of the screen will change to display
icons for the templates.
Select an icon in the center of the screen. Details about the database template will appear
on the right.
1
In the left pane of the Getting Started window, you will see a list of categories for the
templates available on Office Online. You must have an Internet connection to download these
database templates.
The Blank Database command allows you to create a database from scratch.
To open an existing database:
In the Open Recent Database section, double-click the file name of the database you
want to open. It will appear in the window.
OR
Click the More link. A dialog box will appear.
2
The Ribbon
Like other software in the Microsoft Office 2007 suite, Access 2007 has a tabbed Ribbon
system you use to navigate the database. The Ribbon is organized into tabs. Each tab
contains groups of commands you use to perform tasks in Access.
For example, on the Home tab you'll see that there is a Font group that contains font
formatting commands such as font type, size, color, and alignment. Unless you use keyboard
shortcuts for everything, the Ribbon is how you get work done in Access.
3
The navigation pane
The main control center of each Access database is the navigation pane. It shows you what is in
the database and makes the information accessible to you. You can choose to close the navigation
pane if you need more of the Access window to complete specific tasks.
4
Parts of a database
A Microsoft Access database is made up of several components,
including tables, forms, queries, and reports. These components are called database objects. One
or more of these objects is formed when a database is created, and all of the objects appear in the
navigation pane. To make the database easier to navigate, beginner Access users may want to
reorder objects in the navigation pane.
To change how objects are ordered in the navigation pane:
Click the drop-down arrow at the top of the navigation pane to see ordering options.
Select a menu option. The navigation pane will appear reordered based on your selection.
If you are new to databases, arranging the objects by type in the navigation pane is usually a
good idea. This will group tables, forms, queries, and reports into individual groups in the pane.
To expand or collapse a group:
Click any downward-pointing double arrow to expand a group so all objects are
displayed.
Click any upward-pointing double arrow to collapse a group and hide all objects.
5
Parts of a database
A database is made up of several components, or objects. These objects include:
Tables
Queries
Forms
Reports
We'll look at each of these objects in more detail in later lessons, but you can access them from
the navigation pane like you can with tables.
Tables
A table is the database object that contains the basic information you want to store. A blue and
white icon represents the table in the navigation pane.
In the Customer Info table below, there are columns—or fields—of information, including title
and author. Each row is a record containing the information specific to the fields listed.
Queries
Another database object is called a query. A query allows you to retrieve information from
one or more tables based on a set of search conditions you define using the table fields.
For example, if you want to know the name of the books that have sold in Colorado and Kansas,
you could create a query that would retrieve information from multiple tables to determine the
answer. In this example, you would retrieve information from the Order Info table and Books
table. Queries are covered in more detail in later lessons.
6
Forms
A third database object is the form. Forms are an Access tool you can create to make data
entry in database tables easier.
Entering data directly into a table can be difficult if there's a lot of information to enter. Similar to
an Excel spreadsheet, an Access table is essentially a screen filled with blank rows where you
enter records. Forms, however, give you an easy-to-read interface where you can enter table
data. Forms are especially useful for Access users who aren't comfortable working with
databases.
Reports
The final database object is the report. A report is an effective way to analyze and present
data using a specific layout. The text can be formatted in an Access report, just like it can be in
Word documents.
To close an object:
Select the tab for the object you want to close. (The highlighted tab is the active tab).
Right-click the tab, and select Close from the menu.
The Getting Started with Microsoft Office Access screen will appear (image below).
7
For previous Access users: The above menu screen is new in Access 2007. Take a few minutes to
peruse this screen. You will notice that (on the top left of the screen) that the ―old‖ Access Templates
(already created databases) are still available. As we move through this tutorial, many features of ―old‖
Access will be familiar to you.
8
As soon as you click the Blank Database button, the right side of your Access screen will change
and look like the image on the left.
Saving your work
One of the unique things about Access database is that it requires you to save your database as
soon as you enter the program. You can save your work on a floppy diskette in the A: Drive, on a USB
key/Flash Drive or on your C: Hard Disk, or in some other drive. Please save to one of these areas and
substitute your Drive in the instructions. To choose the Drive, on which you will save your Access
database, click the small folder to the right of File Name:
A New File Database menu screen similar to the one below will appear when you click the folder.
9
In the upper left corner of the File New Database menu screen that appears, you will see a
Save in: area (see upper left arrow above). Click-on the small down arrow on the right and it will
show you the various disk drives available on which you can save (see right upper arrow above).
Point to the drive on which you want to save your database, and click-on it. If you choose the 3½
Floppy (A:), make sure you have a formatted disk in the A drive. If you choose the C: drive, choose
the folder in which you want to save by double clicking on the folder. Your selection should now
appear in the Save in: area Next click-in the area to the right of File Name:. Delete any text that is
entered in the area and then type-in the word PERSON as shown at the bottom of the above image
(see lower left arrow).
Now click-on the OK button or tap the Enter key (see lower right arrow on last page). You
will now return to the Getting Started with Microsoft Office Access screen. On the right side of the
screen you will see your database File Name and below it, the Drive on which you will create your
database.
Click the Create button.
Creating a Table
10
When you click the Create button your Access 2007 screen will change to the image below. This is the
―new look‖ in 2007 Office. You will now see Tabs and Ribbons that automatically appear for the
area in Access on which you’re working. Instead of a Menu Bar and drop down selections, you’ll now
see these new features.
When we clicked the Create button Access assumed we desired to create – within our Person
database – another database – which is called a Table. You’ll notice that at the top of the above image
that the Table Tools and Datasheet Tabs appeared to assist you. The Ribbon below these Tabs is
composed of Groups of selections you’ll use to assist you as you create your Table.
In the lower portion of the above image you’ll see selections that indicate we are creating a new
Table. On the left of the Table Tools-Datasheet Tab/Ribbon you’ll see a View button. Click the View
button.
When you click the View button the following image will appear. Since we want to create or design a
new Table, we’ll click the Design View selection.
A Save As menu screen will appear similar to the image on the right. Type personnel in the Table Name:
area and then click the OK button.
11
Your Access 2007 screen will now change again – to the image below. We’ve enlarged
Notice (in the image above) that our Table Tools Tab still appears. However, because we are now in
the Design process, the lower Tab/Ribbon has changed to Design – to assist us with designing our
Table.
12
In the image on the last page you will notice that the Primary Key button is ―orange‖ and, in our
Personnel Table, that it is also ―orange‖ – with a little key to the left of ID. In database language this is
called ―keying.‖
Keying, or indexing, is somewhat advanced. You can get a good description by searching in Help for
Keying or Primary Key. To ―turn off‖ the Primary Key, click the Primary Key button. You’ll notice that
they Primary Key button is no longer ―orange‖ and the little key is gone from the left of ID.
If the Personnel Table image does not “fill” the screen, click-on the small square between the
―minus and the X‖ in the upper right hand corner of the screen (see arrow and image on right). This
will Maximize the screen.
Notice, under the Blue Bar at the top of the Design screen there are (3) things: Field name, Data
Type, and Description
13
We’ll be creating the Field Names that make up a database. This is similar to creating a blank
personnel form (on paper) that will be "filled-in" for each employee (Name, Address, Phone Number,
etc.). The areas that will be filled in are called Fields in a database. When you fill in all of the fields for
a person, the individual "forms" are called records in a database. There will be a record, or form, for
each employee. All the forms, together, make up a Table (database).
So let’s create a personnel database.
Significant Note: When creating a database it is always best to ―break down‖ a field into its
―smallest parts.‖ For example – Name would break down into First Name, and Last Name (you could
also have Middle Initial, Title, etc.) Address would break down into Street Address, City, State, and Zip
(you could also have Apartment Number, etc). Because we are working in Access 2007 it will be very
simple to ―put the fields back together‖ with a few mouse clicks when we need to do this. Trust us.
This will save you a lot of time later on.
Data Type
Text You may type in any alphabetical/numerical data that you desire - up to a maximum of 255
characters. As indicated, this is a text field, so you can't do mathematical calculations. Examples of Text
data are: names, addresses, stock numbers, room numbers, zip codes, etc.
Memo This field is for lots of text. You can have up to 32,000 characters.
Number This field is for numbers where you want to add, subtract, multiply, divide, average, and
do numerical calculations. This field can be a very large size, so when we get to Field Properties, we'll
talk about "sizing" this field so it doesn't take up to much "space" in storage.
Date/Time Dates and Times. You may format these later, as you may desire.
Currency Dollars ($). You may format these later, as you may desire.
AutoNumber This field is an "automatic" counter that assigns a number each time you put data into a
new field.
Yes/No This is a "True/False" or "Yes/No" type of field.
OLE Object This means "Object Link Embedding" which indicates you can insert a graphic,
picture, sound, etc. Pretty neat to put a photograph in a personnel record or a picture of an inventory
item in the stock record (advanced stuff). Since this is a simple, introductory Access tutorial, we won’t
work with Hyperlinks, Attachments, or Lookup Wizards.
After we have created our Person Database and Personnel Table it would be a good time to
Save the last few changes.
The Microsoft Office Button has replaced File in the Menu Bar. In the upper left corner of
your Access 2007 screen you will see a button similar to the image on the right. This is the Microsoft
Office Button.
14
Click the Microsoft Office Button. You will now see the Access 2007 Microsoft Office Button
selections. First, notice that many of the “old” File-Menu Bar choices Fare included in this menu
Since we Saved our database at the beginning of the tutorial, we only have to click the Save choice.
15
When you click the View button, the top of your Access screen will look like the image below.
Notice that all of the Fields you created are – in the order you created them – along the top of
the Table.
Entering Data
Under Last Name you will see a flashing cursor; this means that you are ready to begin
entering data. You may type the data and tap Enter, or click with the mouse in each field.
If you make a mistake you may retype the data. If you see a mistake later you can come back at
any time and correct it.
Under each field, type the following in the area below the Field Name:
16
17