Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 148

European

Computer Driving
Licence ®

Syllabus 4
Module 5 - Database
Using Microsoft® Access XP

Release ECDL46v1
Module 5 Database ECDL

Published by

CiA Training Ltd


Business and Innovation Centre
Sunderland Enterprise Park East
Sunderland SR5 2TH
Tel: (0191) 549 5002
Fax: (0191) 549 9005
E-mail: info@ciatraining.co.uk
Web: www.ciatraining.co.uk

ISBN 1 86005 133 2


‘European Computer Driving Licence’ and ECDL and Stars device are registered trade
marks of The European Computer Driving Licence Foundation Limited in Ireland and other
countries. CiA Training Limited is an independent entity from the European Computer
Driving Licence Foundation, and not affiliated with the European Computer Driving Licence
Foundation in any manner. This booklet may be used in assisting students to prepare for the
ECDL Syllabus Version 4 Examination. Neither The European Computer Driving Licence
Foundation nor CiA Training Limited warrants that the use of this product will ensure passing
the ECDL Syllabus Version 4 Examination. Use of the ECDL-F Approved Courseware Logo
on this product signifies that it has been independently reviewed and approved by ECDL-F
as complying with the following standards:
Acceptable coverage of all the courseware content related to the ECDL Syllabus Version
4.0.
This courseware material has not been reviewed for technical accuracy and does not
guarantee that the end user will pass the ECDL Syllabus Version 4 Examination. Any and all
assessment items and/or performance based exercises contained in this booklet relate
solely to this booklet and do not constitute, or imply, certification by the European Computer
Driving Licence Foundation in respect of any ECDL Examination. For details on sitting ECDL
Examinations in your country please contact your country’s National ECDL/ICDL designated
Licensee or visit The European Computer Driving Licence Foundation Limited web site at
http://www.ecdl.com.
Candidates using this courseware material should have a valid ECDL/ICDL Skills Card/Log
book. Without such a skills card/log book no ECDL/ICDL tests can be taken, no ECDL/ICDL
certificate, nor any form of recognition can be given to a candidate. ECDL/ICDL Skills
Cards/Log books may be obtained from any Approved ECDL/ICDL Test Centre or from your
country’s National ECDL/ICDL designated Licensee.
References to the European
Computer Driving Licence (ECDL)
include the International Computer
Driving Licence Foundation
(ICDL). ECDL Syllabus Version
4.0 is published as the official
syllabus for use within the
European Computer Driving
Licence (ECDL) and International Computer Driving Licence (ICDL) certification programme.

Microsoft is a registered trademark and Windows is a trademark of the Microsoft


Corporation

© CiA Training Ltd 2003 2 Access XP


ECDL Module 5 Database

Aims
To demonstrate the ability to use a database application on a personal
computer.
To understand and accomplish basic operations associated with the Access XP
database.

Objectives
After completing the guide the user will be able to:

 Open, Save and Edit Databases

 Create a Table Structure

 Understand and use Table Relationships

 Format a Table

 Query a Table

 Create Forms

 Edit and Format Forms

 Create Reports

 Sort and Filter Data

Assessment of Knowledge
At the end of this guide is a section called the Record of Achievement Matrix.
Before the guide is started it is recommended that the user completes the
matrix to measure the level of current knowledge.
Tick boxes are provided for each feature. 1 is for no knowledge, 2 some
knowledge and 3 is for competent.
After working through a section, complete the matrix for that section and only
when competent in all areas move on to the next section.

Access XP 3 © CiA Training Ltd 2003


Module 5 Database ECDL

Contents
SECTION 1 DATABASES......................................................................................................7
1 - DATABASE PRINCIPLES......................................................................................................8
2 - STARTING ACCESS.............................................................................................................9
3 - MENUS AND TOOLBARS...................................................................................................10
4 - HELP.................................................................................................................................11
5 - OPENING AN EXISTING DATABASE..................................................................................13
6 - THE DATABASE WINDOW................................................................................................15
7 - CLOSING TABLES, DATABASES AND ACCESS..................................................................16
8 - REVISION..........................................................................................................................17
9 - REVISION..........................................................................................................................18

SECTION 2 TABLES............................................................................................................19
10 - MOVING USING THE MOUSE..........................................................................................20
11 - MOVING USING THE KEYBOARD...................................................................................22
12 - CREATING A NEW DATABASE: DESIGNING AND PLANNING..........................................24
13 - CREATING A TABLE STRUCTURE...................................................................................25
14 - FORMAT FIELD PROPERTY.............................................................................................28
15 - ENTERING DATA IN A TABLE.........................................................................................30
16 - DEFINING A PRIMARY KEY............................................................................................31
17 - INDEXES.........................................................................................................................32
18 - EDITING FIELD PROPERTIES...........................................................................................35
19 - VALIDATION RULES/TEXT.............................................................................................37
20 - PREVIEWING AND PRINTING A TABLE...........................................................................40
21 - PRINTING FROM A TABLE..............................................................................................42
22 - ADDING A NEW FIELD TO AN EXISTING TABLE............................................................44
23 - DELETING A TABLE........................................................................................................45
24 - REVISION........................................................................................................................46
25 - REVISION........................................................................................................................47
26 - REVISION........................................................................................................................48

SECTION 3 TABLE RELATIONSHIPS............................................................................49


27 - TABLE RELATIONSHIPS..................................................................................................50
28 - APPLYING RELATIONSHIPS............................................................................................52
29 - CREATING A ONE-TO-ONE RELATIONSHIP....................................................................55
30 - REFERENTIAL INTEGRITY...............................................................................................57
31 - UPDATING AND DELETING RECORDS.............................................................................58
32 - REVISION........................................................................................................................60
33 - REVISION........................................................................................................................61
34 - REVISION........................................................................................................................62

© CiA Training Ltd 2003 4 Access XP


ECDL Module 5 Database

SECTION 4 EDITING..........................................................................................................63
35 - CHANGING COLUMN WIDTHS........................................................................................64
36 - MOVING COLUMNS........................................................................................................65
37 - FINDING SPECIFIC TEXT.................................................................................................66
38 - USING WILDCARDS........................................................................................................67
39 - EDITING DATA...............................................................................................................69
40 - UNDO.............................................................................................................................70
41 - FURTHER EDITING..........................................................................................................71
42 - ADDING/DELETING RECORDS........................................................................................72
43 - EDITING SHORTCUTS......................................................................................................73
44 - REVISION........................................................................................................................74
45 - REVISION........................................................................................................................75
46 - REVISION........................................................................................................................76

SECTION 5 SORTING AND FILTERING........................................................................77


47 - SORTING DATA..............................................................................................................78
48 - USING FILTERS...............................................................................................................79
49 - FILTERS: EXCLUDING SELECTION..................................................................................80
50 - FILTER FOR....................................................................................................................81
51 - REVISION........................................................................................................................82
52 - REVISION........................................................................................................................83
53 - REVISION........................................................................................................................84

SECTION 6 QUERIES..........................................................................................................85
54 - QUERYING A TABLE.......................................................................................................86
55 - SORTING AND SAVING QUERY RESULTS.......................................................................89
56 - PRINTING QUERY RESULTS............................................................................................91
57 - QUERYING RELATED TABLES........................................................................................92
58 - EDITING QUERIES...........................................................................................................94
59 - RANGES OF VALUES.......................................................................................................95
60 - NON-MATCHES..............................................................................................................96
61 - AND QUERIES.................................................................................................................97
62 - OR QUERIES...................................................................................................................99
63 - DELETING A QUERY.....................................................................................................100
64 - REVISION......................................................................................................................101
65 - REVISION......................................................................................................................102

Access XP 5 © CiA Training Ltd 2003


Module 5 Database ECDL

SECTION 7 FORMS...........................................................................................................103
66 - FORMS..........................................................................................................................104
67 - AUTOFORM..................................................................................................................105
68 - FORM WIZARD.............................................................................................................107
69 - DESIGNING A FORM.....................................................................................................109
70 - EDITING FORM DESIGN................................................................................................111
71 - SORTING AND EDITING DATA......................................................................................112
72 - FILTERING IN A FORM..................................................................................................114
73 - PRINTING FROM A FORM..............................................................................................115
74 - DELETING A FORM.......................................................................................................116
75 - REVISION......................................................................................................................117
76 - REVISION......................................................................................................................118

SECTION 8 REPORTS.......................................................................................................119
77 - AUTOREPORT...............................................................................................................120
78 - GROUPED REPORT: WIZARD........................................................................................121
79 - MODIFYING A REPORT.................................................................................................124
80 - OTHER CALCULATIONS IN REPORTS............................................................................126
81 - PRINTING FROM A REPORT...........................................................................................127
82 - DELETING A REPORT....................................................................................................130
83 - REVISION......................................................................................................................131
84 - REVISION......................................................................................................................132

ANSWERS............................................................................................................................134

GLOSSARY..........................................................................................................................136

INDEX...................................................................................................................................137

RECORD OF ACHIEVEMENT MATRIX.......................................................................139

© CiA Training Ltd 2003 6 Access XP


ECDL Section 1 Databases

Section 1
Databases

By the end of this Section you should be able to:

Start Access

Recognise the Screen Layout

Use the Menus and Toolbars

Use Help and the Office Assistant

Open an Existing Database

Close a Table and Database

Exit Access

To gain an understanding of the above features, work through the Driving


Lessons in this Section.
For each Driving Lesson, read the Park and Read instructions, without
touching the keyboard, then work through the numbered steps of the
Manoeuvres on the computer. Complete the Revision Exercise(s) at the end of
the section to test your knowledge.

Access XP 7 © CiA Training Ltd 2003


Section 1 Databases ECDL

Driving Lesson 1 - Database Principles


Park and Read
A database is an organised collection of information, such as a telephone
directory, address book, etc. A database management system is a computer
program that allows a user to create, maintain and process database files.
An Access database can consist of a number of related items.
The information is held in the form of Tables which may be linked together in a
variety of ways to create larger and more powerful databases as the need
arises.
Each line of a table represents a separate RECORD, consisting of items of data
that belong together such as name, address and telephone number.
Each item of data within a record is held in a separate column of the table,
known as a FIELD.
Data can be presented in a FORM or a REPORT. Forms generally show one
record from a table on the screen, usually in a neat and easy to read manner.
Reports are usually presented so that they can be printed. They allow simple
calculations to be made on the numerical data.
QUERIES allow questions to be asked of the data and display only the
information required. Queries can include data from more than one related
table and once saved, they can also be used as the basis of a form or a report.
Other items, such as MACROS and MODULES automate the running of the
database, but will not be covered in this module.

© CiA Training Ltd 2003 8 Access XP


ECDL Section 1 Databases

Driving Lesson 2 - Starting Access


Park and Read
There are numerous ways to start the Access program. The following method is
recommended for beginners.

Manoeuvres
1. Starting your computer will automatically show the Windows desktop.

Click once on to show a list of the applications available.

2. Move the mouse pointer over Programs, and then click


on Microsoft Access . Access starts.
Depending on the individual installation, Access may be found within a group
folder, e.g. Microsoft Office or Microsoft Office XP.
3. If the Office Assistant displays a Tip of the Day click OK.
The top line is the Title Bar, Microsoft Access. Below that there is a Menu Bar
where commands are selected using the mouse. Below the Menu Bar is the
Toolbar, containing buttons that are used to access the most common menu
commands. Using the Toolbar greatly improves the speed of work on a
database. At the bottom of the screen is a grey bar, called the Status Bar,
where information is displayed relating to the current task.

At the right of the screen is an area called the Task Pane, which provides
options for performing some common tasks. It appears and changes depending
on the task currently being performed. On starting Access, the first Task Pane
deals with opening new databases or existing files. The Task Pane may not
appear at this stage if it has been switched off (see next manoeuvre).
4. At the bottom of the Task Pane is a Show at Startup box. Click in the
box to remove the check. Now the pane would not appear when Access
starts. Click again to check the box and request that the Task Pane does
appear.
5. To hide the Task Pane temporarily, select View | Toolbar | Task Pane or
click the Close button at the right of the pane title bar.
All four areas of the screen, the Menu Bar, Toolbar, Task Pane and Status
Bar, change according to the current task.
6. An Office Assistant may also be visible. Click the Close button, , to
remove it from the screen.

Access XP 9 © CiA Training Ltd 2003


Section 1 Databases ECDL

Driving Lesson 3 - Menus and Toolbars


Park and Read
The Menus and Toolbars are displayed at the top of the screen. Menus are
drop down lists of commands. Some commands may appear as pale grey text.
This indicates that these commands are not available for selection at the
moment.
Toolbars are a collection of buttons that perform some of the menu tasks and
are quicker to access.

Manoeuvres
1. Move the mouse pointer to the menu option File and
click once with the left mouse button. A short list will
appear as a drop down menu with Chevrons at the
bottom. This list shows the actions that can be
carried out. After a few seconds the list expands to
show all the items. (Double clicking on a menu
displays the full list immediately).
Menu options displayed in a pale font are called ghosted
and are not available to be selected at present.
2. From the new list, select Open. The Open dialog box
is displayed.
Any menu option followed by … leads to a dialog box
which requires more information to be supplied.
3. Click Cancel to remove the dialog box.

4. Any menu option followed by a , leads to another menu. Click on View


and then Toolbars. A list of available toolbars is displayed. Click View to
remove the displayed menus.

5. Move the mouse pointer over the New button in the toolbar. Leave the

pointer there for a few seconds. A ToolTip appears, describing the


actions of the button.
6. Move the mouse pointer over some of the other buttons on the toolbar to
see their actions.
7. To view other built-in toolbars, select View | Toolbars. This displays a list
of available toolbars. Click Web to display the Web toolbar, this toolbar is
normally displayed at the top of the screen.
8. To remove this toolbar, select View | Toolbars | Web again.

© CiA Training Ltd 2003 10 Access XP


ECDL Section 1 Databases

Driving Lesson 4 - Help


Park and Read
Access has a comprehensive Help facility. This means that full advantage can
be taken of the features incorporated in the program. Using Help can usually
solve the majority of problems encountered.

Manoeuvres
1. Open the Help menu and select Microsoft Access Help.

If the Office Assistant appears when this selection is made, close it by clicking
the Options button on the yellow dialog box, select the Options tab and
remove the checkmark on Use the Office Assistant to disable it. Click OK.
Select Help | Microsoft Access Help again.
2. Click the Contents tab if not already selected and if the Help window
does not fill the screen, click the Maximize button, .

3. Notice how the screen splits to show the help area in two sections. At the
left are the Contents, Answer Wizard and Index tabs, where all Access
help topics are available. At the right is the display area, which contains
the actual help requested. This area also contains topic headings (blue
text) which can be expanded to give further help text.

Access XP 11 © CiA Training Ltd 2003


Section 1 Databases ECDL

Driving Lesson 4 - Continued


If the full title of the help topic cannot be read, move the mouse pointer over the
area between the columns until it becomes a . Click and drag the area to the
right until the titles are visible.
4. Under the Contents tab click on the to the left of the Microsoft
Access Help entry to display more topics. This displays a list of general
topics, shown as books that, when opened, show a further list of choices.
Click on the to the left of the Working with data entry to display more
topics (use the scroll bars if necessary).
5. Expand Cutting, Copying and Pasting Items, then select Copy or
move data to display actual help text at the right of the screen.

A message may appear about the Index being prepared.

6. Move the mouse over any of the blue topic lines until it becomes and
click to expand the help under that heading.

The Show All hyperlink at the top right of the panel will expand the text for all
topics.
7. Read the help, then select the Answer Wizard tab on the left side of the
help screen. In the area provided, type How do I print? and click
Search.
8. Print a database object is selected and the help text is available. Click
some of the headings to expand the text and see more information.
9. Select the Index tab. This tab contains an alphabetical list of help topics.
When a key word is entered, a list of matches is retrieved.
10. Enter filter in the Type keywords area, then click Search. The Choose
a topic box displays the search results and shows the number of help
topics found.
11. Select Apply a filter, if not already selected and from the right side of the
screen click some of the topics to expand them. Read the help then click
the Back button, , at the top of the help window to move back one
page.

12. Click the Close button, , at the top of the help window to close Help.

13. The Answer Wizard function is accessible from the main screen using
the Ask a question box at the right of the Menu Bar. Enter Create a
form in the box and press <Enter>. Select Create a form from the drop
down list to display the Help screen for this topic.
14. Read the Help text and close the Help window.

© CiA Training Ltd 2003 12 Access XP


ECDL Section 1 Databases

Driving Lesson 5 - Opening an Existing


Database
Park and Read
A database consists of tables of data together with various other related items
used for viewing and working with the data. Each table, form, report, query,
etc. in a database is called an object.

Manoeuvres
1. Select File | Open or click the Open button, . The Open dialog box is
displayed.
2. In the Look in box the default location is My Documents. Double click on
the Ecdl folder, then the 5 Databases folder. A list of databases in the
folder is now visible.

If the data has been stored elsewhere, display that location in the Look in box.
3. Click on the file name Country and then click Open. The Country
Database Window is now visible.

Access XP 13 © CiA Training Ltd 2003


Section 1 Databases ECDL

Driving Lesson 5 - Continued


Opening Recently Used Databases. The last four databases that have been
used by Access are listed at the bottom of the File menu and can be quickly
opened. Select File from the menu, then click on the required database. The
New File Task Pane can also be used to open databases when Access first
starts (see Driving Lesson 10).
The opening of databases can be controlled by adding password protection. If
any database requires a password before it will open, the following dialog box
will appear.

Passwords are case sensitive and must be entered in the dialog box exactly as
set. None of the databases in this guide has a password, but be aware of their
use.

In some networked systems, a Security Account Password is required before


any databases can be opened. Contact your IT Administrator if this applies to
you.

© CiA Training Ltd 2003 14 Access XP


ECDL Section 1 Databases

Driving Lesson 6 - The Database Window


Park and Read
The starting point for all tasks in a database is the Database Window. From
this window it is possible to open, create or edit any of the objects (tables,
forms, etc.).
The type of object is chosen by clicking on the appropriate Object and then
either a new object is created (New), an existing one opened (Open/Preview),
or a design changed (Design).

Manoeuvres
1. Using the Country database, click Reports under Objects, to see if this
database has any reports defined. There are none, just two options to
create new reports.
2. Select Tables, to see a list of any tables in this database. There are two,
called Country and Regions.

Objects Bar

List of Available
Objects

