You are on page 1of 28

Introduction to Tables

Imagine you create a list of people. The list can be started


with names as follows: Bill, James, Hermine, and Khan.
This type of list is considered one-dimensional because all
of its items fit in one category. In order to create a more
detailed list, you may want to include these peoples email
addresses and probably other related information. If you
include these additional pieces of information in the same
category, the list may become confusing. To arrange the
list, you would di!ide it in categories. Here is an e"ample:
Name Email Address
Phone
Number
Relationship
Bill bill#yahoo.com $riend
James %amesemail.com
&'()*+,,-
)-,+

Hermine
&'('* ../-
-+-.
0ousin
Khan #Khan.com
This type of display allows you to refer to a piece of
information by its category. This is the basis of a table. 1
table is a two-dimensional list of items so that the items are
arranged by categories. 1 complete or incomplete series of
items that represent each category is called a record.
Therefore, a table can be represented as follows:
In database de!elopment, a category is represented as a
column. 2ometimes it is also called a field. 1 record is
represented as a row.
Database Object and Fields
1 field is an ob%ect used to host, hold, or store a piece of
information of a database. Before such an ob%ect can
perform its function, it must first be created. In the strict
sense, the most important or the most regularly used fields
of a database are created on a table, but tables may not be
the friendliest windows to present to a user for data entry.
$or this reason, fields can and should also be created on
other windows.
The process of ma3ing a field a!ailable depends on the type
of ob%ect it will reside on and probably how the field will
be used. This leads to two categories of fields: those that
can recei!e or store information and those that can only
present or display it. 1ll fields of a table, especially in
4icrosoft 1ccess, are created to store data.
TABLE LAYOUT
The Table's Tab
1 table is presented as a rectangular window represented in
the middle of the screen with a tab. 1s an option, you can
remo!e the tabs and let the tables display without them. To
do this, you can clic3 $ile and clic3 5ptions. In the left
frame, clic3 0urrent 6atabase and, in the right frame, in the
6ocument 7indow 5ptions section, clic3 the Tabbed
6ocuments radio button and remo!e the chec3 mar3 on the
6isplay 6ocument Tabs chec3 bo":
1fter ma3ing the selection, you can clic3 5K. 8ou will be
as3ed to close and reopen the database:
7hich you should do.
5n the left side of its top section, a table presents an icon
. The table icon pro!ides a menu you can access when you
right-clic3. The menu allows you to sa!e or change the
!iew of the table.
The Table System Buttons
In 4icrosoft 5ffice 1ccess )('(, by default, a table in
6atasheet 9iew is represented with a tab, which pre!ents
the user from mo!ing it around. If you want, you can ma3e
the tables of a database appear as single documents. To do
this, open the 1ccess 5ptions dialog bo" from the $ile
category. In the left frame, clic3 0urrent 6atabase. :nder
6ocument 7indow 5ptions in the right frame, clic3 the
5!erlapping 7indows radio button:
7hen you clic3 5K, you will be as3ed to close and reopen
the database &which you should do*.
A Table as a Datasheet
1lthough a table is primarily recogni;ed as an arranged list
of columns and rows, each column and each row intersect
to create a rectangular bo" called a cell:
The cell is actually the ob%ect that holds data of a table. 1
cell holds only one piece of information. The database
de!eloper decides what type of information would go into a
cell but the user types that information. Based on its
arrangement of cells, a table is said to display in a datasheet
layout or simply a datasheet &because its !iew is made of
cells*.
Table Navigation Buttons
The lower left side of the table is made of four buttons used
to na!igate the table, one button used to create a new
record, and a te"t bo". <ach button plays a specific role:
Button Name Role
$irst =ecord
1llows mo!ing to the first record of the
table
>re!ious =ecord
1llows you to mo!e one record bac3 &if
there is one* from the current record
0urrent =ecord
6isplays the number representing the
current record out of the total number of
records
?e"t =ecord 1llows mo!ing you one record ahead
@ast =ecord
1llows mo!ing you to the last record of
the table
?ew &Blan3*
=ecord
:sed to enter a new record on the table

Introduction to Table Creation

Table Creation
To ha!e a table as part of your database, you must create it.
8ou ha!e !arious options. If you create a database using
one of the local templates, it would pro!ide you with a few
tables that you can start using. 5therwise, to create a table,
on the =ibbon, you can clic3 0reate. In the Tables section,
clic3 Table. This would cause the =ibbon to switch to a
section labeled $ields:
$rom the $ields tab, you can ma3e selections.
The Name of a Table
@i3e e!erything that is part of a database, a table must ha!e
a name that can be used to refer to that ob%ect throughout
the database and in other files that can be lin3ed to the
table. There are two main ways you can specify the name
of a table, either when you sa!e it for the first time or if you
decide to rename it.
To sa!e a table you ha!e %ust created:
8ou can clic3 $ile and clic3 2a!e
8ou can right-clic3 the TableAB &such as Table'* tab
and clic3 2a!e
8ou can press 0trl C 2
8ou can start closing the table. 8ou would be
prompted to sa!e the change &if its structure has been
changed from the structure it had before it was
opened*

Table anagement

The Tables in the Navigation !ane
Because the table is the primary ob%ect of a database, when
you create a table and sa!e it by gi!ing it a name, 4icrosoft
1ccess creates a section labeled Tables in the ?a!igation
>ane and displays the name of thew new table in that
section. In the same way, you can ha!e as many tables as
possible in the Tables section. Here is an e"ample:
1s we will see in the ne"t lesson, you can create other
ob%ect and they will ha!e their sections. <ach section is
e"pandable and collapsible. To e"pand a section, clic3 the
header of that section. To the same to collapse a section.
O"ening a Table
The most regular operations you will perform on a table
reDuire that you open it first. To open a table, first locate it
in the ?a!igation >ane then:
8ou can double-clic3 the table
8ou can right-clic3 the table and clic3 5pen
1ny of these actions causes the table to display in
6atasheet 9iew in the central area of the screen. In the
same way, you can open as many tables as necessary.
Closing a Table
1fter using a table, you can close it. Before closing a table,
first select its tab. Then, to close a table:
8ou can clic3 the close button on the right side of
the tabs
8ou can press 0trl C 2hift C $.
Selecting a Table
In order to use a table, some operations reDuire that you &or
rather the user* first select&s* it:
To select a table in the ?a!igation >ane, simply clic3
it
If you had opened many tables and they are displaying
in the main area of the screen, to select one, clic3 its
tab or its title bar
If you ha!e many tables displaying in the main area of
the screen, you can press 0trl C $E continuously to
switch from one table to the ne"t until the desired one
displays
#enaming a Table
7e saw that, when or after creating a table, you must sa!e
it to ma3e it part of your database. 7hen sa!ing it for the
first time, you must gi!e it a name. If the name of a table is
not appropriate, you can change it. To rename a table, in the
?a!igation >ane, you can right-clic3 the name of the table
and clic3 =ename.
Deleting a Table
If you ha!e a table you dont need anymore, you can
remo!e it from your database. Because you cannot delete a
table if it is opened, you must first close it.
To remo!e a table from your database:
In the ?a!igation >ane, right-clic3 the table and clic3
6elete
In the ?a!igation >ane, clic3 the table to select it.
Then, on the =ibbon, clic3 Home. In the =ecord
section, clic3 6elete
In the ?a!igation >ane, clic3 the table to select it and
press 6elete
In each case, you will recei!e a warning to confirm what
you want to do. It is important to 3now that if you delete a
table, because it is not a file, it does not go into the =ecycle
Bin: it is lost, including its records. Therefore, before
deleting a table, ma3e sure you really want to get rid of it.
7hen in doubt, do not delete it.
Tables Columns in the Datasheet $ie%

0reating a 0olumn
1lthough we did not mention it so far, a table does not e"ist
without a column. >ut it another way, a table must ha!e at
least one column in order to ha!e meaning. This also means
that, in order to create a table, it must actually ha!e at least
one column. If you start a table in 6atasheet 9iew,
4icrosoft 1ccess creates and gi!es it one default column.
5nce a table displays in 6atasheet 9iew, you can start
entering data into its cells. If you do this, whene!er you
enter data under a column, that column recei!es an
incremental name: the first column on the right side of I6
would be named $ield', the second would be $ield), and so
on. These would be insignificant and can e!en be
confusing. $ortunately, you can gi!e meaningful names to
the columns of your table.
Naming a Column
1 column can ha!e almost any name: FBoo3 TitleF,
F6GHI#HF, FThis Is The Boo3 TitleF, F=-JJ67H.F, etc.
2ome columns will ha!e only tinny data, li3e a persons
age, the number of boo3s in an office, a persons middle
initial, etc. It may not be a good idea to gi!e them a name
that would ta3e too much space.
To name a field, first figure out what the data in the
category will be made of. If you are planning to enter
employees salaries in a field, you can %ust call it 2alary. If
you want to specify employeess names by first name,
middle name, and last name, you can use such column
names and ma3e them distinct. In this case, you could name
the first column as first name, the last name would be
called last name. 1lthough you can use one word names,
some people might be confused. The suggestion is to
distinguish where!er a new <nglish &or the language you
are using to design your database* name starts in the field
name, by using a starting uppercase. Instead of firstname or
first name, you can use $irst?ame or $irst ?ame. Instead of
fullname or full name, you can use $ull?ame or $ull ?ame.
Before changing the name of a column:
8ou can double-clic3 its header
8ou can right-clic3 a column and clic3 Rename
Column
7hen any cell under a column has focus, on the
=ibbon, you can first clic3 6atasheet. Then, in the
$ields K 0olumns section, clic3 =ename 0olumn.
1ny of these actions would put the name of the column into
edit mode. 8ou can then type the new desired name or
change the e"isting name.
&sing a Sam"le Field
7hen you start a table in the 6atasheet 9iew, the =ibbon
becomes eDuipped with a new tab labeled $ields. The
sample fields and their configurations are distributed in
!arious sections. 5ne of the sections of the $ields tab is
named 1dd K 6elete:
4icrosoft 1ccess pro!ides many pre-configured fields you
can add to your table. These ready-made sample columns
are referred to as a $ield Templates. To use a field template,
while the table is displaying in 6atasheet 9iew:
0lic3 or right-clic3 the header of a column. This
would bring a menu from where you can select an
option
5n the table, clic3 the header column or a cell under
the column. In the 1dd K 6elete section of the $ields
tab of the =ibbon, clic3 the type of field you want
In the 1dd K 6elete section of the =ibbon, clic3 4ore
$ields to display a list and clic3 an option from that
menu

Columns aintenance in the
Datasheet $ie%

Im"orting a Table and its Columns
1lthough a column completely depends on a table, both
ob%ects are closely related when it comes to their
maintenance. In other words, the maintenance performed
on one ob%ect can directly affect the other. $or e"ample,
you can import a table from a te"t file or from another
application. 1 table cannot e"ist without at least one
column.
2electing a 0olumn
2ome operations will reDuire that you select a column but it
depends on the operation you want to perform. In some
cases, when any cell under a column has focus &for
e"ample if the caret is blin3ing in a cell of a column*, the
column is considered to be selected. 5therwise:
To select one column, position the mouse on its name
until the cursor points down and then clic3

To select columns in a range, clic3 and hold your
mouse on one of them, then drag to the left or to the
right to co!er the other desired column or columns.
7hen all desired columns are highlighted, release the
mouse
To select a range of columns, clic3 one column that
will be at one end, press and hold 2hift, then clic3 the
column that will be at the other end, and release 2hift
0hanging the 7idth of a 0olumn
If you create a table using one of the Table Templates or if
you get a table from a 6atabase Template, the columns of
the tables are wide enough to show their names. If you
create a table from scratch in the 6atasheet 9iew, 4icrosoft
1ccess assigns it a default width. That width can appear to
be too narrow or too wide. $or e"ample, when data e"ceeds
the regular width of a column, part of the information
would be hidden. If a particular column contains data that
you want to display at all times, you can enlarge the
column. 5n the other hand, if a column displays tinny
pieces of information, you can narrow the column to let it
%ust fit the data as desired. There are !arious techniDues you
can follow to widen or narrow a column.
To change the width of a column:
you can position the mouse on the right border of a
column header. The mouse pointer would change into
a hori;ontal double arrow crossed by a !ertical line:


If you double-clic3, the column would be resi;ed to
the widest !alue of the column, pro!ided the widest
!alue is wider than the column header. If the widest
!alue is narrower than the column header, the column
width would be widened enough to display the name
of the column.
8ou can clic3 the columns right border and drag in the
desired direction, left or right until you get the desired
width

8ou can right-clic3 a columns name and clic3 0olumn
7idth... This would open the 0olumn 7idth dialog
bo" where you can type the desired !alue and clic3
5K

oving a Column
If you find out that a particular column is misplaced in a
table, you can change its position.
To mo!e a column in 6atasheet 9iew, first select it. 0lic3
and hold your mouse on it. Then, start dragging left or right
in the desired direction. 7hile your mouse is mo!ing, a
thic3 !ertical line will guide you. 5nce the !ertical line is
positioned to the desired location, release the mouse:
To mo!e a group of columns, first select them as we
re!iewed earlier. 0lic3 and hold the mouse on one of the
selected columns. 2tart dragging left or right in the desired
direction until the thic3 !ertical guiding line is positioned
in the desired location, then release the mouse:
Inserting a Column
Inserting a column consists of adding one between two
e"isting fields. To do this, right-clic3 the column that will
succeed it and clic3 Insert $ield
'iding and #evealing a 'idden Column
If a table contains many columns and at one time you thin3
you dont need all of them, you can hide some. To hide a
column, you can drag the right border of its column header
completely to its left border as we saw earlier to change the
width of a columnL when the !ertical guiding line reaches
the left border, release the mouse: the column would be
hidden from the table:


To hide one or a group of columns, you can right-clic3 and
clic3 Hide $ields. 8ou can also right-clic3 any column and
clic3 :nhide $ields. This would open the :nhide 0olumns
dialog bo". Here is an e"ample:
To hide a column, clear its chec3 bo".
To re!eal a column or a group of columns pre!iously
hidden, right-clic3 any column header on the table and
clic3 :nhide 0olumn. In the :nhide 0olumns dialog bo",
put a chec3 mar3 on each column you want to show.
Deleting a Column
If you ha!e an undesirable column in a table, you can
delete it. It is important to 3eep in mind that if you delete a
column, it also goes with any information under it.
To remo!e a column from a table:
=ight-clic3 the columns name and clic3 6elete $ield
2elect the column &or a group of columns*, right-clic3
anywhere in the table and clic3 6elete $ield
2elect a column &or a group of columns*. Then, in the
1dd K 6elete section of the =ibbon, clic3 the 6elete
button
1ny of these actions would present you a warning to
confirm whether you still want to delete the column&s* or
you want to change your mind. If you still want to remo!e
the column&s*, clic3 8es.

You might also like