3. Click on Country and then click the Open button, . This will open
the Country table. Maximise the window if necessary by clicking .
4. Click View and then Toolbars. A menu opens showing the different
toolbars that can be displayed.
5. Try selecting and then deselecting some options from this menu. Leave
the menu with the Table Datasheet and Formatting (Datasheet) toolbars
selected.

Access XP 15 © CiA Training Ltd 2003


Section 1 Databases ECDL

Driving Lesson 7 - Closing Tables, Databases


and Access
Park and Read
To remove a table, or any other object, from the workspace, select File | Close
or click the Close button at the far right of the Title Bar. The message Do you
want to save changes to the layout... may appear if the table format has
been changed.
Once all tables/objects have been closed, the database will probably need to
be closed.

When a message appears asking to Save, it is always referring to the format of


an item. Any data that is added to a database is automatically saved.

Manoeuvres
1. Select File | Close to remove the current table from the screen.

2. The table is closed and the Database Window is left on the screen.

3. Close the database by selecting File | Close again.

4. Close Access by selecting File | Exit.

5. Start Access again.

6. Close Access using the Close button, , on the Title Bar.

© CiA Training Ltd 2003 16 Access XP


ECDL Section 1 Databases

Driving Lesson 8 - Revision


This Driving Lesson covers the features introduced in this section. Try not to
refer to the preceding Driving Lessons while completing it.

1. Start Access.

2. Open Cia database from the data folder, 5 Databases, within My


Documents and Ecdl.
3. Open the Customer Details table.

4. Display the Web toolbar and then remove it.

5. Use ToolTips to discover the functions of all the buttons.

6. Close the table and the database.

7. Open any database from the Ecdl data folder.

8. Now open a table within the database and then close it without making
any changes.
9. Close the database.

10. Use the Index from Help Topics to find information About creating a
table.
11. Close Help.

If you experienced any difficulty completing the Revision, refer back to the
Driving Lessons in this section, then re-do the revision.

Access XP 17 © CiA Training Ltd 2003


Section 1 Databases ECDL

Driving Lesson 9 - Revision


This Driving Lesson covers the features introduced in this section. Try not to
refer to the preceding Driving Lessons while completing it.

1. Open the database Houses and the table Location.

2. Maximise the table.

3. Click on Help | Microsoft Access Help.

4. Use the Index to find information on Table: About tables.

5. Read this information carefully, as it will be useful shortly.

6. Click on the Answer Wizard and search using the word views.

7. Read the information on Switch between views of a database object,


then show the information on Switching between views of a …. table.
8. Click on Contents and then click to open the Microsoft Access Help
book.
9. If necessary, use the scroll bars so that the whole of each line can be
read.
10. Click to open the Tables subject and then open Adding and Deleting
Fields. Display the information on Add a field to a table.
11. Click on the first topic Add a field to a table in Design view.
12. Read this information to prepare for creating a table.
13. Close Help.
14. Close the Location table and the Houses database.
15. Close Access.

If you experienced any difficulty completing the Revision, refer back to the
Driving Lessons in this section, then re-do the revision.
Once you are confident with the features, complete the Record of Achievement
Matrix referring to the section at the end of the guide. Only when competent
move on to the next Section.

© CiA Training Ltd 2003 18 Access XP


ECDL Section 2 Tables

Section 2
Tables

By the end of this Section you should be able to:

Use the Mouse and Keyboard to Move

Create a New Database & Table

Format and Edit Field Properties

Define a Primary Key

Create Index Fields

Enter Data in a Table

Create Validation Rules and Text

Print All and Parts of a Table

To gain an understanding of the above features, work through the Driving


Lessons in this Section.
For each Driving Lesson, read the Park and Read instructions, without
touching the keyboard, then work through the numbered steps of the
Manoeuvres on the computer. Complete the Revision Exercise(s) at the end of
the section to test your knowledge.

Access XP 19 © CiA Training Ltd 2003


Section 2 Tables ECDL

Driving Lesson 10 - Moving Using the Mouse


Park and Read
To view more of a table, the Scroll Bars at the bottom and right edges of the
screen can be used. To move quickly through the records, there are five
Navigation Buttons on the Status Bar.
The Status Bar also shows which record is in use at the moment, the total
number of records and also the view being used, i.e. in a Datasheet View
(table) or a form, etc.

Previous Record Record Number Next Record New Record

First Record Number of Records

Type of View Last Record

Manoeuvres
1. Start Access. From the New File Task Pane, select the Country
database from the list or select More files, and select Country from the
location used earlier.
2. Open the Country table and maximise it.

The current view is known as the Datasheet View. This view shows all the
information that is contained in the table.
3. The table is arranged in rows and columns. Each row (Record), contains
data about a specific country. The Country Field is the first column,
listing all the countries in the database.
4. Move the mouse pointer over the middle of the Region field of Brazil
(South America). The mouse pointer should be a . Click the mouse.
5. There will now be a flashing cursor within the field. Using the mouse, click
and drag part of the field contents. The letters will be highlighted when
selected, ready to be edited if necessary.
6. Click the Previous Record button as shown, to move up a record.

© CiA Training Ltd 2003 20 Access XP


ECDL Section 2 Tables

Driving Lesson 10 - Continued


7. Record 5 is shown. Click the Next Record button to move down a record.

8. Record 6 is shown. Click the Last Record button to move to the bottom of
the table.

9. Record 47 is shown. Click the First Record button to move to the top of
the table.

10. Click on the Right arrow in the horizontal scroll bar to scroll right by one
column (the first column displayed is Region).

11. Click on the Left arrow to view the first column again.

12. Move the mouse pointer to the left edge of the Capital field of Australia.
The mouse pointer should change to (this may take some practise).

13. Click the mouse to select the entire field.


14. Practise moving around the table using the various methods described.
15. Leave the table on screen for the next Driving Lesson.

Access XP 21 © CiA Training Ltd 2003


Section 2 Tables ECDL

Driving Lesson 11 - Moving Using the


Keyboard
Park and Read
The keyboard may be used to move about the table instead of the mouse. The
following keys are used to move from field to field and record to record. Note
that many of these movements only work when the entire field is selected.

 moves one column to the right.

 moves one column to the left.

 moves one record down.

 moves one record up.

Page Down key moves one screen down.

Page Up key moves one screen up.

End key moves to end of record.

Home key moves to start of record.

Tab key moves one column to the right.

<Shift Tab> key moves one column to the left.

<Ctrl Home> key moves to the top of the table.

<Ctrl End> key moves to the bottom of the table.

When two keys are mentioned such as Ctrl and End, the first key (Ctrl) should
be held down while the other key (End) is pressed and released.
Using the keys mentioned moves the cursor around the table by one whole
record or field. To display the flashing cursor and then move within the field
itself, it is necessary to press <F2> or click with the mouse in the middle of the
field contents. Movement within a field is dealt with later.

© CiA Training Ltd 2003 22 Access XP


ECDL Section 2 Tables

Driving Lesson 11 - Continued


Manoeuvres
1. With any field selected, except the first field of the first record, press <Ctrl
Home> to move to the top of the table, first record, first field.
2. Press  to move to the next field, the Region field.

3. Keep pressing  to move right to the last field, Language. Press  again
and the cursor moves to the first field on the next record.
4. Press the <Page Down> key to move down by one screen.

5. Press <End> to move to the end of a record.

6. Move to the top of the table by pressing <Ctrl Home>.

7. Press <F2>. The flashing cursor is now visible. The content of the cell
could now be changed. Press <F2> again to select the field.
8. Press <F5>. The record number becomes highlighted and the Status Bar
shows Enter New Value.

9. Type in 34 and press <Enter>. The Country field for the 34th record
becomes highlighted – Norway.
10. Click on the Region field for Norway and press <F5>.
11. Enter 21 as the New Value. Press <Enter>. The Region field for the 21st
record becomes highlighted – Middle East.
12. Practise moving about the table using the keyboard.
13. Close the table and then the database without saving any changes, if
prompted.

A common way of moving about in a table is to use the keys for moving from
one record or field to the next and to use the mouse for moving from one area
of the table to another.

Access XP 23 © CiA Training Ltd 2003


Section 2 Tables ECDL

Driving Lesson 12 - Creating a New Database:


Designing and Planning
Park and Read
A well-designed database is the key to efficient management of information.
Spending time at the design stage can save problems later. It is important to
decide exactly what information is needed and how that information is to be
used. It is a good idea to think “backwards” when designing databases, i.e.
decide what information is needed from the database and then design the
tables, etc. to achieve those aims.

Manoeuvres
1. Select File | New, or click the New button, .

2. The New File Task Pane appears. The list of


recently used files may be different, dependent
on previous usage.
3. Click Blank Database under New.

4. In the File New Database box, if the folder 5


Databases is not displayed, double click Ecdl.
5. Double click the 5 Databases folder (or a
different location, if required).
6. In the File name box, enter Pets.

7. Click the Create button, .

8. The new database window is now visible. Leave it on the screen for the
next Driving Lesson.

© CiA Training Ltd 2003 24 Access XP


ECDL Section 2 Tables

Driving Lesson 13 - Creating A Table Structure


Park and Read
The table is the basic building block of a database. It will contain the
information that is to be stored. When designing a table Field Names and Data
Types are created. These are the first things to be decided.
There are ten different types of data that can be stored in an Access table. The
commonly used ones are:
Text, which allows text and numbers to be stored
Number, which allows only numbers to be stored
Date/Time stores date and time formats
Currency inserts a currency sign and decimal point.

Manoeuvres
1. With the Pets Database Window visible from the previous Driving
Lesson, ensure the Tables is selected and click .

2. From the New Table dialog box, choose Design View, then OK. The new
database design window is now visible.

Design View is the view that allows the structure of the table to be defined or
amended. Datasheet View allows the actual data to be seen and maintained.

Access XP 25 © CiA Training Ltd 2003


Section 2 Tables ECDL

Driving Lesson 13 - Continued

3. This is where the Field Names are determined and how the data in that
field will be displayed – Data Type. The cursor should be in the first row
in the first column, under Field Name. In this position, type Animal. Press
<Tab> to move to the next column.
4. Some new information appears at the bottom left of the screen and the
word Text appears in the Data Type column. Press <Tab> to select the
default value of Text.
5. The cursor is now in the Description column, this column is optional.
Enter the text Type of animal into this column and then press <Tab>.
6. The cursor is now in the next row down, in the Field Name column. Enter
the words Date Sold and press <Tab>.
7. In the Data Type column, click on the drop down list button beside the
word Text. A list of all possible data types is shown.

8. Use the mouse to select the type Date/Time, then press <Tab>.

9. In the Description column enter Date animal was sold then press
<Tab>.
10. In the next Field Name, type Price <Tab> and in Data Type select
Currency <Tab>. The description is Price of animal. Press <Tab>.

© CiA Training Ltd 2003 26 Access XP


ECDL Section 2 Tables

Driving Lesson 13 - Continued


11. The last Field Name is Number Sold, the Data Type is Number and the
Description is Number of animals sold.
12. This table structure is now complete.

13. The table must be given a name and saved. Click the Save button, .

14. Enter the Table Name as Pet Details, then click OK.
15. A message appears regarding Primary Keys. These are dealt with at a
later stage. For now, click No to save the table without a primary key.
16. Click on the drop down arrow next to the View button.

17. There are four options available. The Design View is open now. Click on
Datasheet View. The table is ready to accept data. This will be done at
a later stage.

18. Switch back to Design View for the next Driving Lesson.

Access XP 27 © CiA Training Ltd 2003


Section 2 Tables ECDL

Driving Lesson 14 - Format Field Property


Park and Read
When designing tables and applying a data type, the data being entered can be
customised by having certain properties attributed to it, e.g. the length of text
allowed or the date formatting. Field Properties can be applied in Design
View.

Manoeuvres
1. The Design View of the Pet Details table should be open from the
previous Driving Lesson, if not, open it.
2. Place the cursor in the Field Name column for the Animal row. The Field
Properties will appear in the bottom left area of the window.

3. Click in the Field Size property from the General tab. Helpful information
is given in blue on the right.
4. Delete the existing value by pressing <Backspace> twice. Type in 20.
This means that this field will only allow 20 characters to be entered into it.
5. Click in the Date Sold field. The Field Properties are different for this
type of field.

© CiA Training Ltd 2003 28 Access XP


ECDL Section 2 Tables

Driving Lesson 14 - Continued


6. Click in the Format property for this field. Drop down the arrow to reveal
the choices for the date format. Click on Medium Date.

7. The format of the date is shown in the drop down list. No matter how the
date is entered, i.e. 1/2/2 or 1 Feb 2002, it will be displayed as 01-Feb-02.
8. The Price field requires no changes. Click on the Number Sold field.
Use the Field Size drop down list to change the size from Long Integer
to Integer.

9. Notice that Access has automatically defined this field as Indexed. Cancel
this by clicking the Indexed property and then use the drop down list to
change the setting to No.

10. Save the changes to the table by clicking and return to Datasheet
View.

By default, the table is saved with the same name.


11. The table is now ready to receive data.

Access XP 29 © CiA Training Ltd 2003


Section 2 Tables ECDL

Driving Lesson 15 - Entering Data in a Table


Park and Read
Now that a table structure has been defined, the next stage is to add data to
the table. Data is automatically saved as it is entered. Data is usually entered in
Datasheet View (to switch to Datasheet View, click the Datasheet button,
, or select View | Datasheet).

Manoeuvres
1. The Pet Details table should be open from the previous Driving Lesson.

2. The empty table is visible. The field names are as entered in a previous
Driving Lesson and the Description for the currently selected field now
appears in the Status Bar in the bottom left corner. The two numerical
fields may have zeros in them by default.
3. In the Animal column, type the word Dog.

4. Press <Enter> to move to the next field.

5. Enter the date it was sold as 24/2/02 <Enter>, the price as 29.95
<Enter>, (do not enter any pound signs - this will be formatted
automatically) and the number sold as 1 <Enter>. The cursor will now be
in a position (under Dog) to enter the next line of data.
6. Type the following data, exactly as displayed, into the table, remembering
to press <Enter> after each entry. Note that no matter how the data is
entered it will be displayed as entered in the Field Property.
Animal Date Sold Price Number Sold
Toad 25/3/02 1.5 6
Cat 9/4/02 17.95 2
Goldfish 1 May 02 2.25 11
Snail 22/6/02 1.1 34
7. Select File | Close to close the table and return to the Database
Window.

The data that was entered into the table is saved automatically.
8. Select File | Close to remove the Pets database from the screen.

© CiA Training Ltd 2003 30 Access XP


ECDL Section 2 Tables

Driving Lesson 16 - Defining a Primary Key


Park and Read
A database will often contain more than one table. In fact, it is desirable to have
many small tables in a database rather than one large one, as this improves
the efficiency of the database.
For these databases in particular, it is usual to use Primary Key fields. A
primary key field is one that uniquely identifies each individual record in a
table. This is often a number such as a serial or ID number. Duplicate values
are not allowed in a primary key field.
It is common to have the table records sorted on the Primary Field. This is
done automatically. Using a primary key field allows tables to be linked together
and also improves the efficiency of data retrieval and editing.

Manoeuvres
1. Open the database Daley.

2. At the database window, click on the table Vehicles and then click the
Design button to open the table in Design View.
3. The field name Reg No should be highlighted. If not, click on it.

4. Click the Primary Key button, , on the toolbar to make this field the
Primary Key.
5. Click the Datasheet View button. The following dialog box appears.

6. Click Yes to save the table. The table will open with the records sorted in
alphabetical order of Reg No.
7. Close the table.

8. Close the database.

Access XP 31 © CiA Training Ltd 2003


Section 2 Tables ECDL

Driving Lesson 17 - Indexes


Park and Read
An index helps to sort and find entries faster. If a field is set as indexed, that
field will automatically be sorted whenever the table is opened. This is similar to
setting a Primary Key, but indexing can be set on more than one field and the
fields are sorted in turn. A Primary Key is automatically indexed.

Manoeuvres
1. Open the database Country and the Regions table in Design View.

2. Click in the Region field,


then click in the Indexed
field property. From the
drop down list, select Yes
(Duplicates OK). Click
the Datasheet View
button and Yes to save
the table.
3. The table will open with
the data sorted in alphabetical order of Region. No other fields will be
sorted.
Normally, if the table was to be sorted on only one field, the sort buttons,
and , would be used.

4. Return to Design View and click the Indexes button, , on the toolbar
to open the Indexes dialog box.
The first index, created from the Region field property box, is shown in the
Indexes dialog box.
5. Click in the Field
Name box of the
second row. Click the
drop down arrow and
select Country from
the list. The Sort
Order will default to
Ascending. Leave
the second row Index
Name box empty.

© CiA Training Ltd 2003 32 Access XP


ECDL Section 2 Tables

Access XP 33 © CiA Training Ltd 2003


Section 2 Tables ECDL

Driving Lesson 17 - Continued


6. Close the Indexes dialog box and click the Datasheet View button. Click
Yes to save the table.
7. The table will open and this time the data will be sorted in order of
Country, within the groups already sorted by Region.

8. Return to Design View and open the Indexes dialog box.

9. Position the mouse pointer on the Selector Bar, pointing to the row of the
dialog box containing the Index name Region.
10. Click and drag downwards to select the first and second rows.

Selector
Bar

11. Press <Delete> to remove the entries from the Indexes dialog box.
12. Close the dialog box, click the Datasheet View button and click Yes to
save the table.
13. The table will open, with the data in its original order.
14. Return to Design View and click in the Country field.

© CiA Training Ltd 2003 34 Access XP


ECDL Section 2 Tables

Access XP 35 © CiA Training Ltd 2003


Section 2 Tables ECDL

Driving Lesson 17 - Continued


15. Change the Indexed Field Properties to Yes (No Duplicates). This does
not allow identical values to be entered in this field.
16. Save the table and switch to Datasheet View.
17. Go to the end of the table and click in the blank record in the Country
field.
18. Type in UK. With the No duplicates index, if UK appears already in the
field, then this second entry will not be allowed.
19. Click in the row below the new UK entry (as if the record had been
completed). A dialog box appears warning of the duplication.

20. Click OK. Close the table. The dialog box appears again. Click OK.
21. This time a warning that this duplicate entry cannot be saved will appear.

22. Click Yes to close the object anyway.


23. Open the Regions table again and check that there is no duplicate entry –
there are still only 47 records.
24. Close the table and the database.

© CiA Training Ltd 2003 36 Access XP


ECDL Section 2 Tables

Driving Lesson 18 - Editing Field Properties


Park and Read
Once Field Properties have been set in Design View for a table, they can still
be edited if circumstances change or if it is realised that the full extent of the
field will never be used. Unused areas make the database inefficient.
You may need to change properties for instance, if a Surname Field Size is set
at the default 50 characters - it is unlikely that all the characters will be used, or
if it is decided that a different date format is required from that first used.
However, consideration must be given to the consequences of changing any
attribute. These changes are being made to tables that already contain data,
so changing the Field size to 20 characters of a Field that has more than 20
characters in it will display a warning dialog box.

Manoeuvres
1. Open the Staff database. Open the Staff table in Design View.

2. Click in the Surname field. It has a Field Size of 50 - the default setting.
Not many people have such a long Surname, so this may be altered.
3. Click in the Field Size property, delete the existing number and type in 20
– a more appropriate size.
4. Similarly, change the size of the Title field to 5, the First Name field to 15
and the Position field to 20.
5. Click in the Date of Employment field. Drop down the Format options
available and select Short Date. Do the same for the Date of Birth field.
Remember, regardless of how the date is now entered it will appear in the
table in this format.
6. Click in the Salary field. Drop down the Format list and select Currency
(note also that there is a Euro option). Decimal places are set to Auto.
For currency Access assumes 2 decimal places.

Access XP 37 © CiA Training Ltd 2003


Section 2 Tables ECDL

Driving Lesson 18 - Continued


7. Click on Employee No and then drop down the list in Field Size.

8. There are several options that may not be easily understood. Press <F1>
to display the Help for number selection. Read about the options before
closing Help.
9. Save the table. Because the size of some fields has been reduced, a
warning dialog box appears.

10. Click Yes. No data is lost on this occasion, but be aware for any future
changes, that data could be truncated when fields are resized. Any data
lost in this way cannot be retrieved.
11. Leave the table open for the next Driving Lesson.

© CiA Training Ltd 2003 38 Access XP


ECDL Section 2 Tables

Driving Lesson 19 - Validation Rules/Text


Park and Read
Validation Rules are used to set the requirements of the text that the user
enters into a particular field. It defines the only permitted entries that the user
may make.
If text is entered which breaks the validation rule, a message displaying some
pre-set Validation Text will be displayed, as defined by the user.
Validation rules and text are defined in the Field Properties when viewing a
table in Design View.

Manoeuvres
1. The Staff table should still be open in Design View from the previous
Driving Lesson.
2. Select the Title field and position the cursor in the Validation Rule field
property. Enter the following text:
Mr or Mrs or Miss or Ms
3. This defines the permitted entries for this field. Only these 4 titles will be
allowed. In the Validation Text property, enter:
The title must be one of the following: Mr, Mrs, Miss or Ms.

This defines the message that will appear if any text is entered that does not
match the list defined in the Validation Rule.

Access XP 39 © CiA Training Ltd 2003


Section 2 Tables ECDL

Driving Lesson 19 - Continued


4. Save the table. As a new rule has been defined, the data that is currently
in the table may not now be valid. The following message will appear:

5. There are now 3 options. Yes will test the existing data with the new rule.
No will not test the existing data but will apply the validation to all new
records. Cancel will return to the Design View.

If Yes is selected and a record has a field entry which does not match the
Validation Rule, a dialog box will appear giving options to keep the new
settings, revert to the old settings or to stop testing. A selection will need to be
made.
6. Click Yes to apply the rule, and check in Datasheet View that the existing
data fits the rule. All of the existing data should already fit the rule.
7. Start a new record. Enter an Employee No of 1050. In the Title field enter
Dr. Press <Tab>. The following message appears.

8. This is because Dr does not match any of the entries in the Validation
Rule. Click OK.
9. Enter your own title in the Title field (as long as it satisfies the rule). Press
<Tab>. As it is included in the Validation Rule the entry will be allowed.
Fill in the rest of the record with your own details.
10. Switch to Design View. Click in the NI Number field. In the Validation
Rule for this field type in Like “??######?” where ? represents a letter
and # represents a number.

© CiA Training Ltd 2003 40 Access XP


ECDL Section 2 Tables

Driving Lesson 19 - Continued


11. The Validation Text should read:
The NI Number must begin with two letters, followed by six
numbers and then a single letter.
12. All salaries must be greater than the minimum wage, which at the time of
writing is £7,888. Set the Validation Rule for Salary as >7888 and the
Validation Text as The salary must be more than the National
Minimum Wage.
13. Dates can also have validation rules applied. Click in the Date of
Employment field and in Validation Rule enter <=Now(). This will
ensure that the employment date cannot be after today.
14. Make the Validation Text - Check your date!.
15. Save the table and switch to Datasheet View. The Data Integrity dialog
box will appear, select Yes.
16. To test the rules, try to add the following record, changing to the
alternative options on the second line when any value is rejected:
987, Dr, Jones, Tom, MD, Tomorrow’s date, M12345AJ, 6000, 2/05/60
Mr 10/04/02 JM123456A 46000
17. Close the table and the database.

Access XP 41 © CiA Training Ltd 2003


Section 2 Tables ECDL

Driving Lesson 20 - Previewing and Printing a


Table
Park and Read
Once a table has been formatted as required, it can easily be printed. A table
may be previewed before printing to check its layout.

Manoeuvres
1. Open the Pets database and the Pet Details table.

2. Click the Print Preview button to preview the table, as it will appear
when printed.
3. Positioning the mouse over the page changes it to . Click once in the
page to zoom in (or click the Zoom button, , on the toolbar).

4. The mouse pointer now changes to . Click in the page to zoom out (or
click the Zoom button, ).
5. Select View | Zoom from the menu. Select the different zoom levels to
view the table. The current view is shown.

6. Select 200%.

7. From the Standard Toolbar click on the drop down menu of the Zoom
box to choose zoom levels. Select Fit to adjust the preview to fit the whole
page on the screen.

© CiA Training Ltd 2003 42 Access XP


ECDL Section 2 Tables

Access XP 43 © CiA Training Ltd 2003


Section 2 Tables ECDL

Driving Lesson 20 - Continued


8. Select File | Page Setup from the menu.

9. Click the Page tab, then from Orientation click Landscape.

10. Click OK. The preview changes.

11. Click to Print the table.

12. Use File | Page Setup to change the Orientation back to Portrait.

13. Click to close Print Preview and return to Datasheet View.

14. Close the Pet Details table without saving the changes.
15. Close the Pets database.

© CiA Training Ltd 2003 44 Access XP


ECDL Section 2 Tables

Driving Lesson 21 - Printing From a Table


Park and Read
In a larger table, only part of it may be required as a hard copy. Once it has
been previewed, perhaps only the data on the second page is required, or only
the information in certain records. These parts are defined in the Print dialog
box.

Manoeuvres
1. Open the Country database and table.

2. Preview the table, using Print Preview button as before.

3. Click the Multiple Pages button , and select 1 x 2 Pages.

4. Note the way the table is split over the pages. Select File | Page Setup,
and change the orientation to Landscape from the Page tab. The manner
in which the table is divided has changed.
5. Select File | Print. The Print dialog box appears.

Access XP 45 © CiA Training Ltd 2003


Section 2 Tables ECDL

Driving Lesson 21 - Continued


6. In the Print Range area click in Pages and type 1 in the From box and 1
in the To box.

7. Click OK to print page 1 only. Close Print Preview.

8. In the Country table, move the cursor to the left of the table into the
Selector Bar, until it becomes .
9. Click and drag down all the countries beginning with A. They will now be
highlighted.

10. Select File | Print. From the Print Range area click Selected Records.

11. Click OK to print only the 4 records.


12. Close the table and the database.

© CiA Training Ltd 2003 46 Access XP


ECDL Section 2 Tables

Driving Lesson 22 - Adding a New Field to an


Existing Table
Park and Read
New fields can be added to a table, after data has been entered in other fields.
Consideration must be given to data required in the new field for existing
records.

Manoeuvres
1. Open the Pet Details table from the Pets database. It has been decided
that a profit calculation will need to be done later. The buying price of
each animal needs to be entered.
2. Switch to Design view. Click in front of the word Price and edit it to
Selling Price.
3. Click on the Date Sold field. The new field is to be entered above this
one.

4. Click the Insert Rows button . The cursor is now flashing in the Field
Name of the new row.
5. Type in Buying Price, change the data type to Currency and the
description to Wholesale price.
6. Save the changes and switch to Datasheet view.

7. Note the new field names and the empty Buying Price field.

8. Enter the following buying prices (use the down arrow to move to the next
record): Dog: 20, Toad 0.75, Cat 10, Goldfish 1.5, Snail 0.75.
9. Close the table and the database.

Access XP 47 © CiA Training Ltd 2003


Section 2 Tables ECDL

Driving Lesson 23 - Deleting a Table


Park and Read
If a table is no longer required then it can be deleted. However, after
answering Yes at the warning dialog box, this decision cannot be changed.
The table is not sent to the Recycle Bin, but deleted immediately.

Manoeuvres
1. Open the database Mailing.

2. Click on the Old Mail table, but do not open it.

3. Select Edit | Delete. A warning dialog box appears.

4. Select No at this time to leave the table intact.

5. Locate the Delete button , next to New in the Database Window.

6. Click on it. Again the warning dialog box appears.


7. Click Yes. The table is deleted.

8. Close the Database Window.

© CiA Training Ltd 2003 48 Access XP


ECDL Section 2 Tables

Driving Lesson 24 - Revision


This Driving Lesson covers the features introduced in this section. Try not to
refer to the preceding Driving Lessons while completing it.

1. Create a database consisting of the following data. Name the database


and table Friends.
2. Enter the records as shown below. Set the Primary Key as Number
(remember that a Primary Key has to be unique).

Field (Number) Field (Text) Field (Text) Field Field (Number)


(Date/Time)
Number Surname First Name Date of Birth Height (cms)
Record 1 Ransom Hilary 24/2/86 123
Record 2 White Shirley 25/4/85 116
Record 3 Hays Billy 9/4/86 122

3. Add a new field Telephone Number before the date of birth field. Make
the data type Text with 15 characters. Add appropriate numbers in
datasheet view.

The telephone number is added as text because there will be no calculation


done on the number and it is easier to add a leading zero in text mode.
4. Close the table and the database.

If you experienced any difficulty completing the Revision, refer back to the
Driving Lessons in this section, then re-do the revision.

Access XP 49 © CiA Training Ltd 2003


Section 2 Tables ECDL

Driving Lesson 25 - Revision


This Driving Lesson covers the features introduced in this section. Try not to
refer to the preceding Driving Lessons while completing it.

1. Create a database named Rivers.

2. Create a new table, and add fields as below with appropriate data types.

3. Save the table as Rivers - do not set a Primary Key at this point.

4. Enter data as shown below.


Continent River Length (kms)
Africa Nile 6695
America Amazon 6280
Asia Yangtze 4990

5. Set an Index on Length, Duplicates OK and in Ascending order and


close the table.
6. Open the table again and notice the changes in the order of the records,
as indexed by length, shortest first.
7. Add a validation rule to the Continent field, so that only the five main
continents can be added: Africa, America, Europe, Asia, Australasia.
8. Add validation text explaining the rule.

9. Add 2 further records as follows:


Mississippi It is 6270 kms long and is on the American
Continent.
Zaire It is 4670 kms long and is on the African
Continent.
10. Close the table and open it again to allow the index to reorder the records.
11. Preview and print the table.
12. Close the table and database.

If you experienced any difficulty completing the Revision, refer back to the
Driving Lessons in this section, then re-do the revision.

© CiA Training Ltd 2003 50 Access XP


ECDL Section 2 Tables

Driving Lesson 26 - Revision


This Driving Lesson covers the features introduced in this section. Try not to
refer to the preceding Driving Lessons while completing it.

1. Open the Houses database and the Houses table.

2. Print Preview the table and change the orientation to Landscape.


3. Print out only page 1.
4. Close the table and the database.
5. Open the database Cia and the table Customer Details in Design View.
6. This table does not have a Town field in the address.
7. Insert a new field before County and call it Town. It is a Text data type
and there should be 30 characters allowed.
8. Save the table and switch to Datasheet View.
9. Add data as follows:
Customer Ref 22 Banbury
23 Joincey
26 Kirkley
28 Braemoor
29 Monmouth
31 Keswick
10. The following towns have been entered in the County field in error.
Delete the data from the County field and enter it in the Town field.
Customer Ref 24 Newcastle
25 Boston
27 London
30 Derby
11. Towns and Counties should appear as shown
opposite. Close the table and the database.

If you experienced any difficulty completing the Revision, refer back to the
Driving Lessons in this section, then re-do the revision.
Once you are confident with the features, complete the Record of Achievement
Matrix referring to the section at the end of the guide. Only when competent
move on to the next Section.

Access XP 51 © CiA Training Ltd 2003


Section 3 Table Relationships ECDL

Section 3
Table Relationships

By the end of this Section you should be able to:

Understand and Apply Relationships

Create Various Types of Relationship

Delete Relationships

Apply Referential Integrity

Understand the Implications of Referential Integrity

To gain an understanding of the above features, work through the Driving


Lessons in this Section.
For each Driving Lesson, read the Park and Read instructions, without
touching the keyboard, then work through the numbered steps of the
Manoeuvres on the computer. Complete the Revision Exercise(s) at the end of
the section to test your knowledge.

© CiA Training Ltd 2003 52 Access XP


ECDL Section 3 Table Relationships

Driving Lesson 27 - Table Relationships


Park and Read
Tables in a database are related so that data need not be repeated. For
instance, if a company has one address, but several contacts, then the address
details will be held in one table and the contact details in another. This is
known as a One-To-Many Relationship – one record in the first table (Table A)
is related to many records in the second table (Table B).
Tables are related using key fields in each table. In Table A, the key field will
probably be the Primary Key. The matching field in Table B will have the
same field name and is known as the Foreign Key.
Another type of Relationship is One-To-One. This has one record in Table A
matching only one record in Table B. This is used when the table has a huge
number of fields or if part of the table must be hidden from general view. This
type of relationship is not very common.

Manoeuvres
1. Open the database Staff. There are two tables in this database that are
linked by Employee No.

2. Click the Relationships button on the toolbar. The Relationships


window is displayed. Both of the tables, Staff and Courses are displayed
with a line joining the linked fields. The line displays a 1 and an 
showing that this is a One-To-Many relationship, i.e. one employee may
be involved in many courses. In the Staff field list Employee No is in
bold. This denotes that this field is the Primary key.

Access XP 53 © CiA Training Ltd 2003


Section 3 Table Relationships ECDL

Driving Lesson 27 - Continued


3. Close the Relationships window and the database.

4. Open the database Houses. Open the Relationships window.

5. Note that both of the linked fields are bold, i.e. are Primary keys (click on
a different field in the Location table to see this more clearly). Because
Primary keys are unique in a table, this must represent a One-to-One
relationship, i.e. one record in the Location table is related to only one
record in the House details table.

If Referential Integrity were applied to this relationship (see Driving Lesson 30)
there would be a 1 at either end of the linking line indicating One-to-One.
6. Close the Relationships window and open the Location table. Notice
that tables in a relationship have an expand button next to each record.
7. Click on the expand button next to record 6. The related data is shown.
This is called a Subdatasheet. Note there is only one related record.

8. Click on the minus sign (collapse button) to close the related table, then
close the table and the database.
9. Open the Staff database and the Staff table. Remember the relationship
between the Staff and Courses tables is One-to-Many.
10. This time click on the expand button next to record 6 – Anthony Myers.
This employee has taken two courses as shown.

11. View other related records before closing the table and the database.

© CiA Training Ltd 2003 54 Access XP


ECDL Section 3 Table Relationships

Driving Lesson 28 - Applying Relationships


Park and Read
Once tables have been designed and primary keys applied, a Relationship
may be applied between two or more tables to link them together.
Relationships are applied between tables that contain a common field. Usually,
the related field in one table is the primary key field and so this table is the
Primary Table.
Applying relationships allows many smaller tables to be linked together to form
the complete database, improving its overall efficiency.

Manoeuvres
1. Open the database Daley.

2. Click the Relationships button, , found on the main toolbar. The


Relationship window will be empty as there are no relationships currently
defined.
3. If the Show Table dialog box does not appear, click the Show Table
button, , on the Toolbar.

Alternatively right click on the Relationship window and select Show Table
from the shortcut menu.
4. With the Tables tab selected, click on Vehicles to highlight it, then click
to place that table in the Relationships window.

Access XP 55 © CiA Training Ltd 2003


Section 3 Table Relationships ECDL

Driving Lesson 28 - Continued


5. Click on the Repairs table and add it to the window.

6. Click to remove the Show Table dialog box.

7. Click and drag the table edges to resize the table boxes to be able to see
all of their fields. Notice the Primary Keys for each table are in bold.

8. Highlight the Reg No field in the Vehicles table.

9. Drag the Reg No field, from the Vehicles table, over the Reg No field in
the Repairs table. Release the mouse when in position.

10. In the Edit Relationships dialog box, note the relationship type is One-
To-Many.

11. Click to create the relationship.

© CiA Training Ltd 2003 56 Access XP


ECDL Section 3 Table Relationships

Driving Lesson 28 - Continued


12. The relationship between the tables is now symbolised by a line, linking
the same field, Reg No.

The relationship is One-To-Many. This means that one record from Vehicles
can have many related records in Repairs, i.e. one car may have many repair
jobs.
13. To delete this relationship, click on the joining line and press <Delete>. A
confirmation dialog box appears.

14. Select Yes. The joining line disappears.


15. Repeat steps 8 to 11 to re-establish the relationship then close the
Relationships window. Save when prompted.
16. Leave the database open for the next exercise.

Access XP 57 © CiA Training Ltd 2003


Section 3 Table Relationships ECDL

Driving Lesson 29 - Creating a One-to-One


Relationship
Park and Read
As previously stated a One-To-One Relationship is used where one record in
one table is linked to one record in another. This is used when the table
contains many fields or part of a table is removed for security reasons or if the
second table contains optional data.

Manoeuvres
1. Using the Daley database, create a table in Design view with two fields,
Job No and Charge.
2. The Job No field will have a data type of Number and the Charge field
will be Currency.
3. Make the Job No field the Primary Key.

4. Save the table as Cost. Close it without adding any data.

5. Open the Relationships window showing the existing relationship and


use the Show Table button to display the dialog box.
6. Select Cost then click Add to add it to the Relationship window. Close
the Show Table box.
7. Make the join between the Job No in the Repairs table and the Job No in
the Cost table.
8. Notice that, this time in the Edit Relationships box, the Relationship
Type is One-To-One.

© CiA Training Ltd 2003 58 Access XP


ECDL Section 3 Table Relationships

Driving Lesson 29 - Continued


9. Click Create and close the Relationships window saving at the prompt.

10. Open the Vehicles table.


11. Click the expand subdatasheet button next to the first record.
12. The related Repairs table is shown – notice that the related field in the
second table (foreign key), in this case the Reg No, is not shown.
13. There is also an expand subdatasheet button in the Repairs table. Click
on it.
14. The Cost table is shown for this record.

15. At the moment there is no data in the Charge field. Add a charge of £250
for this repair.
16. Try adding another charge for this repair. Remember there is a One-To-
One relationship in force, so only one charge should be allowed. A
warning dialog box is displayed as below.

17. Click OK once you have read it. The only way to get rid of this useless
information is to use the Undo button . Click on it now.
18. The record is deleted and the subdatasheets can be closed.
19. Open each subdatasheet in turn and add suitable Charges for all
Repairs, but make no charge for Job No 17.
20. Close the table but leave the database open.

Access XP 59 © CiA Training Ltd 2003


Section 3 Table Relationships ECDL

Driving Lesson 30 - Referential Integrity


Park and Read
Referential Integrity is a set of rules which can be applied to relationships,
ensuring they are valid and that data is not accidentally deleted or changed. It
may be applied when specific conditions are met: the matching field from the
primary table is a primary key, the related fields are the same data types and
both tables belong to the same database.
Enforcing referential integrity does not allow the primary key data in the primary
table to be changed, nor does it allow deletion of any record from the primary
table, if a related record exists elsewhere. A record cannot be added to a
related table if a record does not exist in the primary table, e.g. there can be no
job record without an associated car record in the primary table.

Manoeuvres
1. Make sure the Daley Database Window is still open.

2. Click the Relationships button , to display the relationship between


Vehicles, Repairs and Cost.
3. Right click with the mouse on the relationship line between Vehicles and
Repairs and select Edit Relationship from the menu.

4. In the Edit Relationship dialog box, check the box for Enforce
Referential Integrity and click .

Enforcing Referential Integrity will change the relationship line to show the type
of relationship, in this case, one to many.
5. Repeat the process for the relationship between Repairs and Cost.

6. Close the Relationship window, selecting Yes if prompted to save. Leave


the database open for the next exercise.

© CiA Training Ltd 2003 60 Access XP


ECDL Section 3 Table Relationships

Driving Lesson 31 - Updating and Deleting


Records
Park and Read
If referential integrity is enforced, the deletion of records from the primary table
is controlled as is the updating of primary key data. Similarly a related record in
a table may not be created, if a field is not available in the primary table.

Manoeuvres
1. Open the Vehicles table in Datasheet View.

2. Click in the record R654 TFG and click the Delete Record button, .
The record may not be deleted, as there are records in the Repairs table
that refer back to this record, i.e. repairs for vehicle R654 TFG.

3. Click OK. Close the table.

4. Open the Repairs table in Datasheet View.

5. Click the Add New Record button, and enter the following
information:
David E666 EEE 5/1/2
6. Press <Enter> after the last entry. As there is no registration number for
this job in the Vehicles table, a new job record cannot be created.

7. Click OK. Delete the information just entered using Undo. Close the table
and return to the database window.

Access XP 61 © CiA Training Ltd 2003


Section 3 Table Relationships ECDL

Driving Lesson 31 - Continued


8. To allow editing or deletion of records, the relationship between the tables
must be changed. Click the Relationships button.
9. Right click on the linking line between Vehicles and Repairs and select
Edit Relationship.
10. Edit the relationship as follows: check the boxes for Cascade Update
Related Fields and Cascade Delete Related Records. This means that
any changes made in one related table will be reflected in the others.

11. Click OK. Do the same for the Repairs/Cost relationship.


12. Close the Relationships window, saving the Relationship, if prompted.
13. Open the Vehicles table in Datasheet View and delete the record for the
Quattro, 379 CZ.

14. The dialog box is a warning that there is a record in other tables for this
vehicle and they too will be deleted. Read the dialog box then select Yes.
15. Change the registration E666 RPR to E666 RPP.
16. Close the table and open the Repairs table in Datasheet View. All jobs
for the Quattro are removed (Job 11) and the registration number change
has been reflected in the Repairs table (Job 13).
17. Close the table and the database.

© CiA Training Ltd 2003 62 Access XP


ECDL Section 3 Table Relationships

Driving Lesson 32 - Revision


This Driving Lesson covers the features introduced in this section. Try not to
refer to the preceding Driving Lessons while completing it.

1. Open the Database Football Agent.

2. Open the Current Status table to view the information available to the
Agent. Close the table.
3. Open the Relationships window and establish a relationship between the
Current Status table and Past Clubs using the Ref Code.
4. Enforce Referential Integrity and Cascade all information.

5. Open the Current Status table and view the data.

6. Use the subdatasheets to view the related data from the Past Clubs
table. Do not make any changes.
7. Close the table and the database.

If you experienced any difficulty completing the Revision, refer back to the
Driving Lessons in this section, then re-do the revision.

Access XP 63 © CiA Training Ltd 2003


Section 3 Table Relationships ECDL

Driving Lesson 33 - Revision


This Driving Lesson covers the features introduced in this section. Try not to
refer to the preceding Driving Lessons while completing it.

1. Open the Cia database and view the tables that are available. This is a
typical database used by a retailer to keep track of customers and
suppliers.
2. Open the Relationships window and establish the following One-to-
Many relationships, enforcing referential integrity and cascading all
information.
Customer Details table – Orders table by Customer Ref
Orders table – Order Details table by Order Ref
Order Details table – Products table by Product Ref
Products table – Suppliers table by Supplier Ref
3. Close the Relationships window and open the Customer details table.
View the data and the related data through the several layers of
subdatasheets.
4. Close the table.

5. Open the Suppliers table and use subdatasheets to see which products
they supply.
6. Close the Suppliers table and open the Relationships window again.
Delete the relationship between Products and Suppliers.
7. Open the Suppliers table, there is now no relationship between the
suppliers and what they supply.
8. Close the table and then re-establish the relationship.

9. Close the Relationships window and the database.

If you experienced any difficulty completing the Revision, refer back to the
Driving Lessons in this section, then re-do the revision.

© CiA Training Ltd 2003 64 Access XP


ECDL Section 3 Table Relationships

Driving Lesson 34 - Revision


This Driving Lesson covers the features introduced in this section. Try not to
refer to the preceding Driving Lessons while completing it.

1. Open the Houses database and the Relationships window.

2. View the relationship between the tables House details and Location
tables. It should be One-to-One by House Ref. Close the
Relationships window.
3. Open the Location table and view the subdatasheet for the 6 th record – 1
Poplar Place. Close the table.
4. Open the House details table and view the subdatasheet for the 6 th
record. The data is the same as before, although the format is changed.
One-to-one related tables can be viewed either way as neither is the
primary table.
5. Close the table and the database.

If you experienced any difficulty completing the Revision, refer back to the
Driving Lessons in this section, then re-do the revision.
Once you are confident with the features, complete the Record of Achievement
Matrix referring to the section at the end of the guide. Only when competent
move on to the next Section.

Access XP 65 © CiA Training Ltd 2003


Section 4 Editing ECDL

Section 4
Editing

By the end of the Section you should be able to:

Change Column Width

Move Columns

Find Text

Edit and Delete Data

Use Undo

Add & Delete Records

Use Wildcards to Search

Edit and Enter Data using Shortcuts

To gain an understanding of the above features, work through the Driving


Lessons in this Section.
For each Driving Lesson, read the Park and Read instructions, without
touching the keyboard, then work through the numbered steps of the
Manoeuvres on the computer. Complete the Revision Exercise(s) at the end of
the section to test your knowledge.

© CiA Training Ltd 2003 66 Access XP


ECDL Section 4 Editing

Driving Lesson 35 - Changing Column Widths


Park and Read
Column Widths can be changed to allow data to be read more easily. The
width of the columns can be set using the menus or the mouse.

Manoeuvres
1. Open the Houses database and the table Houses within it.

2. Click on any record within the Town field. Select Format | Column Width
to display the Column Width dialog box.

3. Enter 10 in the Column Width box. Click OK. The column is now
narrower. The data is still there, it just cannot be fully seen.
4. Move the mouse pointer into the column border between the Address
and the Type field headings. The pointer will change to a .
5. Click and drag the column border to the left, until the Address field is
about half its present width, then release the mouse button.
6. Position the mouse pointer on the column border between the Address
and the Type fields again.
7. Double click the mouse button. The column will automatically adjust to fit
the widest entry. Experiment. Try changing the widths of other columns.
8. Select the first 4 columns by clicking and dragging the first four Field
Headings and then select Format | Column Width.
9. Enter 15 into the Column Width box then click OK. All 4 columns are now
the same size.
10. Select all the columns in the table. Position the mouse over any column
border and double click. All columns are resized to the Best Fit.
11. Leave the table on screen for the next exercise.

If the table were closed now, the Save dialog box would be shown, as design
changes have been made.

Access XP 67 © CiA Training Ltd 2003


Section 4 Editing ECDL

Driving Lesson 36 - Moving Columns


Park and Read
In a table, data in one column may need to be compared with data in another
column. However, columns containing the data may not be adjacent to one
another or even be visible on screen, if the table is large. In Datasheet View,
columns can be Moved to any position, so that any column can be viewed
adjacent to another. This change in layout can be saved if the comparison is
required again but it does not affect the order in Design View.
If a column was originally placed incorrectly, then it can be changed in Design
View. Again, any alteration to design must be saved.

Manoeuvres
1. The Houses database and the table Houses should still be open. Click
anywhere in the table data to remove any selections.
2. Move the pointer to the Address column label. Click with the mouse on
the label to highlight the entire column and release the mouse button.
3. Now click and drag the mouse to the right. The cursor changes indicating
a column move and a black line in the table indicates where the column is
to be re-positioned. Position Address to the right of the Price column.

4. Move the Occupied column to the right of the Offers column.

5. Click on the Type column label. Hold down the <Shift> key and click on
the Price label to highlight both. Move both columns at the same time to
the right of Address.
6. Close the table without saving, resetting the columns.

7. From the same database, open the House details table in Design View.
The Occupied field is to be moved to the extreme right of the table, i.e. to
the bottom of the field name list.
8. Click in the Selector Bar to select the entire Occupied row.

9. Keeping the cursor at the left edge, click and drag the field to the bottom
of the list.
10. Save the changes, as this is a design change and switch to Datasheet
View. The Occupied column will be at the extreme right of the table.
11. Close the table and the database.

© CiA Training Ltd 2003 68 Access XP


ECDL Section 4 Editing

Driving Lesson 37 - Finding Specific Text


Park and Read
Access will search a table for specific information based on given criteria using
Find. Once the text has been specified, Access will search the table for the
value. The search can be restricted to a single field only. The search starts at
the cursor position.

Manoeuvres
1. Open the Staff database. Open the table Staff and maximise, if
necessary.
2. Click in the First Name field of the first record then click the Find button,
, on the toolbar.
3. In the Find What field type Anthony.

4. Click the Find Next button. The message Search succeeded appears in
the Status Bar and current record is now Record 6.

If the Find and Replace dialog box is obstructing the view of the table, position
the mouse pointer over the Title Bar and click and drag to a new position.
5. Click Find Next to jump to the next occurrence of Anthony. The current
record is now Record 10.
6. Select Find Next again. The end of search message appears.

7. Select OK and then click the Cancel button to close the Find and
Replace dialog box.
8. In the Date of Employment field search for 01/12/1986. (If unsure of how
the field is formatted, then uncheck Search Fields as Formatted, and the
find entry could be any date format, e.g. 1/12/86)
9. In the Employee No field search for 801.

Answers to this exercise can be found at the end of this guide.


10. Close the table and then close the database.

Access XP 69 © CiA Training Ltd 2003


Section 4 Editing ECDL

Driving Lesson 38 - Using Wildcards


Park and Read
There are two Wildcards that can be used to help find matching text in a table.
The wildcards replace either one letter or a group of letters when entering the
required text. They are used when the exact form of the text is not known.
? represents a single alphabetic character.
# represents a single numeric character
* represents any group of characters.
e.g. To search for Smith or Smyth, enter Sm?th.
To search for Chapman or Coleman, enter C*man.

Manoeuvres
1. Open the database Country and then open the Country table.

2. Move the cursor into the first record of the Capital field and click the Find
button.
3. The text to search for will be Tok?o, not knowing whether the spelling is
Tokio or Tokyo. In the Find What box enter Tok?o.
4. Click the Find Next button. When the message Search succeeded
appears in the Status Bar, select Cancel to close the Find and Replace
dialog box and see the position of the cursor. Record 23 and the field
containing Tokyo will be highlighted.
5. Place the cursor in the Currency field and select the Find button.
6. In the Find What box, enter D*r. This search will find all currencies
beginning with a D and ending in an r, with any text in between.
7. Use the Find Next button to jump through the records as necessary.
Select OK at the end of the search and Cancel to discontinue searching.
There are 7 matches.
8. Search the whole table for any word or multiple words that begins with a
G and has an E in it. To search the whole table rather than a specific
column, click the drop down arrow in the Look In box and select
Country : Table from the list. Use g*e* in the Find What box.

© CiA Training Ltd 2003 70 Access XP


ECDL Section 4 Editing

Driving Lesson 38 - Continued

9. Find all the matches – there should be matches for Germany, German(3),
Greece and Greek, 6 in total.
10. Find which countries are in a Region that includes the word America.
Click in the Region column, select Region in the Look In box, enter
america in the Find What box and select Any Part of Field in the Match
box.
11. Find the matches then close the Find and Replace box.
12. Position the cursor in the Population field. Click the Find button.
13. Change the value in Match back to Whole Field. Type 4.# in Find What
to find which countries have a population between 4 and 5 million.
14. Close the Find and Replace box.
15. Leave the table open for the next Driving Lesson.

Answers to this exercise can be found at the end of this guide.

Access XP 71 © CiA Training Ltd 2003


Section 4 Editing ECDL

Driving Lesson 39 - Editing Data


Park and Read
Modifying records in a table is a simple task in Access. By clicking on the
appropriate position and using simple key presses, data may be added, deleted
and changed. To edit data, click with the mouse on the appropriate field or
move to the field to be edited with the cursor control keys. When the mouse is
clicked in a field, a small flashing cursor appears. If <Tab> is used to move to
the next field, press <F2> to view the flashing cursor. This cursor can be moved
within the data in a similar way to that in a word processor.
The cursor arrow keys move the cursor left and right by one character. The
<Backspace> key removes the letter to the left of the cursor. The <Delete> or
<Del> key removes the letter to the right of the cursor.
When a record is being edited, the Editing Record indicator, , appears at the
left edge of the screen.

Manoeuvres
1. The Country table should still be open. If not, open it.

2. Find the Austrian record.

3. Click once with the mouse on the Population field. The cursor will
appear.
4. Use the left and right cursor keys to move about in the data.

5. Move to the end of the field, i.e. the cursor should be to the right of the 6.
6. Press the <Backspace> key to remove the 6.

7. Type in 7. Notice that the Editing Record indicator appears at the left of
the row. The population has now been changed to 7.7.
8. In a similar way, change the population of the UK to 58.

9. Leave the table on screen for the next Driving Lesson.

© CiA Training Ltd 2003 72 Access XP


ECDL Section 4 Editing

Driving Lesson 40 - Undo


Park and Read
It is possible to undo changes made to a record in a database by selecting Edit
| Undo Current Field/Record, before moving to a different record. If the user
has moved to a different record, then the last change made may be undone by
selecting Edit | Undo Saved Record.

The Undo command refers to the last action that was carried out, so it may
read Undo | Typing, Undo | Current Field/Record or other commands.

Manoeuvres
1. Move the cursor into the first field of the Afghanistan record and press
<Tab> to move to the Region field. Overtype Asia with Europe.
2. Press <Tab> to move to the Capital field. Overtype Kabul with Paris.
Press <Enter>.
3. To erase these mistakes, select Edit | Undo Current Field/Record.
(Afghanistan is still the current record).
4. Paris should now have changed back to Kabul and Europe to Asia.

5. Repeat steps 1 and 2.

6. Click on the Capital field of Denmark. By moving to a different record, the


changes for Afghanistan have now been saved and it is no longer the
current record.

7. Move the pointer over the Undo button, . A ToolTip will be displayed
- Undo Saved Record. Click on the button and the Afghanistan record
will be restored.

The menu command Edit | Undo Saved Record may also be used.
Remember changes can only be made to the last record edited. In the example
above, if any changes had been made to the Denmark record, the changes to
the Afghanistan record could not then be undone.
8. Close the table and database.

Access XP 73 © CiA Training Ltd 2003


Section 4 Editing ECDL

Driving Lesson 41 - Further Editing


Park and Read
Various key presses are available when moving about in text:
 moves left by 1 character
 moves right by 1 character
<Ctrl  > moves one word to the left
<Ctrl  > moves one word to the right
<Home> moves to beginning of field
<End> moves to end of field
To delete data within the field use the following keys:
<Del> deletes character at cursor
<Backspace> deletes character to left of cursor
<Ctrl Backspace> deletes from cursor to beginning of word
The mouse may also be used to edit by clicking on the required word or letter
and dragging to select a block of text to be processed.

Manoeuvres
1. Open the Staff database and Courses table.

2. Move to the course Creative Accounting For Beginners by clicking


once on the middle of the field.
3. The course title is incorrect - it should read Computer Accounting For
Beginners. Use the left cursor key to move along the line so that it is to
the right of the word Creative.
4. Erase Creative by using the <Backspace> key and type in Computer.
Press <Enter>.
5. The 4th record reads Intro to Access. It should read Introduction to
Access. Move to the correct field. Move the cursor along the line to the
correct position and type duction. Press <Enter>.
6. There is an error in the date of the Virus Writers Workshop. Move to the
Date field of record 3.
7. Press <Home> to move to the beginning of the date. Press <Delete>
until the date is removed, then enter 15/04/99. Press <Enter>.
8. Close the table, but leave the database open for the next exercise.

© CiA Training Ltd 2003 74 Access XP


ECDL Section 4 Editing

Driving Lesson 42 - Adding/Deleting Records


Park and Read
Records can easily be inserted into, or deleted from a table. New records are
inserted at the bottom of the table, although if a primary key is set or a field is
indexed, the record may be in a new position when the table is reopened.
If the cursor is at the end of the table a new record can be added by pressing
either <Enter> or <Tab>.

Manoeuvres
1. Open the Staff table and click the New Record button, , either from
the Toolbar or from the Navigation buttons at the bottom of the screen to
create a new record (or select Insert | New Record).
2. Type in the following information, pressing <Tab> to move into the next
field.
521
Ms
Singh
Ghita
Sales Manager
21/6/99
WF567890G
30000
22/7/65
3. Use your imagination to add another new record for a fictitious person.
Remember the validation rules that were set up earlier.
4. Ghita Singh’s record is to be deleted. Position the cursor within her
record. Press the Delete Record button, , (or choose Edit | Delete
Record from the menus).

5. Click Yes to confirm the deletion.

6. Delete the details for the fictitious person.

7. Leave the table on screen for the next exercise.

Access XP 75 © CiA Training Ltd 2003


Section 4 Editing ECDL

Driving Lesson 43 - Editing Shortcuts


Park and Read
When editing or entering data, the user may speed up the process by using
some “shortcuts” built into Access. For example, a particular value may be
quickly located using the Find option. However, there are two, more specific
shortcuts supported by the application.
<Ctrl ’> This copies the value from the same field of the previous record.
<Ctrl ;> This inserts the current date into the field.

Manoeuvres
1. Staff should still be open from the previous exercise. Add the following
new employee.
802
Mr
Miles
Peter
Creative Accountant
2. Move to the Date of Employment field and use <Ctrl ;> to insert today’s
date.
3. Enter WL562984T the NI Number.

4. His salary is the same as the previous record, use the Ditto function,
<Ctrl ’> (apostrophe) to add the appropriate information.
5. Enter 23/2/75 in the Date of Birth field.

6. Mr Valdron is, in fact, a typographical error and should be Mr Waldram.


Move to the appropriate field and correct the mistake.
7. Use your imagination to add another new record for a fictitious person.
Remember the validation rules that were set up earlier.
8. Delete this record.

9. Close the table and database.

© CiA Training Ltd 2003 76 Access XP


ECDL Section 4 Editing

Driving Lesson 44 - Revision


This Driving Lesson covers the features introduced in this section. Try not to
refer to the preceding Driving Lessons while completing it.

1. Use the database and table Country.

2. Change Finland’s population to 6 million.

3. Oops, that was a mistake! Undo the changes.

4. Make the Currency column about half its original width.

5. Resize any columns so that all information is visible.

6. Add the following record, Atlantis, Europe, Metropolis, 46, 23, 2, Dollar,
English.

7. Change the currency of Atlantis to Pounds, and the language to Spanish.

8. Use Find to locate all the countries within the region Middle East. How
many are there?
9. Using Wildcards, find all capital cities beginning with the letter B. How
many are there?
10. Delete the record for Atlantis.
11. Close the table, select No at the save prompt.
12. Close the database.

Answers to this exercise can be found at the end of this guide.

If you experienced any difficulty completing the Revision, refer back to the
Driving Lessons in this section, then re-do the revision.

Access XP 77 © CiA Training Ltd 2003


Section 4 Editing ECDL

Driving Lesson 45 - Revision


This Driving Lesson covers the features introduced in this section. Try not to
refer to the preceding Driving Lessons while completing it.

1. Open the database Houses and the table Location.

2. The Type field needs to permanently be moved to a position before the


Town field. Switch to Design View and move the field to the correct
position.
3. Save and switch back.

4. 22 Chapel Road has come on the market. Add a new record – use a
keyboard shortcut to copy the details above the new record, remembering
to change the address from 21 to 22.

House Ref is an AutoNumber field. AutoNumber fields are filled in by Access


with the next available sequence number. Start entering new data in the next
field, Type.
5. Display the subdatasheets for 21 and 22 Chapel Road. 22 is slightly
cheaper at £35000, has the same number of bedrooms, but no garage. It
is for sale and unoccupied. Enter this data.
6. You decide you would temporarily like to view the Type field to the left of
the Address field. Move the column.
7. House reference 25 in Stainburn should actually read 138 Swaledale
Street. Make the change.
8. Sorry that was wrong, it should have been Swaledale Road, undo the
typing and enter the correct address.
9. 22 Chapel Road has sold quickly. Delete it from your database.

10. 44 Daffodil Terrace has been for sale for some time, so the price is being
reduced. Change it to £27,000.
11. The property at 15 Low Row has been entered as a First Floor Flat
when in fact it is on the second floor. Make the change.
12. Close the table, but do not save the changes.
13. Open the table again to make sure of the position of the Type field.
14. Close the table and the database.

If you experienced any difficulty completing the Revision, refer back to the
Driving Lessons in this section, then re-do the revision.

© CiA Training Ltd 2003 78 Access XP


ECDL Section 4 Editing

Driving Lesson 46 - Revision


This Driving Lesson covers the features introduced in this section. Try not to
refer to the preceding Driving Lessons while completing it.

1. Open the Cia database and the Customer Details table.

2. How many customers live in County Durham?

3. Move the Telephone column next to the Surname for easy use.

4. Close the table without saving the changes.

5. The last change is to be made permanent. Open the table again in


Design View.
6. Move the Telephone field so that it is below the Surname field and save
the changes.
7. Switch to Datasheet View to view the change.

8. Add a new customer as follows:


Mr Philip Black of Black’s Beasts, 45 The Strand, Burnley, Lancs,
BU3 7GF, Tel 01834 23739, No Fax
9. The Information for Mr Black is the same as for the previous record. Use
<Ctrl ’> to copy this data.
10. Close the table and the database.

Answers to this exercise can be found at the end of this guide.

If you experienced any difficulty completing the Revision, refer back to the
Driving Lessons in this section, then re-do the revision.
Once you are confident with the features, complete the Record of Achievement
Matrix referring to the section at the end of the guide. Only when competent
move on to the next Section.

Access XP 79 © CiA Training Ltd 2003


Section 5 Sorting and Filtering ECDL

Section 5
Sorting and Filtering

By the end of this Section you should be able to:

Sort Data

Use Filters

To gain an understanding of the above features, work through the Driving


Lessons in this Section.
For each Driving Lesson, read the Park and Read instructions, without
touching the keyboard, then work through the numbered steps of the
Manoeuvres on the computer. Complete the Revision Exercise(s) at the end of
the section to test your knowledge.

© CiA Training Ltd 2003 80 Access XP


ECDL Section 5 Sorting and Filtering

Driving Lesson 47 - Sorting Data


Park and Read
One of the main features of a powerful database management system is the
ability to sort data based on given criteria. This order can be alphabetical,
numeric or chronological. Sorts can be carried out in ascending (A-Z, 1-100,
etc.) or descending (Z-A, 100-1, etc.) order.

The table is only sorted temporarily. When it is closed and then opened again,
the sort is lost. To retain the sort, save the table before closing.

Manoeuvres
1. Open the database Staff and the Staff table.

2. Click anywhere in the Surname field.

3. Click the Sort Ascending button, . The table will be instantly sorted
into Surname order, Ascending.
4. With the cursor still in the Surname field, click the Sort Descending
button, . Notice how the table is now sorted by surname, in
descending order.
5. Sort the table by Salary in ascending order.

6. Sort the table in descending order by the Date of Employment to see the
newest starters first.
7. Close the table without saving the changes.

8. Close the database.

The principles of sorting records apply in the same way in Queries and Forms,
see later exercises.

Access XP 81 © CiA Training Ltd 2003


Section 5 Sorting and Filtering ECDL

Driving Lesson 48 - Using Filters


Park and Read
A filter can be used to find certain information, known as criteria. Once the
criteria are specified and the filter is applied only the information that fits the
criteria will be shown in the table. This data can then be saved , sorted or
printed.

Manoeuvres

Filter By Selection
1. Open the database and table Country.

2. Select Europe anywhere within the Region field.

3. Click the Filter By Selection button, , to select all records of the


countries in Europe.
4. To sort the countries in Europe by the size of their population, position the
cursor in the Population field. Click the Sort Descending button, .

5. Click the Remove Filter button, , to return to the original table,


although the sort remains in force.

Filter By Form

6. Click the Filter By Form button, . In the Region field, use the drop
down list to select a value of Asia, or enter it by typing.

7. Click the Apply Filter button, . All countries in Asia should now be
selected. Remove the filter.
8. Close the table and database, without saving the changes.

9. Open the Houses database and Location table.

10. Click the Filter by Form button . This filter will use two criteria.

11. In the Town field, drop down the list and select Cockermouth. In the
Type field, drop down the list and select Terraced House.
12. Apply the filter. There are 4 matching records.
13. Close the table without saving (filter was not removed first), but leave the
database open.

© CiA Training Ltd 2003 82 Access XP


ECDL Section 5 Sorting and Filtering

Driving Lesson 49 - Filters: Excluding Selection


Park and Read
When using filters, it is possible to specify the information not to be viewed.
This is known as Filter Excluding Selection.

Manoeuvres
1. Open table Houses.

2. To show all the Towns except Cockermouth, position the cursor within
Cockermouth in the Town field.
3. From the menu, select Records | Filter | Filter Excluding Selection.
Scroll through the records.
4. Notice how all the records with Cockermouth as their Town have been
excluded from view. The status bar shows 1 of 25 (Filtered).
5. Select Records | Remove Filter/Sort or click the Remove Filter button,
to view all records.
6. Select the word House from the Type column.

7. Select Records | Filter | Filter Excluding Selection.

8. Observe that all the properties whose type was any kind of House have
now been filtered out (leaving 12 records).
9. Remove the filter.
10. Leave the table open for the next Driving Lesson.

Access XP 83 © CiA Training Ltd 2003


Section 5 Sorting and Filtering ECDL

Driving Lesson 50 - Filter For


Park and Read
A quicker way of filtering may be to use the right mouse button. Position the
mouse over the field to be filtered/sorted, then right click. Select the required
option from the shortcut menu to apply the filter/sort.

Manoeuvres
1. Use the Houses table, which should be open from the previous Driving
Lesson.
2. Position the mouse over any data in the Town column and click with the
right mouse button. A shortcut menu appears:

3. Click in the Filter For box and type Maryport. Press <Enter>.

4. Notice how the records have now been filtered to show only the properties
in Maryport.
5. Position the mouse back over the Town column, click with the right
mouse button, then Remove Filter/Sort.
6. Move to the Type field. Display the shortcut menu as above.

7. In the Filter For box type in *bungalow*. This will give all records that
include bungalow in their type. There are 5 records.
8. Practise filtering and sorting using the right mouse button.

9. Remove any filter and leave the table open for the next Driving Lesson.

© CiA Training Ltd 2003 84 Access XP


ECDL Section 5 Sorting and Filtering

Driving Lesson 51 - Revision


This Driving Lesson covers the features introduced in this section. Try not to
refer to the preceding Driving Lessons while completing it.

1. Open the database and table Houses, if it is not already open. Remember
to remove the filters between steps.
2. Find all properties in the Town of Whitehaven.

3. Find all the properties that have 3 bedrooms.

4. Find all the properties that are in a town beginning with C.

5. Find all the properties whose Type includes Flat. Remember to use the
wildcards!
6. Close the table and database without saving the changes.

7. Open the database and table Country.

8. How many countries are on the database?

9. How many countries that have English as their main language?

10. Sort the countries into alphabetical order of their capital city. Which
country is first?
11. Remove from view all the records that are in Europe? How many records
are left?
12. Sort this answer by Density – highest first. Which is the most densely
populated country outside Europe?
13. Close the table and the database without saving.

Answers to this exercise can be found at the end of this guide.

If you experienced any difficulty completing the Revision, refer back to the
Driving Lessons in this section, then re-do the revision.

Access XP 85 © CiA Training Ltd 2003


Section 5 Sorting and Filtering ECDL

Driving Lesson 52 - Revision


This Driving Lesson covers the features introduced in this section. Try not to
refer to the preceding Driving Lessons while completing it.

1. Open the database Cia and the table Prospective Customers.

2. Sort the table by Surname ascending.

3. Use Filter by Selection to find how many men are prospective


customers.
4. Remove the filter.

5. Close the table and save the sorted order.

6. Open the Orders table from the same database.

7. Use Filter by Selection to find how many orders have not yet been paid.
Do not be concerned if the No changes to a zero, this is how Access
recognises Yes/No fields.
8. Remember to remove the filter.

9. Sort the table into Date Paid order. This also has the effect of collecting
together all of the unpaid invoices.
10. Close the table but do not save it. Close the database.
11. Open the database Daley and the table Vehicles.
12. Use Filter by Form to find out if there are any Black cars with an Engine
Capacity of 3500.
13. Remove the filter and sort the data by Engine Capacity ascending. It
does not appear to have sorted in the correct order. Why is this? In
Design View, try changing the Field Data Type for the Engine Capacity
to Number rather than Text.
14. Reapply the sort ascending, it should now be correct.
15. Close the table without saving the sorted changes and close the
database.

Answers to this exercise can be found at the end of this guide.

If you experienced any difficulty completing the Revision, refer back to the
Driving Lessons in this section, then re-do the revision.

© CiA Training Ltd 2003 86 Access XP


ECDL Section 5 Sorting and Filtering

Driving Lesson 53 - Revision


This Driving Lesson covers the features introduced in this section. Try not to
refer to the preceding Driving Lessons while completing it.

1. Open the Football Agent database and the Current Status table.

2. Sort the players into order by Date Joined showing the longest serving
first.
3. Now sort them into salary order, highest paid first.

4. Find the record for Barry Boots. Open his subdatasheet and sort the
Date Left field in descending order. Close the subdatasheet.
5. Sort the records in Current Club order to see if there are any players on
the books playing for the same club.
6. Close the table and the database without saving any of he changes - No
to All.
7. Open the Staff database and table.

8. Use a filter to find all staff involved in sales (use *sales* in the criteria).
How many are there? Remember to remove filters after use.
9. Use Filter by Form to find how many men are involved in sales.

10. Use Filter by Selection to find all employees who started work in 1985.
11. How many people are paid £15,000 per annum?
12. Sort by Date of Birth. Who is the oldest member of staff?
13. Close the table and database but do not save any changes.

Answers to this exercise can be found at the end of this guide.

If you experienced any difficulty completing the Revision, refer back to the
Driving Lessons in this section, then re-do the revision.
Once you are confident with the features, complete the Record of Achievement
Matrix referring to the section at the end of the guide. Only when competent
move on to the next Section.

Access XP 87 © CiA Training Ltd 2003


Section 6 Queries ECDL

Section 6
Queries

By the end of this Section you should be able to:

Create, Edit and Delete a Query

Use Sort in a Query

Print Query Results

Query Related Tables

Use Value Ranges in Queries

Use a Query to Find Non-Matches

Use AND & OR Queries

To gain an understanding of the above features, work through the Driving


Lessons in this Section.
For each Driving Lesson, read the Park and Read instructions, without
touching the keyboard, then work through the numbered steps of the
Manoeuvres on the computer. Complete the Revision Exercise(s) at the end of
the section to test your knowledge.

© CiA Training Ltd 2003 88 Access XP


ECDL Section 6 Queries

Driving Lesson 54 - Querying a Table


Park and Read
A database management system has the ability to process the information the
user has entered and produce meaningful results. Access uses a system
known as Querying. Simply fill in a Query, selecting which fields to show in the
answer and what information is required. The program then processes the data
and performs the query.
Once created, a query can be saved and used in place of a table in many
instances, e.g. as a basis for Forms and Reports.

Manoeuvres
1. Open the database Mailing.

2. At the database window, select the Queries in the Objects list,


and then click New.

3. From the dialog box select Design View and click OK.

4. In the Show Table dialog box, with Mailing selected click Add, then
Close.

Access XP 89 © CiA Training Ltd 2003


Section 6 Queries ECDL

Driving Lesson 54 - Continued


5. The Select Query window is now visible. Maximise it, if necessary.
Notice the Field List in the top half of the window and the Query Grid in
the bottom half.

6. In the first column of the query grid, click on the down arrow button to
display the list of fields. Click on Name.
7. The Show box for Name should be checked
(have a tick in it). If it does not, click on the box
to check it. This query is asking Access to
show only the Name field in the answer.

8. To run the query, click the Run button, .

9. An answer table appears. In this case it only consists of the Name field
because that was the only field placed on to the Query Grid. with the
Show box checked.

10. To switch back to the query design, click the Design View button, .

11. Scroll down the Field List in the top half of the grid until Department is
visible. Click and drag the field Department and release anywhere in the
second column in the query grid. The Field Name Department will be in
the column and the Show box will be checked. Click the Run button to
see the new answer table.
12. Both the Name and Department field should now be visible. Switch back
to the query design, using the Design View button.
13. To clear the query grid completely, select Edit | Clear Grid.

© CiA Training Ltd 2003 90 Access XP


ECDL Section 6 Queries

Access XP 91 © CiA Training Ltd 2003


Section 6 Queries ECDL

Driving Lesson 54 - Continued


14. In the Field List for Mailing, click on Name. Scroll down the list to the
bottom, hold down <Shift>, and click on the last field, Last Drop. All of
the fields should now be selected. Click in the selection and drag down to
the first column of the query grid, then release the mouse button. All of the
fields should be visible in the query grid with their Show boxes checked.
15. Scroll across the query grid until the Organisation field is visible. Click on
the Criteria box for this field. Type in FE.

16. This query now asks to see all the fields of any record whose
Organisation field equals FE. The criteria could have been entered as
=FE but the equals sign is not required. Click the Run button to see the
answer table. Scroll through the table to check that all records have FE
(Further Education) in their Organisation field. There are 2 records.
17. Switch back to Design View. Notice the “ ” around the FE criteria.
Access often changes the criteria to its own language to run the query.
18. Click in the Criteria box of the Organisation field and delete the “FE” by
using the <Backspace> or <Delete> keys.
19. Click in the Criteria box of the Computer field. Type in PCW, then Run
the query. The three records containing PCW in their Computer fields
should be visible. This shows the organisations that use PCW computers
(PCW is a very old type of computer). There are 3 records.
20. Switch back to Query Design.
21. Use Edit | Clear Grid to remove the information from the query design.
Double click on Name to place it in the first column of the query grid. It
may be necessary to scroll left to see it. Place Town and Post code in
the second and third columns using the same method. Make sure all
fields have their Show boxes checked.
22. In the Criteria of the Town field, type London. Run the query. It finds
name and postcodes of people living in London. There are 2 records.
23. Select File | Close to close the query. When asked “Do you want to
save ….”, click No.
24. Close the database.
Querying is not case sensitive. Searching for Fred will also find FRED and fred.

© CiA Training Ltd 2003 92 Access XP


ECDL Section 6 Queries

Driving Lesson 55 - Sorting and Saving Query


Results
Park and Read
Query results may be easier to understand if they are placed in a certain order
or sorted. It is also a useful tool when query results are used in reports.
Queries can be saved so that when data changes, the query can be run again,
without the necessity of redesigning it, and reflect the changes.

Manoeuvres
1. Open the database Houses and click the Queries object.

2. From the Database Window, double click Create query in Design view.
This opens the Query window and the Show table dialog box.
3. Add the Houses table to the query and close the dialog box.

4. Add the following three fields to the query grid by double clicking on them:
Town, Occupied and Price.
5. In the Criteria for Town, enter Cockermouth. Run the query. There are
5 results.

6. To sort these in to order of price, switch back to query design, .

7. In the Sort area for Price, drop down the list and select Ascending.

8. Run the query again and the records are sorted in order of price.

9. Switch back to Design View again and select Edit | Clear Grid.

Access XP 93 © CiA Training Ltd 2003


Section 6 Queries ECDL

Driving Lesson 55 - Continued


10. Place the following fields on the query grid by double clicking on them:
Town, Price and Bedrooms.
11. In the Criteria for Bedrooms enter 2 – only properties with 2 bedrooms
will be returned.
12. Sort the Price field in Descending order.

13. Run the query – there 9 results.


14. Switch back to Design View and select File | Save As. The Save As
dialog box appears.

15. Replace the text Query1 with 2 bedrooms and click OK. The query is
saved and the title is shown in the Title Bar of the Query window.
16. Sort the Town field Ascending leaving all other criteria as they are. Run
the query.
17. Notice that the first sort is on the town, so they are first in ascending
alphabetical order. The second sort is on price in descending order, so
within each town group the price is sorted with the highest number first.
18. Return to Design View and change the Town field sort to Descending.
Run the query to see the towns in reverse alphabetical order.

19. Use either File | Close or the Close button to close the query. At the
dialog box select No to retain the previously saved query.
20. The Database Window now shows the saved query 2 bedrooms.
Double click on it to open it. It is as saved at step 15.
21. Leave the query open for the next Driving Lesson.

© CiA Training Ltd 2003 94 Access XP


ECDL Section 6 Queries

Driving Lesson 56 - Printing Query Results


Park and Read
When a hard copy of a query is required it is a simple matter to print out the
result.

Manoeuvres
1. The 2 bedrooms query is open from the previous Driving Lesson. Before
producing a hard copy, click Print Preview to see how it will appear on
the page.
2. Select File | Page Setup, click the Page tab and change the orientation,
i.e. from Portrait to Landscape. Click OK.
3. Zoom in to the page by clicking on it with the magnifier. Note that there is
a header showing the title of the query and the date and a footer showing
the page number.

4. Click the Print button to produce a copy.

5. Close Print Preview.

6. Select File | Print. Note that from the dialog box there are options to print
selected parts of the query result, in exactly the same way as for a table.
There is also an option to print more than one copy.

7. Click Cancel, there is no need to print again.

8. Close the query result. Close the database.

Access XP 95 © CiA Training Ltd 2003


Section 6 Queries ECDL

Driving Lesson 57 - Querying Related Tables


Park and Read
The technique for querying related tables is exactly the same as for one, except
that at the Show Table stage, more than one table may be added.
Fields can then be chosen from both tables to give a result that would not be
possible from an individual table.

Manoeuvres
1. Open the database Daley. The relationships between the tables were set
in Driving Lesson 28.
2. Click the Queries object and open a new query in Design View.

3. The Show Table dialog box lists all three tables. Double click on
Vehicles and then on Repairs to add them to the query. Close the Show
Table dialog box.
4. The relationship is shown.

5. From the Vehicles field list select to add the following fields: Reg No,
Model and Manufacturer.
6. From the Repairs field list select to add the following fields: Mechanic
and Date of Repair.

7. Note that the Table name for each field is displayed in the query,
indicating the source of each of the fields.
8. In the Mechanic criteria enter David. This will display only David’s jobs.
Run the query. There are 2 records.

© CiA Training Ltd 2003 96 Access XP


ECDL Section 6 Queries

Driving Lesson 57 - Continued


9. There really is no need to display David’s name in the result as all the
information applies to him. Switch back to Design View and click in the
Show box for Mechanic. The tick is removed.

10. Run the query again. The results are the same, except that David’s name
is not shown.
11. To ‘unhide’ the field, return to Design View and replace the tick in the
Show box. Run the query again, the name will be shown.
12. Return to Design View, remove the tick from the Show box in the
Mechanic field and save the query as David.
13. Run the query and Print Preview the query results. David’s name will
appear as the title.
14. Print a copy.

15. Switch back to Design View. Click the Show Table button and add
the Cost table to the query.
16. Double click on the Charge field to add it to the query.
17. Run the query.
18. Now the charge for each of David’s jobs is included.

This is dependent on you having added data in Driving Lesson 29. Because
Cost is now included in the Query, records will only be selected for Jobs where
there is a related cost record. If none of David’s jobs have costs entered then
no records will now be displayed.
19. Close the query without saving but leave the database open.

Access XP 97 © CiA Training Ltd 2003


Section 6 Queries ECDL

Driving Lesson 58 - Editing Queries


Park and Read
There may be occasions when several similar but slightly different queries are
required. It is acceptable in these circumstances to edit the original query,
rather set up and save new ones. For example, if in an address query the only
criterion that changes is the beginning of the postcode, then it is acceptable to
run the query for one postcode, print or preview the result, before editing the
query for another postcode.
Fields can be moved to a more suitable position in a query or can be removed
altogether.

Manoeuvres
1. The Daley database is open, open the David query.

2. Switch to Design View. Exactly the same information is required for


Richard. Edit the criteria for the Mechanic to Richard.
3. Run the query. This time Richard’s details are shown. However,
remember that if a printout is required, unless the query is saved again
using Richard’s name, the printout will still show David as the title.
4. Switch to design view. Move the cursor above the Manufacturer field
until the cursor changes to a black downward arrow, and click once to
select the field.
5. Point the cursor in the narrow grey area above the field name until it
changes to a white arrow and drag the field to the position between Model
and Reg No. A thick black line will help you.

6. Once the mouse button is released the field is dropped in its new position.

7. Run the query now. It makes more sense to have the Manufacturer’s
name before the Model name.
8. Switch back to Design View. Select the Manufacturer field again. Press
the <Delete> key. The Manufacturer field is no longer displayed.
9. Run the query to check.

10. Close the query without saving but leave the database open.

© CiA Training Ltd 2003 98 Access XP


ECDL Section 6 Queries

Driving Lesson 59 - Ranges of Values


Park and Read
The following search rules apply to queries run on single or related tables.
A range of values can be specified in a query using the following operators:
> Greater than < Less than
>= Greater than / equal to <= Less than / equal to
These operators allow the user to process data depending on its order. As with
exact matches, the required range is typed into the appropriate field of the
query grid. For example, to discover which items, if any, are in short supply in
a table of stock records, the user could type <100 in the Stock Level field of
the query grid to display all the items with less than 100 in stock.

Manoeuvres
1. Use the database Daley and create a New query using the Vehicles
table.
2. Place the Reg No, Model and Price fields on to the query grid by any
method.
3. To find all the
cars costing
less than
£3000, type
<3000 in the
criteria box of the Price field. Make sure that the Show boxes are
checked.

4. Run the query . The answer table should contain the vehicles costing
less than £3000 and display their Reg No, Model and Price. Click on
Design View to return to the Query Grid.
5. Add the Previous Owners field to the query grid. Look for all cars with
four or more owners, which also cost less than £3000. Type >=4 in the
criteria box. Typing >3 would produce the same result.
6. Run the query. This is a multiple query.

7. Save the query as Owners and click OK.

8. Close the query and then close the database.

Access XP 99 © CiA Training Ltd 2003


Section 6 Queries ECDL

Driving Lesson 60 - Non-Matches


Park and Read
In order to produce results which exclude the matches made using other
searches, the user may precede any criteria with the operator <> or NOT, as in
not London, or not *sales*, or <> Scotland.

Manoeuvres
1. Open the database Houses and create a New query using the Location
and House details tables.
2. Place the Town and Type from the Location table and Price from the
House details table on to the query grid. Ensure that they have their
Show boxes checked.
3. In the Criteria box for the Town field, type <>Cockermouth to find all the
properties except those in Cockermouth.
4. Run the query. The answer table contains 25 records.

5. Switch to the Query Design. Remove the current query criteria and add
the Address field to the query grid.
6. In the Town Criteria box change the entry to Not Workington and sort
the Town ascending and then Price ascending. Run the query. There
are now 24 results.
7. Save the query as Not Workington.

8. Preview the results before printing a copy.

9. Close the query and the database.

Access does not select blank fields when searching for non-matches. A record
with no data in the Town field, would not be included in a Not Workington
query.

© CiA Training Ltd 2003 100 Access XP


ECDL Section 6 Queries

Driving Lesson 61 - And Queries


Park and Read
When it is necessary that two conditions must be met in a single field, e.g. a
value must be higher than one value and lower than another, then the word
and is used. Simply enter the two queries in the field, separated by the word
and.

Manoeuvres
1. Open the database Staff and then open a New query using the Staff
table.
2. Place the fields Surname and Date of Birth on to the grid. Ensure that
both fields have their Show boxes checked.
3. To list all the employees born in the 1960s, type the following information
into the Date of Birth Criteria box:
>=01/01/60 and <=31/12/69
4. Widen the Date of Birth field by clicking and dragging the right border to
the right, till all the data is visible.

5. Run the query. The answer table contains the names of all the people
born in the 1960s (~8 records, depends on the values used on additional
records).
6. Switch back to the query design. Remove the Date of Birth field from the
grid by highlighting and deleting the Field and Criteria information.
7. Place the Salary field on to the query grid.

Access XP 101 © CiA Training Ltd 2003


Section 6 Queries ECDL

Driving Lesson 61 - Continued


8. To find everyone who earns between £15,000 and £20,000 type >=15000
and <=20000 in the Criteria box of the Salary column.

9. Run the query.

10. The answer table contains all of the people who earn between £15,000
and £20,000 (6 records).
11. Close the query without saving.
12. Close the database.

© CiA Training Ltd 2003 102 Access XP


ECDL Section 6 Queries

Driving Lesson 62 - Or Queries


Park and Read
If a value within a particular field needs to match one of two or more conditions,
then the conditions may be entered into the appropriate field on the query grid
separated by Or. They may also be on displayed on separate lines in the query
grid. AND and OR queries are examples of logical operators.

Manoeuvres
1. Using the Houses database, place the fields Town and Address on a
new query grid based on the Houses table. Ensure that both Show
boxes are checked.
2. To search for all properties in Maryport Or Aspatria, enter Maryport or
Aspatria in the Criteria box for Town.

3. Run the query. The answer table contains all properties in Maryport or
Aspatria. There are 5. Switch back to the query design.
4. Clear the criteria and place the Bedrooms field on the grid.

5. In the Criteria box of the Bedrooms field enter 3. In the line below, the
or line, enter 4. This will search for three or four bedroom houses.

6. Run the query. The answer table contains eighteen properties, all of
which have either three or four bedrooms.
7. Save the query as 3 or 4 bedrooms and close it.

The Maryport/Aspatria query could have been entered in the same way.
8. Leave the database open.

Access XP 103 © CiA Training Ltd 2003


Section 6 Queries ECDL

Driving Lesson 63 - Deleting a Query


Park and Read
When several queries have been run and saved, the Database Window may
become cluttered. In this instance, it is a good idea to delete those no longer
required.
Care should be taken, however, that the queries being deleted are not used
elsewhere, i.e. a form or report may be based on a particular query, deleting it
will render the form/report unusable.

Manoeuvres
1. The Houses database is open. Display the queries.

2. From the list of 3 saved queries, click on Not Workington.

3. Select Edit | Delete or press the <Delete> key. A dialog box is displayed.

4. Select Yes to confirm the deletion.

5. Leave the database open for the next Driving Lesson.

© CiA Training Ltd 2003 104 Access XP


ECDL Section 6 Queries

Driving Lesson 64 - Revision


This Driving Lesson covers the features introduced in this section. Try not to
refer to the preceding Driving Lessons while completing it.

1. The database Houses is open from the previous Driving Lesson. Start a
New query using the Houses table.
2. In the Field List, select all the fields and place them on the query grid.

3. Search for all properties in the table located in Cockermouth.

4. Run the query and view the answer table.

5. Switch back to the query design. Clear the grid. Now try the following
questions. The fields to use are shown in brackets after each question.
6. How many properties include a garage in the sale? Place Yes in the
Garage column. (Show Town, Address and Garage).
7. How many properties are for sale? Put For Sale in the Status field. (Show
Town, Address, Price and Status).
8. How many three-bedroom properties are there? (Show Town, Address,
Bedrooms and Price).
9. How many properties are there in Whitehaven? (Show Town, Address
and Price).
10. How many properties cost less than £22,000? (Show Town, Address,
Price).
11. How many properties cost between £40,000 and £50,000? (Show Town,
Address, Price).
12. Use the criteria *list* in the Comment field. What comment does it find,
and what is the Address? (Show Town, Address, Comment).
13. Use <> None in the Offers column, to discover how many houses have
offers placed on them. (Show Town, Address, Offers).
14. Close the query without saving.
15. Close the database.

Answers to this exercise can be found at the end of this guide.

If you experienced any difficulty completing the Revision, refer back to the
Driving Lessons in this section, then re-do the revision.

Access XP 105 © CiA Training Ltd 2003


Section 6 Queries ECDL

Driving Lesson 65 - Revision


This Driving Lesson covers the features introduced in this section. Try not to
refer to the preceding Driving Lessons while completing it.

1. Open the Football Agent database and create a query that will show the
Surname, First name, Current Club and Annual salary of any player
earning more than £100,000 per year. Do not show the actual salary.
2. Move the First name field so that it will be displayed before the Surname.

3. Print a copy of the result but do not save the query.

4. Close the database.

5. Open the database Daley and create a new query.

6. All three tables are to be included in the query.

7. Create a query to show the manufacturer and model of all cars repaired
on 2nd January 2002 and how much was charged for each.
8. Save the query as 2 Jan.

9. Do not show the date in the answer, as it will now be the title of the query
result. Print a copy.
10. Delete this query and close the database.
11. Open the Staff database and create a new query based on the Staff and
Courses tables.
12. Find out how many staff has been on a course after the 1 st April 1995.
Show Title, First name, Surname, Course and Date.
13. Using the same fields, find out how many staff have been on an
introductory course of some kind – use *intro* as the criteria.
14. Find out the only member of staff with a salary of more than £20,000 has
been on an Intermediate course.
15. Close the query without saving and close the database.

Answers to this exercise can be found at the end of this guide.

If you experienced any difficulty completing the Revision, refer back to the
Driving Lessons in this section, then re-do the revision.
Once you are confident with the features, complete the Record of Achievement
Matrix referring to the section at the end of the guide. Only when competent
move on to the next Section.

© CiA Training Ltd 2003 106 Access XP


ECDL Section 7 Forms

Section 7
Forms

By the end of this Section you should be able to:

Use AutoForm

Design and Create a New Form

Format a Form

Edit and Delete a Form

Edit and Browse Data within a Form

Print from a Form

To gain an understanding of the above features, work through the Driving


Lessons in this Section.
For each Driving Lesson, read the Park and Read instructions, without
touching the keyboard, then work through the numbered steps of the
Manoeuvres on the computer. Complete the Revision Exercise(s) at the end of
the section to test your knowledge.

Access XP 107 © CiA Training Ltd 2003


Section 7 Forms ECDL

Driving Lesson 66 - Forms


Park and Read
Datasheet (Table) View is the default setting for looking at a table. It shows
many records at a time in a fixed format, but often only, some of the fields.
Forms usually show the information one record at a time, but display all of the
fields on the screen at once. Forms are opened in a similar way to tables. Any
action that can be performed in a table can be performed in a form.

Manoeuvres
1. Open the database Staff. Open the Staff table in Datasheet View and
examine the structure of the records and sub data sheets (Course table).
2. Close the table and select Forms in the Object list.

3. Click the form Staff Info Form, then Open. The form is based on both the
Staff and Course tables.
4. Look at the form. This is an example of a fairly complicated form using
graphics, linked tables, formatting, etc. Not all of these features are
covered in this guide.
5. Use the navigation buttons at the bottom of the form to view other records.

Navigation
buttons for sub
form

Navigation
buttons for main
form

6. Use the View button to switch to Design View where the layout of
the form is created or amended. Switch back to Form View.
7. Close the form with File | Close and close the database.

© CiA Training Ltd 2003 108 Access XP


ECDL Section 7 Forms

Driving Lesson 67 - AutoForm


Park and Read
Access includes a program that can create simple forms quickly. Once created,
the design of the forms produced can be altered in the same way as any other
form. Access contains an AutoForm shortcut to automatically generate a form
based on a selected table or query. The form is pre-formatted with colours and
font styles, etc. The two usual forms of AutoForm are Columnar and Tabular.

Manoeuvres
1. Open the database Houses. At the Database Window, click on the table
Houses.

2. Click the New Object: AutoForm button, , on the Database toolbar.


The form is then designed and displayed.

3. Use the navigation buttons at the bottom of the form to scroll through the
records.
4. Switch to Design View using the View button. Notice how for each field
there is a label in a grey box, that will be shown in the form and a text box,
in a white area, that will display the data.
5. Switch back to Form View.

6. Select File | Close to close the form, selecting No not to save it.

Access XP 109 © CiA Training Ltd 2003


Section 7 Forms ECDL

Driving Lesson 67 - Continued


7. To have a little more control over the design of the AutoForm, select the
Forms object from the Database Window and click New.
8. Select AutoForm: Columnar from the New Form dialog box and select
the Houses table from the drop down list.

The drop down list will contain all tables and queries in this database.

9. Click OK and the form appears after a few seconds. Scroll through the
records using the navigation buttons.
10. View the design of this form – it is very similar to the Autoform.
11. Close the form without saving but leave the database open.

© CiA Training Ltd 2003 110 Access XP


ECDL Section 7 Forms

Driving Lesson 68 - Form Wizard


Park and Read
Another method of creating a form is to use the wizard. This gives step by step
help in the creation of the form and allows more variety in the layout and the
format.

Manoeuvres
1. The Houses database should still be open.

2. With the Forms objects displayed, click New, .

3. At the dialog box select Form Wizard and choose to use the Houses
table.

4. Click OK. The Form Wizard dialog box is displayed. Click on to


place all of the available fields on the form. A choice of individual fields
could be made using instead if required.

Access XP 111 © CiA Training Ltd 2003


Section 7 Forms ECDL

Driving Lesson 68 - Continued


5. Click on Next.

6. Click on each layout to view the sample. Select Columnar and click
Next.

7. View the various options for the style, before settling on SandStone.

8. Click Next again.

9. The final option gives the form its saved name. Click Finish to accept the
suggested name of Houses1 to create and save the form.
10. Scroll through the records and view the design of the form.
11. Close the form and the database.

© CiA Training Ltd 2003 112 Access XP


ECDL Section 7 Forms

Driving Lesson 69 - Designing a Form


Park and Read
Forms are created from fields in tables or queries. Design View makes it
possible to have control over all design elements of the form.

Manoeuvres
1. Open the database Mailing, click Forms in the Objects list,
and then click New.

2. At the New Form dialog box, select Design View and then click on the
down arrow button next to Choose the table….
3. Click on Mailing then click OK.

4. The Form Design window is now visible. The Toolbox and Field List box
may be anywhere on the screen or even not displayed.

Ruler

Form

Toolbox
Field List

Access XP 113 © CiA Training Ltd 2003


Section 7 Forms ECDL

Driving Lesson 69 - Continued


5. Maximise the form if necessary. If the Toolbox or the Field List are not
visible, then select the Field List button, , or the Toolbox button, .
If either of these are in the way, move them by clicking and dragging their
Title Bars.
6. Move the mouse pointer over the bottom edge of the form grid. The
mouse pointer will change to a double-headed arrow, . Over the bottom
right corner of the form, it changes to a four headed arrow, . Clicking
and dragging the edges of the form, changes its shape.
7. Click and drag the form until it is 12cm wide and 8cm high (use the rulers
as a guide).
8. Click on the top field in the Field List, Name. Click and drag this field on to
the form, releasing the mouse button in the top centre of the form. Note
that the mouse pointer changes when dragged.
9. Two boxes appear on the form. The first is the field label, Name and the
second will show the information when viewing the form.
10. Click on the second field in the list, Address(1). Scroll down the list until
the Last Drop field is visible.
11. Hold the <Shift> key and click on the Last Drop field. This selects all of
the fields from Address(1) to Last Drop. Click and drag the fields on to
the form. Release the mouse button in the centre of the form, just below
the Name field.
12. The form should look similar to that below. Handles can be used to resize
field and labels by dragging to the appropriate size.

13. Select File | Save As and enter Addresses as the form name. Leave the
form on screen for the next exercise.

© CiA Training Ltd 2003 114 Access XP


ECDL Section 7 Forms

Driving Lesson 70 - Editing Form Design


Park and Read
Once forms have been created they can be easily edited, e.g. to change the
arrangement of objects within the form layout.

Manoeuvres
1. The Addresses form is still visible in the Form Design window. Switch to
Form View the view the data. Switch back to Design View.
2. Select Edit | Select All or press <Ctrl A> to select all fields on the form.

3. Position the mouse over one of the fields. The pointer becomes a hand
. Click and drag all of the selected fields to the centre of the form.
4. From the menu, select View | Form Header/Footer. A new section
appears at the top of the form called Form Header. Whatever is placed in
here will appear at the top of the form.

5. From the toolbox, click on the Label tool, . Click and drag with the
Label pointer, , to create a box in the centre of the Form Header,
about 5cm by 1cm – use the ruler as a guide.
6. The box has an insertion point in it. Type in
CIA Addresses. Click outside the box to
check the appearance of the text. Click on
the box again to display the handles.
7. There are formatting buttons on the Formatting (Form/Report) toolbar
that can be used to change the text in the label box. Any text can be
changed in this way. The formatting will apply to all text in any selected
boxes.

8. Experiment by changing the font, size, appearance and alignment of the


text in the label box. End with the text large, bold and centred. Try
formatting some of the other labels and fields.
9. Scroll down to view the Form Footer. Click and drag the bottom edge of
the footer upwards to reduce its size to about 1cm. Use the Label tool to
add a box containing the word Confidential.
10. Click on the Form Header label box and amend the text to CIA Mailing
List. Resize the Form Header area so that the label box just fits in.
11. When completed, select the Save button to save the changes and
leave on screen for the next Driving Lesson.

Access XP 115 © CiA Training Ltd 2003


Section 7 Forms ECDL

Driving Lesson 71 - Sorting and Editing Data


Park and Read
Once a form has been created, data can be entered/browsed in the same way
as in Datasheet View. Once information has been entered, it is automatically
saved into the database. Any messages regarding saving the form are referring
to the format of the form and not the data entered.
To view records, use the Record Indicator.

Use and to sort the information.


To go to specific records press <F5> and enter the record number.

Manoeuvres
1. Switch to Form View of the new Addresses form in the Mailing
database.

Record Navigation
buttons

2. Click the New Record button, , to start a new record. Enter your
Name, Address, Organisation and Department. Notice that the record
has been added at the end, i.e. record 20.
3. Navigation buttons can be used to move through the records. Click the
Previous button, , 3 times to move to record 17, then the Next button,
, to move to record 18.

4. Move to the last record using . Use to delete your record.

© CiA Training Ltd 2003 116 Access XP


ECDL Section 7 Forms

Driving Lesson 71 - Continued

5. Click Yes at the warning message.

6. Use to move to the first record.

7. Click in Address (1) field and press the Sort Ascending button . The
first record is now that of Andrews High School.
8. Leaving the cursor in the same field, press the Sort Descending button
. The first record is now Wills school.
9. Sort the records by Towns – ascending. The first town will be Brighton.

10. Close the form saving it, if prompted.


11. Open the New Mail Form. This is essentially the same data, but with a
reference number included.
12. Click in the reference number and sort in descending order. Sort again in
ascending number order.
13. Press the <F5> the Goto key. The record number flashes and the status
bar shows Enter New Value.

14. Type in 6 and press <Enter>. The new record number is 6 and the
reference number is 6, i.e. the original order.
15. The computers for this record have been changed from IBM PC to Apple
Macs. Click in the computer field and delete the entry, just as in a table.
Enter Apple Mac in its place.
16. Goto record 12. This school has closed and so is to be deleted.

17. Press the Delete Record button and a warning dialog box appears.

18. Selection Yes to confirm the deletion. Check that there are now 18
records.
19. Close the form and the database.

Access XP 117 © CiA Training Ltd 2003


Section 7 Forms ECDL

Driving Lesson 72 - Filtering in a Form


Park and Read
An alternative to querying, filtering in a form can be useful for instant answers.
There are buttons on the toolbar to help. It is always advisable to remove a
filter after use, in case the data is inadvertently saved and the unfiltered data
lost.

Manoeuvres
1. Open the database Country, select the Forms object and open the
Country Form.
2. Go to record 8. Place the cursor in the Currency field. To filter (select)
all records that have dollar as their currency, click the Filter by Selection
button .
3. The record changes to that of Australia, the first in the table with this
criteria. However, notice that the record number indicator now shows 1 of
4 (Filtered) and the status bar shows FLTR.

4. Click the Remove Filter button to restore all records.

5. Filter by Form, , is used to filter using two or more criteria. Click on it


now. A blank form appears showing the last filter request on this form.

6. Delete the current criteria. In the Language field enter English and in the
Density field enter >5 (ranges can be used just as in queries).
7. Click the Apply Filter button. There are 5 records. Scroll through them to
establish that the criteria have been met. Remove the filter.
8. Leave the form open for the next Driving Lesson.

© CiA Training Ltd 2003 118 Access XP


ECDL Section 7 Forms

Driving Lesson 73 - Printing from a Form


Park and Read
A form is designed to be viewed on screen, but there will be occasions when a
hard copy is required. Once a form or pages of forms has been previewed,
then all records or specific records/pages of records can be printed.

Manoeuvres
1. The Country Form should still be open from the previous Driving Lesson.

2. Use File | Page Setup to ensure the page orientation is set to Portrait.

3. Use the Print Preview button to look at the 12 pages. The form properties
have been designed in such a way that several records can be displayed
on a page, but no record is split over two pages.

Pressing the Print button in Print Preview would print out all the pages.
4. Select File | Print to display the Print dialog box.

5. To print only the last page, click on Pages in the Print Range. In the
From and To boxes type in 12.

6. Click OK. Only the last page will be printed. Close Print Preview.

7. Press <F5> and go to record 8. Select File | Print. This time form the
Print Range, select Selected Record(s) and press OK. Only this record
will be printed.
8. Go to the first record and click in the Region field. Filter by Selection
and then Print Preview the result. Only 6 records are on view. Click the
Print button to print only these filtered records.
9. Remove the filter, close the form and close the database.

Access XP 119 © CiA Training Ltd 2003


Section 7 Forms ECDL

Driving Lesson 74 - Deleting a Form


Park and Read
Once a form is no longer required, or if it is not working out as expected during
design, then it can be deleted.

Manoeuvres
1. Open the database Daley and click the Forms object.

2. There are two forms available, neither is required. Click on Cars but do
not open it.

3. From the Database Window, click the Delete button .

4. Select Yes at the prompt. The Cars form is deleted.

5. Repeat for the Jobs subform.

6. Close the database.

© CiA Training Ltd 2003 120 Access XP


ECDL Section 7 Forms

Driving Lesson 75 - Revision


This Driving Lesson covers the features introduced in this section. Try not to
refer to the preceding Driving Lessons while completing it.

1. Use the AutoForm button, , to create a new form for the table
Houses from the Houses database.
2. Add a Form Header and enter a title of Current Houses.

3. Format the title text as Arial, 14pt, Bold. If necessary enlarge the Label
box to display the whole title. Reduce the Form Header size to fit the
label.
4. Reduce the size of the Form Footer area until it no longer exists.

5. Save the form as Houses Form and switch to Form View.

6. Filter by selection all the records that include the word House in their
Type field. Print Preview the result.
7. Sort these records into ascending order by Town.

8. Print out only the last page. Remove the filter.

9. Close the form and database.

10. Open the database Mailing.

11. At the Database Window click Forms in the Objects list, ,


then the New button.
12. Create a new, Columnar AutoForm from the Mailing table.
13. Filter all the school records and Print Preview them.
14. Print only pages 2 and 3 from this filter.
15. Close this form and database without saving.

Answers to this exercise can be found at the end of this guide.

If you experienced any difficulty completing the Revision, refer back to the
Driving Lessons in this section, then re-do the revision.

Access XP 121 © CiA Training Ltd 2003


Section 7 Forms ECDL

Driving Lesson 76 - Revision


This Driving Lesson covers the features introduced in this section. Try not to
refer to the preceding Driving Lessons while completing it.

1. Open the Country database.

2. Create a query based on the Country table including the following fields:
Country, Region, Capital, Population and Area.
3. Add criteria for populations over 50 million.

4. Save the query as Over 50.

5. Create a form using the Form Wizard based on this query.

6. Place all the fields from the query on the form.

7. Make it Columnar and choose a suitable style.

8. Name the form Over 50.

9. Add a title in the Form Header of Densely Populated Countries.

10. Change all of the text in the form to Book Antiqua size 12.
11. Check that all the data is displayed, if not resize the fields using the
handles so that no data is truncated.
12. Sort the records by Area ascending.
13. Add a label in the Form Footer and enter your name.
14. Preview the data. Print out all of the records.
15. Close the database, saving the changes to the form.

If you experienced any difficulty completing the Revision, refer back to the
Driving Lessons in this section, then re-do the revision.
Once you are confident with the features, complete the Record of Achievement
Matrix referring to the section at the end of the guide. Only when competent
move on to the next Section.

© CiA Training Ltd 2003 122 Access XP


ECDL Section 8 Reports

Section 8
Reports

By the end of this Section you should be able to:

Use Auto Report

Modify and delete Reports

Preview and Print Report

Sort Data in a Report

Group Data in Reports

Perform Calculations in Reports

To gain an understanding of the above features, work through the Driving


Lessons in this Section.
For each Driving Lesson, read the Park and Read instructions, without
touching the keyboard, then work through the numbered steps of the
Manoeuvres on the computer. Complete the Revision Exercise(s) at the end of
the section to test your knowledge.

Access XP 123 © CiA Training Ltd 2003


Section 8 Reports ECDL

Driving Lesson 77 - AutoReport


Park and Read
A report is usually used to present data in written format. Calculations can be
performed and data can be presented in a variety of ways. The AutoReport
facility enables quick, simple reports to be created.

Manoeuvres
1. Open the database Staff and click the Reports object .

2. Click the New button . At the


dialog box, select AutoReport:
Tabular and from the drop down list
Choose the table or query… select
the Staff table.

Reports, just as forms, can be based on any


table or any query.
3. Click OK and a simple report is created
and shown in Print Preview, where the magnifier can be used to
zoom into and out of the data.
4. To save the report for future use select
File | Save As. Because this report was
generated automatically, Access
suggests the name Staff, the same
name as the table
5. Click OK to save the report. Close the
preview with the Close button to enter Design view. Use File |
Close or the close button on the Menu Bar to close the report.
6. Close the database.

7. Open the database Daley.

8. To create a report based on a query, click the Reports object and then
click New.
9. Select AutoReport: Tabular and from the drop down list select the
Owners query. Click OK.
10. After previewing the report, save it as Previous Owners and close it.
11. Close the database.

© CiA Training Ltd 2003 124 Access XP


ECDL Section 8 Reports

Driving Lesson 78 - Grouped Report: Wizard


Park and Read
It is possible to group data in a report, so that records containing the same
information, in a particular field, can appear grouped together on the report.
The wizard helps in this process, by asking step by step questions.

Manoeuvres
1. Open the Houses database. Click the Reports object, then New.

2. At the New dialog box select Report Wizard and from Choose the table
or query… select the Houses table. Click OK.
3. Click on > to place Town, Type, Address, Price and Bedrooms into the
Selected Fields area for the report.

Access XP 125 © CiA Training Ltd 2003


Section 8 Reports ECDL

Driving Lesson 78 - Continued


4. Click Next. The report is to be grouped by Town. Select the Town field
and click on > to create the grouping.

5. Click Next. Sort alphabetically by Type (the order is Ascending by


default, clicking the button would reverse the sort order to
Descending). Leave the order as Ascending.

6. Click the Summary Options button.

© CiA Training Ltd 2003 126 Access XP


ECDL Section 8 Reports

Driving Lesson 78 - Continued

7. Suggestions are given where these calculations can be made (only for
numeric fields). Click in Avg, Min and Max for the Price field.
8. Click OK and then Next. Choose the Stepped Layout and Landscape
Orientation, if these are not already selected.

9. Click Next.

10. Choose the Corporate style, if not already selected and click Next.
11. Finally, name the report Grouped Town.
12. Click Finish to create, save and view the report. Any adjustments to field
sizes and positions that may be required would have to be made in
Design View.
13. The properties are all grouped by Town and appear in Type order within
that town. Summaries are shown for each group.
14. Close the report and close the database.

Access XP 127 © CiA Training Ltd 2003


Section 8 Reports ECDL

Driving Lesson 79 - Modifying a Report


Park and Read
Any report can be modified after it has been created. An AutoReport, for
example, may not display the data in exactly the way required.
Any area of a report can be altered, edited or formatted by switching to Design
View.

Manoeuvres
1. Open the Staff database and create a query based on the Staff and the
Courses tables. Include Title, Surname, Firstname from Staff and Date
and Course from Courses.
2. In the Date criteria include only those dates in the 1990’s
>=1/1/90 and <=31/12/99
3. Save the query as Completed Courses and close it.

4. Create a new report using the wizard, based on this new query.

5. Add all of the fields to the report and on the next screen leave the
suggestion for viewing the data as it is.
6. Choose to Group by Surname.

7. Sort by Date in ascending order.

8. Leave the layout and style as suggested.


9. Change the report title to Courses in the 1990s.

10. Finish the report and zoom in to view it.


11. The Surname and the rest of the name are a little far apart. Click the
Design View button to view the design of the report. The manipulation of
fields in Report design is the same as for fields in Form design.
12. Select both the label and the field for Surname by clicking on them both
while holding down <Shift>.
13. Click the handle in the middle of the right edge of one of the selected
boxes and drag it to the left to make both of them smaller.

© CiA Training Ltd 2003 128 Access XP


ECDL Section 8 Reports

Driving Lesson 79 - Continued


Always check in the report that the field remains large enough to display all the
data.

14. Select the label and the field for the Title and First Name (4 boxes) and
move them to the left, up to the right edge of the Surname fields.

15. Select the Date label and field and move them away from the Course
data.

16. Centre both the label and field for Date.

17. Preview the report. It should be much easier to read.


18. Change to Design View. Notice that the wizard has created a Report
Header (containing the report title), a Page Header (containing column
headings), a Page Footer (containing the date and page numbers) and a
Report Footer (currently empty).

In a report where these areas are not present they can be added by selecting
View | Page Header/Footer and View | Report Header/Footer.
19. Select the title text in the Report Header and change it to 1990 Courses.
20. Click on the lower edge of the Report Footer bar and drag it down to
create a data area about 2cm deep.
21. Create a Label box in this area and add the text Created by and then
your name.
22. Preview the report to see the new features.
23. Save the report and close it.
24. Close the database.

Access XP 129 © CiA Training Ltd 2003


Section 8 Reports ECDL

Driving Lesson 80 - Other Calculations in


Reports
Park and Read
While many calculations can be carried out during the report wizard, others can
be added to the report after the wizard is complete. This involves adding a text
box to contain the calculation. The positioning of the box is all-important,
especially in a grouped report.
All calculation definitions begin with an equal sign, =, and all field names used
are contained in square brackets, [ ]. Calculations can use existing functions
like Count and Sum or standard mathematical operators, e.g. =[Quantity] *
[Price].

Manoeuvres
1. Open the Houses database and the Grouped Town report.
2. Switch to Design View. The wizard has created a group header (Town
Header) and a group footer (Town Footer). To count the number of
properties in each town, a calculation must be entered in the group footer.
3. Select the text box in the Town Footer that begins Summary for… and
delete it.
4. Increase the size of the footer and from the Toolbox click the Text Box
button . Draw a text box at the left of the Town Footer. This
immediately becomes two boxes, a label and an unbound box. Enter the
following information in the label and the unbound box.

.
If the boxes overlap, move the mouse over the top left corner until it becomes a
pointing hand and click and drag the top box away, , then reposition
each box using the pointing hand.

Any field that contained data for every record could have been counted.
5. Draw another text box below the first and enter the following
. Make the Town Footer deeper, if
necessary.

6. Print Preview the report. Because the calculations were placed in the
Town Footer, each town now shows the number of properties and the
total price of the properties in that town.
7. Save and then close the report, but leave the database open.

© CiA Training Ltd 2003 130 Access XP


ECDL Section 8 Reports

Driving Lesson 81 - Printing from a Report


Park and Read
By default, once the design of a report is completed, the view becomes
Preview. This allows the creator to view how the report will print and whether
all fields will be displayed. If they are not, then the formatting and editing will
have to be done in Design View.
Once satisfied with the layout, printing may commence. It is possible to print all
of a report or to specify pages.

Manoeuvres
1. In the Houses database, open the report Grouped Town.

2. The report opens in preview and was created earlier. This is how the
report will look when printed.
3. The report covers approximately six pages (depending on how big the
footer area was made in the previous lesson). Click the navigation buttons
to confirm this. Select File | Page Setup.

4. The Margins tab allows the white space around the report to be altered,
note that it is in millimetres. Change all margins to 15mm and click OK.
The number of pages may decrease.
5. Click the Print button to print the whole report.

6. Select File | Page Setup and click the Page tab.

Access XP 131 © CiA Training Ltd 2003


Section 8 Reports ECDL

Driving Lesson 81 - Continued

7. There are several paper and envelope sizes available from here, as well
as the orientation options. The actual options available will depend on the
type of printer that is connected. Select Letter, if available and change the
orientation to Portrait.
8. Click the Columns tab.

9. These settings control the number of columns in a multiple column report,


e.g. when printing address labels, they may be spaced over 3 columns for
instance. This will not concern you during this module.
10. Click OK to view the newly formatted report. It now covers more pages
and does not look very good. Change the orientation back to Landscape
and the paper size back to A4.

© CiA Training Ltd 2003 132 Access XP


ECDL Section 8 Reports

Driving Lesson 81 - Continued


11. Select File | Print to display the print dialog box.
12. In the Print Range area select to print only page 2 (enter 2 in the From
and To box). Click OK to print.
13. Select File | Page Setup and change all the margins to 20mm. Click in
the Print Data Only box and click OK to view the effect – no headers or
field names are shown.

14. Alter the Top and Bottom margins to 30mm. Remove the check from
Print Data Only to reinstate the report headers and footers.
15. Click OK to view the result.
16. Select File | Print to view the Print dialog box. To print only specific
pages from a report, enter the start and finish number in the From and To
boxes.
17. Print pages 2 to 5.

18. Close the report and the database without saving any changes.

Access XP 133 © CiA Training Ltd 2003


Section 8 Reports ECDL

Driving Lesson 82 - Deleting a Report


Park and Read
As with all other database objects, once a report becomes obsolete it can be
deleted.

Manoeuvres
1. Open Staff database and the Reports object

2. The report Courses in the 1990’s was short term and is no longer
required.
3. Click on it, but do not open it.

4. Click the Delete button from the database window.

5. At the dialog box, select Yes to permanently delete the report.

6. Close the database.

© CiA Training Ltd 2003 134 Access XP


ECDL Section 8 Reports

Driving Lesson 83 - Revision


This Driving Lesson covers the features introduced in this section. Try not to
refer to the preceding Driving Lessons while completing it.

1. Open the database Country.

2. Create a columnar AutoReport for the Regions table.

3. Save the report as Regions. How many pages does it have?

4. Print out the first 3 pages.

5. In Design View, change the format of the fields to Britannic Bold, size
11. Check that all the data is still on view.
6. Close the report saving any changes and close the database.

7. Open the database Mailing.

8. Create a report based on the Mailing table, using the Report Wizard.

9. Select all of the fields for the report, but do not add grouping levels.

10. Sort by Name in descending order.


11. Make the layout Columnar and the orientation Portrait.
12. Select the Bold style and name the report Contacts.
13. Reduce all the margins to 10mm.
14. Alter the size of the report header, so that 3 records can be viewed on the
first page.
15. Print the report.
16. Close the report saving any changes `and close the database.

Answers to this exercise can be found at the end of this guide.

If you experienced any difficulty completing the Revision, refer back to the
Driving Lessons in this section, then re-do the revision.

Access XP 135 © CiA Training Ltd 2003


Section 8 Reports ECDL

Driving Lesson 84 - Revision


This Driving Lesson covers the features introduced in this section. Try not to
refer to the preceding Driving Lessons while completing it.

1. Open the database Football Agent.

2. Create a query based on Current Status and Past Clubs tables.

3. Include the fields Surname, First Name, Date Joined, Current Club,
Past Clubs and Transfer fee.
4. Save the query as Commission.

5. Use Report Wizard to create a report based on this query.

6. Place all available fields on the report, view the data by Past Clubs and
group by Surname.
7. Sort by Date Joined and select to show the average transfer fee.

8. Choose the Stepped layout and an orientation of Landscape.

9. Choose any style, change the name of the report to Commission and
click Finish.
10. View the report. A calculation for the commission on each transfer is to be
added. Switch to Design View.
11. Draw a Text Box at the right of the Detail area. The label needs to be
moved.
12. Click on the label (it will show Text21 or similar) so that the handles are on
view.

13. Select Edit | Cut to remove the label. Click in the Page Header area and
then the Paste button to place the label at the far left of this area.
14. Move the label (use the hand) to an appropriate position above the
Unbound text box.

© CiA Training Ltd 2003 136 Access XP


ECDL Section 8 Reports

Driving Lesson 84 - Continued


15. Click and drag to select the text inside the label and change it to
Commission.
16. Click in the associated field (it will show unbound until in use).
17. Type in =[Transfer Fee]*10/100. This will give a result of 10% of the
transfer fee – remember all field names must be in square brackets.
18. Save this position and view the report. The calculations have been made.
19. The agent now wants to know how much commission in total has been
made. In Design View, scroll to the bottom of the report and increase the
size of the report footer. Any data included in here will only be shown
once in the report, ideal for this information.
20. Draw a text box in this area. As before, edit the label, this time to show
Total Commission.
21. The formula is =Sum([Transfer Fee]*10/100) – to add all the calculations
together.
22. Save the position and view the report. The calculation is made.
23. Switch to Design View. The calculated fields would be better displayed as
currency. Right click on them and select Properties from the shortcut
menu.
24. Click the Format tab and, from the Format drop down list, select
Currency.
25. Save the report and preview.
26. Make any other formatting changes required to enhance the appearance
of the report and print the result.
27. Close the report and the database, saving any changes.
28. Close Access.

If you experienced any difficulty completing the Revision, refer back to the
Driving Lessons in this section, then re-do the revision.
Once you are confident with the features, complete the Record of Achievement
Matrix referring to the section at the end of the guide.

Access XP 137 © CiA Training Ltd 2003


Module 5 Database ECDL

Answers
Driving Lesson 37
Step 8 Record 5
Step 9 Record 6

Driving Lesson 38
Step 11 Argentina (Record 2), Brazil (Record 6), Canada (Record 8), Mexico
(Record 26), Peru (Record 35) and USA (Record 46)
Step 14 Finland (Record 13), Libya (Record 25), Israel (Record 32) and
Norway (Record 34)

Driving Lesson 44
Step 8 There are 7 countries in the Middle East region.
Step 9 There are 9 capital cities beginning with B.

Driving Lesson 46
Step 2 There are 3 customers living in County Durham.

Driving Lesson 51
Step 2 There are 4 properties in Whitehaven.
Step 3 13 properties have 3 bedrooms.
Step 4 There are 6 properties in a Town beginning with C.
Step 5 There are 3 flats.
Step 8 There are 47 countries on the database.
Step 9 6 countries have English as their main language.
Step 10 Ehtiopia is first
Step 11 There are 26 non-European countries.
Step 12 Japan is the most densely populated country outside Europe.

© CiA Training Ltd 2003 138 Access XP


ECDL Module 5 Database

Driving Lesson 52
Step 3 There are 4 records with Mr as the Title.
Step 7 There are 6 unpaid orders.
Step 12 Yes the Saab, registration E476 WSG
Step 13 Because the data type is not number

Driving Lesson 53
Step 8 There are 4.
Step 9 There are 3 men involved in sales.
Step 10 3 employees started work in 1985.
Step 11 Only 1 person is paid £15,000.
Step 12 The oldest member of staff is Ian Chapman (unless you have
added someone older).

Driving Lesson 64
Step 4 There are 5 properties in Cockermouth.
Step 6 There are 11 properties with a garage.
Step 7 There are 26 properties for sale
Step 8 There are 13 properties with three bedrooms.
Step 9 There are 4 properties in Whitehaven.
Step 10 There are 8 properties costing less than £22,000.
Step 11 There are 3 properties costing between 40 and 50 thousand.
Step 12 Whitehaven, 9 Deepdene, Listed Building.
Step 13 11 properties have offers on them.

Driving Lesson 65
Step 1 4 players earn more than £100,000
Step 7 7 repairs carried out on 02/01/02
Step 12 There are 4.
Step 13 3 staff have been on an introductory course.
Step 14 Mr Waldram.

Driving Lesson 75
Step 6 There are 18 houses.
Step 13 There are 13 schools.

Driving Lesson 83
Step 3 The report has 16 pages.

Access XP 139 © CiA Training Ltd 2003


Module 5 Database ECDL

Glossary
AND A logical operator. Can be used in queries when a value
must satisfy all of the conditions.
AutoReport A report automatically generated by Access.
AutoForm A form created automatically by Access.
Field The separate areas in a table, which form Rows and
Columns and Records.
Foreign Key A primary key from table A, which is also used as a key field
in table B is called a Foreign Key.
Form A user defined display on the screen which controls how the
user interacts with the database.
Integer A positive or negative whole number (no decimals) or zero.
Long Integer A larger positive or negative whole number, or zero.
Macro An automated way of performing one or a series of actions.
One-to-many Any one record from table A may be related to one or many
records from table B.
One-to-one One record from table A is related to one record from table
B.
OR A logical operator. Can be used in queries when a value
needs to match at least one of two or more conditions.
Primary Key A field which uniquely identifies a record, e.g. telephone
number in a table.
Query A method of extracting specific information from a database.
Record A set of inter-related data.
Referential Integrity When applied to a relationship, data cannot be altered or
deleted in the second table, without the primary table first
being altered. This ensures the data in the tables is always
valid.
Relationships The ability to connect tables of data, so that no data need to
be repeated.
Report A hard copy of related data taken from a database.
Table A form of data storage consisting of Rows and Columns.
Validation Rules Defines the permitted entry into a field which the user can
make. Entries that do not conform to the rule cannot be
entered.
Wildcard Characters used in searches that allow one or many letters
to be replaced by the wildcard ( ? and * ).

© CiA Training Ltd 2003 140 Access XP


ECDL Module 5 Database

Index
Adding Entering Data in a Table 30
Fields 44
Field
Records 72
Add New 44
Access Editing 35
Close 16 Properties 28
Start 9
Filtering 77
And Queries 97 Filter For 81
Auto Filters Excluding Selection 80
AutoForm 105 Using Filters 79
AutoReport 120 Finding Data 66
Calculated Fields 126 Format
Close Changing Column Width 64
Databases 16 Field Property 28
Tables 16
Forms 104
Column Width 64 AutoForm 105
Create Deleting 116
New Database 24 Designing a Form 109
New Form 105, 107 Editing a Form 111
New Report 120, 121 Editing Data 112
A Table Structure 25 Filtering 114
Printing 115
Databases 7
Sorting Data 112
Closing 16
Wizard 107
Creating a New Database 24
Opening 13 Grouped Report: Wizard 121
Principles 8 Help 11
Queries 85
Indexes 32
Window 15
Menus 10
Deleting
Forms 116 Moving
Queries 100 Columns 65
Records 58 Using the Keyboard 22
Relationships 54 Using the Mouse 20
Reports 130 Non-Matches 96
Tables 45 Online Help 11
Editing Open
Adding Records 30, 72 Application 9
Changing the Column Width 64 Existing Database 13
Deleting Records 58
Or Queries 99
Editing a Form 111
Editing Data 69, 71 Primary Key
Defining 31
Finding Data 66
Shortcuts 73 Printing
Undo 70 From a Table 42
Updating Records 58 Tables 40
Using Wildcards 67

Access XP 141 © CiA Training Ltd 2003


Module 5 Database ECDL

Queries 85 Tables 19
And Queries 97 Closing 16
Deleting 100 Creating a Table Structure 25
Editing 94 Defining a Primary Key 31
Non-Matches 96 Deleting 45
Or Queries 99 Entering Data 30
Printing 91 Format Field Property 28
Querying a Table 86 Indexes 32
Ranges of Values 95 Querying a Table 86
Related Tables 92 Relationships 50
Saving 89 Using the Keyboard to Move 22
Sorting 89 Using the Mouse to Move 20
Querying A Table 86 Toolbars 10
Ranges Of Values 95 Undo 70
Records Validation
Adding 72 Rules 37
Deleting 58, 72 Text 37
Updating 58
Wildcards 67
Referential Integrity 57
Relationships 50
Applying 52
One-to-One 55
Referential Integrity 57
Reports 119
AutoReport 120
Calculations in 126
Deleting 130
Grouped Report Wizard 121
Modifying a Report 124
Printing 127
Revisions
Databases 17-18
Editing 74-76
Forms 117, 118
Queries 101, 102
Relationships 60-62
Reports 131-133
Sorting and Filtering 82-84
Tables 46-48
Searches
For Data 66
Non Matches 96
Sorting 77
Data 78
Queries 89

© CiA Training Ltd 2003 142 Access XP


ECDL Module 5 Database

Record of Achievement
Matrix
This Matrix is to be used to measure your progress while
working through the guide. This is a learning
reinforcement process, you judge when you are
competent.

Tick boxes are provided for each feature. 1 is for no


knowledge, 2 some knowledge and 3 is for competent. A
section is only complete when column 3 is completed for
all parts of the section.

For details on sitting ECDL Examinations in your country


please contact the local ECDL Licensee or visit the
European Computer Driving Licence Foundation Limited
web site at http://www.ecdl.com.

Access XP 143 © CiA Training Ltd 2003


Module 5 Database ECDL

Tick the Relevant Boxes 1: No Knowledge 2: Some Knowledge 3: Competent


Section No Driving Lesson 1 2 3
1 Databases 1 Database Principles
2 Starting Access
3 Menus and Toolbars
4 Help
5 Opening an Existing Database
6 The Database Window
7 Closing Tables, Databases and Access

2 Tables 10 Moving Using the Mouse


11 Moving Using the Keyboard
12 Creating a New Database - Designing & Planning
13 Creating a Table Structure
14 Format Field Property
15 Entering Data in a Table
16 Defining a Primary Key
17 Indexes
18 Editing Field Properties
19 Validation Rules/Text
20 Previewing and Printing a Table
21 Printing From a Table
22 Adding a New Field to an Existing Table
23 Deleting a Table

3 Table Relationships 27 Table Relationships


28 Applying Relationships
29 Creating a One-to-One Relationship
30 Referential Integrity
31 Updating and Deleting Records

4 Editing 35 Changing Column Width


36 Moving Columns
37 Finding Specific Data
38 Using Wildcards
39 Editing Data
40 Undo
41 Further Editing
42 Adding/Deleting Records
43 Editing Shortcuts

© CiA Training Ltd 2003 144 Access XP


ECDL Module 5 Database

Tick the Relevant Boxes 1: No Knowledge 2: Some Knowledge 3: Competent

Section No Driving Lesson 1 2 3


5 Sorting and Filtering 47 Sorting Data
48 Using Filters
49 Filters: Excluding Selection
50 Filter For

6 Queries 54 Querying a Table


55 Sorting and Saving Queries
56 Printing Query Results
57 Querying Related Tables
58 Editing Queries
59 Ranges of Values
60 Non-Matches
61 And Queries
62 Or Queries
63 Deleting a Query

7 Forms 66 Forms
67 AutoForm
68 Form Wizard
69 Designing a Form
70 Editing Form Design
71 Sorting and Editing Data
72 Filtering a Form
73 Printing from a Form
74 Deleting a Form

8 Reports 77 AutoReport
78 Grouped Report Wizard
79 Modifying a Report
80 Other Calculations in Reports
81 Printing from a Report
82 Deleting a Report

Access XP 145 © CiA Training Ltd 2003


Module 5 Database ECDL

Other Products from CiA Training


If you have enjoyed using this guide you can obtain other products from our range of
over 100 titles. CiA Training Ltd is a leader in developing self-teach training materials
and courseware.

Open Learning Guides


Teach yourself by working through them in your own time. Our range includes
products for: Windows, Word, Excel, Access, Works, PowerPoint, Project, Lotus 123,
Lotus Word Pro, Internet, FrontPage and many more… We also have a large back
catalogue of products, including PageMaker, Quattro Pro, Paradox, Ami Pro, etc.
please call for details.

ECDL Advanced
Have you enjoyed doing the standard ECDL? Well why not go one step further and
take the new ECDL advanced qualification? Materials are now available which follow
the same format as our successful ECDL core material.

New CLAIT, CLAIT Plus & CLAIT Advanced


Open learning packages are now available for the new OCR New CLAIT, CLAIT Plus
& CLAIT Advanced qualifications. The packages enable the user to learn the features
needed to pass the assessment using a gradual step by step approach.

Schools Editions
Specially written for older pupils, to be used by teachers, these guides integrate I.T.
into the curriculum and take the pupil through the features of various software
packages, with many revision exercises at the end of each section. Teacher's notes
are included. Products include guides to Word, Excel, Access and Publisher.

Trainer’s Packs
Specifically written for use with tutor led I.T. courses. The trainer is supplied with a
trainer guide (step by step exercises), course notes (for delegates), consolidation
exercises (for use as reinforcement) and course documents (course contents, pre-
course questionnaires, evaluation forms, certificate template, etc). All supplied on CD
with the rights to edit and copy the documents.

Purchasing Options
The above publications are available in a variety of purchasing options: as single
copies, class sets and/or site licences. However, Schools Editions and Trainer’s Packs
are only available as site licences.

Conventional Tutor Led Training


CiA have been successfully delivering classroom based I.T. training throughout the UK
since 1985. New products are constantly being developed please call to be included
on our mailing list. Information about all these materials can be viewed at
www.ciatraining.co.uk.

© CiA Training Ltd 2003 146 Access XP


ECDL Module 5 Database

Notes

Access XP 147 © CiA Training Ltd 2003


Module 5 Database ECDL

Notes

© CiA Training Ltd 2003 148 Access XP

You might also like