Вы находитесь на странице: 1из 193

Happy Computers Manual for...

Access 2007/2010
Essentials
This course guide is produced for the Happy Computers Access 2007/2010 Essentials course
For all your computer training needs contact:
Happy Computers, Cityside House, 40 Adler Street, London, E1 1EE
Help-line: 020 7375 7373 help_line@happy.co.uk
Bookings: 020 7375 7300
Copies of this guide can be obtained from Happy Computers, fully bound, at a cost of 15
each, or 10 for extra copies for organisations who have booked courses.
Happy Computers allows this guide to be copied, provided that permission is sought and the
name and phone number of Happy Computers remains on the copies.

HappyComputers2012408/08/12V1

Access2007/2010EssentialsContents

Contents
Contents ............................................................................... 2
Happy Computers Telephone Help-Line .......................... 5
What is a Database? ........................................................... 6
What is a Database? ......................................................................................... 6

The four key parts to an access database ........................ 7


Jargon used .................................................................................................... 10
Getting started in Access ................................................................................ 11
Using a Database ............................................................................................ 13
Using tables .................................................................................................... 17
Selecting within a table.................................................................................... 19
Changing the look of your table ....................................................................... 20
Entering information into tables ....................................................................... 22
Printing and print preview ................................................................................ 26
Searching for and finding records ................................................................... 28
What can go wrong when searching for information?...................................... 31
Sorting records ................................................................................................ 32
Using a form instead ....................................................................................... 33
Filters .............................................................................................................. 37

Queries ............................................................................... 41
Queries............................................................................................................ 41
Creating a simple query without wizards ......................................................... 41
What are the main views of a query? .............................................................. 46

What can go wrong when creating a query? .................. 48


Creating a query using simple criteria ............................................................. 51
Using more than one criteria ........................................................................... 52
Using numbers, dates and wildcards............................................................... 55
Using the * wildcard......................................................................................... 58
Checking a querys results .............................................................................. 59
Examples for using criteria .............................................................................. 61
Sorting your query ........................................................................................... 62
Showing/hiding fields....................................................................................... 64

Creating a Database .......................................................... 66


Design Principles ............................................................................................ 66
Creating a new database without wizards ....................................................... 69
Creating a simple table without wizards .......................................................... 71
What are the main views of a table? ............................................................... 76
Extra information on the primary key ............................................................... 77
What can go wrong when creating a table? .................................................... 78
Setting field properties..................................................................................... 78
What can go wrong with setting field properties? ............................................ 83
Field properties extra information ............................................................. 83

Lookups ............................................................................. 87
Using lookups .................................................................................................. 87

Page2

HappyComputers02073757300

Access2007/2010EssentialsContents

Creating a lookup ............................................................................................ 87


Creating a lookup based on another table ....................................................... 88
Creating a lookup solely using the wizard ....................................................... 91
Limit the choices in a lookup ........................................................................... 93
What can go wrong when youre using the lookup? ........................................ 94

Relational Database Design ............................................. 96


Relational Databases ...................................................................................... 96
Linking tables................................................................................................... 97
Creating a relationship between tables ............................................................ 98
What might go wrong when setting up a relationship? .................................. 102
Amending relationships between tables ........................................................ 110
Choosing what to display in the relationship window ..................................... 111
Printing out your relationships ....................................................................... 112

The hierarchy of an Access Database .......................... 114


The hierarchy of an Access Database ....................................................... 114

Forms ............................................................................... 115


Forms ............................................................................................................ 115
Creating a form using the wizard ................................................................... 116
What are the main views of a form? .............................................................. 118
Design view of a form in more detail .......................................................... 122
Selecting within a form in Design view .......................................................... 122
Form Layout .................................................................................................. 124
Changing the look of your form...................................................................... 126
Improving the look of a form .......................................................................... 128
Setting the tab order ...................................................................................... 132
What can go wrong when editing a form? ..................................................... 133
Adding Smart tags to a form .......................................................................... 134

Main and sub tables and forms ..................................... 136


Main and sub tables ...................................................................................... 136
Main and sub forms ....................................................................................... 137
Creating a sub form on a main form .............................................................. 137
What can go wrong in creating a main and sub form? .............................. 142
Creating a main and sub form together ......................................................... 144
Using a main and sub form ............................................................................ 150

Reports............................................................................. 152
Reports .......................................................................................................... 152
Creating a quick report .................................................................................. 154
Editing your report in Layout View ................................................................. 155
Grouping information ..................................................................................... 158
What are the different views of a report? ....................................................... 162
Switching between views ............................................................................... 164
Tips on improving a reports layout ................................................................ 165
Sending a report to Word .............................................................................. 166
Creating a report using the wizard ................................................................. 166
Creating a report with calculations using the wizard ...................................... 169
Editing text in a report .................................................................................... 172
Creating mailing labels .................................................................................. 174
Creating a mail merge to Word ...................................................................... 177

HappyComputers02073757300

Page3

Access2007/2010EssentialsContents

Using a previously saved document to merge ............................................... 181

Advanced Queries ........................................................... 183


Queries that prompt for criteria ...................................................................... 184

Flowchart Database design ......................................... 189


Flowchart Database design ........................................................................ 189

Index ................................................................................. 190

Page4

HappyComputers02073757300

Access2007/2010EssentialsHappyComputersTelephoneHelpLine

Happy Computers Telephone Help-Line


We want to hear from you. The aim of our courses is to leave delegates
confident in using the software. If you have difficulty with any aspect of what you
covered on the course, we want to know about it and we want to help you
through it. It is a guarantee of the quality of our training, so we dont extend it to
anyone else in your organisation who has not been trained by us. (Though ring
us if you would like to arrange cover for holidays or sickness).
For two years from the day of your course
you will be able to use the helpline free of
charge, even if you have changed jobs since
doing the course.

You can contact us if you have a


question that relates to the course
you did with Happy Computers
(Sorry its not a General Helpline).

The help-line hours are 9.30am - 5.00pm

help_line@happy.co.uk
020 7375 7373

We do our best but we dont


guarantee instant answers please
see the table below for our target
call resolution times.

Access, VBA and web courses: please note: we will do what we can to help
but we cannot carryout debugging or redesign work.
This is a category B course
Category A
90% solved within one hour
Category B
90% solved within four hours
Category C
90% solved within 24 hours
Category D
90% solved within 2 working days
Category E
One special trainer only 90% solved within 2 working days unless
the trainer is on holiday/sick
Category F
90% solved within 5 working days
If your question goes beyond the level of the course you attended it is up to the
discretion of the Helpline person whether they answer it. We will always try to
point you to another source of help if this is the case.

We want you to ring


Your help-line questions also help us. We find out how you use the software, the
problems you hit, and sometimes, bugs we dont know about. All this helps to
improve our courses and our service. So please keep those calls coming. If you
have difficulty getting through please contact Henry Stewart, Chief Executive of
Happy Computers, on his personal mobile number (07870 682442) or you can
email him at the following address: henry@happy.co.uk

HappyComputers02073757300

Page5

Access2007/2010EssentialsWhatisaDatabase?

What is a Database?
What is a Database?
What is a Database?
A Database is a collection of information, with the information arranged in a
structured way. Some examples of paper-based Database systems are:
A telephone directory
A card index
A filing system

Three key advantages for using a computerised Database are:


Theyareflexible
You can choose to view individual information or many pieces of
information
You can sort it in anyway you choose
It doesnt take up lots of physical space
Easytocrossreferenceinformation
You can choose to select many pieces of information based on more than
one piece of criteria (i.e. I want to see everyone who has attended an
access course AND within the last 3 months).
Theydontrelyononekeypieceofinformation
You can find the information you want by searching on whatever piece of
information you choose (i.e. You can search for an employee in a
personnel Database by their first name, or last name, or employee id, or
even the department they are in etc).

Do you need a Database?


Consider what you want a Database for. Will it help you work more efficiently, or
will the effort and time you put in outweigh the benefit of using the Database?

A good example
If you have a list of clients on a Database, you could search through and
find those clients in say Warwickshire, that have spent X amount on your
product or service over the last year but have not placed an order in the
last three months, and then you could mailshot them

A bad example
A list of suppliers who you only need to look up by name. A simple card
file (or table in Word) may be quicker and a lot cheaper, if all the
information is simply listed in alphabetical order and is only needed in that
order.

Page6

HappyComputers02073757300

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

The four key parts to an access database


There are four crucial objects in an access Database. Each object provides a
key function.

Tables

Tables provide the structure for your information


Tables provide a way to key in information
Tables allow you to see multiple pieces of information at one time

Queries

Queries provide a way for you to ask questions of your Database

HappyComputers02073757300

Page7

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

For example: I want to see all the women in the sales department in alphabetical
order by surname

Page8

HappyComputers02073757300

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

Forms

Forms provide a way to key in information that is much more user friendly
Forms allow you to see just one piece of information at a time

Reports

Reports provide a way of producing professional looking output

HappyComputers02073757300

Page9

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

Jargon used
Some of the jargon that you might come across in this manual (or generally
when using and creating Databases) is shown below:

Record

A whole piece of information about a person or thing in your Database

For example:

Field

One piece of information about a person or thing in your Database

For example:

Data

Page10

Another way of saying information

HappyComputers02073757300

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

Getting started in Access


Starting Access
1. Click on the Start button
2. Click on All Programs
3. Click on Microsoft Access (it may be in the Microsoft Office group)

Opening a Database in Access 2007


When you open Access, the following window will be displayed:

UsingthewindowtotherightoftheAccessscreen:
1. Click on the Database you want to open
(the last 4 Databases used will be displayed)

Or
Click on More

HappyComputers02073757300

Page11

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

Opening a Database in Access 2010


When you open Access, the following window will be displayed:

1. Click on Open

2. Find your Database file


3. Click on Open

Exiting Access
Click the Close button on the Access window

Click on the Cross to Close

Page12

HappyComputers02073757300

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

Using a Database
The Navigation Pane
The Navigation Pane provides easy access to all of your objects:

But I can only see my tables!


By default Access 2007 will only show your tables in the Database
window. To see other Database objects see below.

HappyComputers02073757300

Page13

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

Viewing other Database objects

Click here

Click next the objects you


want to see

Cant see your Navigation pane?


It may be minimised! See below

Page14

HappyComputers02073757300

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

Minimising the Navigation Pane

Click here to minimise


the Navigation Pane

And here to
restore it

Opening a Table, Query, Form or Report

Double-click on
the object you
want to open

Managing multiple objects


You may need to open several tables, forms queries or reports at the same time
while using your Database. Access offers two ways of managing your Database
objects:

Windows
Tabs

HappyComputers02073757300

Page15

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

Usingwindows
Each Database object will open in a new window:

To switch between windows:


1. Click on the Switch Windows Button

2. Click the Database object you want to work with

UsingTabs

To use tabs:
1. Click on the Office button (2007) or the File tab (2010)
2. Click on Excel Options (2007) or Options (2010)
3. Click on Current Database on the left

Page16

HappyComputers02073757300

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

4. Select Tabbed Documents and ensure that there is a tick next to


Display Document Tabs

You will have to close and reopen your database for this to take
effect

Using tables
What is a table?
Tables are the core of your Database:

Each table is made up of rows and columns


Each row holds one complete piece of information one record
Each column holds one piece of information per record one field

Opening a table
Double-click on the table you want to open

The different parts of a table


Column headings
field names

A cell
Scroll
bars to
move
about
Record
Selectors
each
row is
one
record

Record navigation buttons

HappyComputers02073757300

Page17

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

What are the + signs down the left side of a table?

They are an indication there is more information about that item


but hold that thought! It will make more sense once you
understand relationships!

The Record Navigation buttons


You can click here, type the record number
you want & press return to go there

First
record

New record

Previous record
Next
record

Last
record

Useful keys to use within your table


Tab

To move around your table

F2

Will either highlight the


information in a cell or place the
cursor in a cell

Spacebar

Will let you place a tick in a


check box

Esc

To escape out of a record you


are stuck in

Page18

HappyComputers02073757300

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

Selecting within a table


To alter information in a table or alter some of the layout of a table, you first
need to make a selection:

Selecting a record
Click on the record selector of a record

Selecting more than one record at a time


Click on the record selector of the first record and drag down the other
records you want
Or
1. Click on the record selector of the first record
2. Hold down SHIFT
3. Click on the record selector of the last record you want
Can I select multiple records that arent next to each other?
No! If you do want a list of records that arent next to each other,
then you probably need to create a query.

Selecting one column


Click in the column heading

Selecting more than one column at a time


Click in the column heading of the first one and drag across the other
columns you want
HappyComputers02073757300

Page19

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

Or
1. Click in the column heading of the first column
2. Hold down SHIFT
3. Click in the column heading of the last column you want
Can I select multiple columns that arent next to each other?
No! If you do want to select columns that arent next to each
other, then you need to move them so that they are adjacent first!
Click and drag on the column heading to move a column.

Selecting a cell
Click on the edge of a cell to select it

Changing the look of your table


You can change the way that your table looks either temporarily or permanently.
For example:
Move a column to a new place in the table
Change the width of a column
Freeze a column, so when you move through the table this column stays
fixed
Hide a column and then show it again
To make any changes permanent, just SAVE the layout of your table when you
close it.

Moving a Column
1. Select the column
2. Place your mouse in the column heading

3. Drag the column to its new place

Changing a column width


If you are unable to see all the information in a column you can increase the
width (or even decrease it if the column is too wide!):

Page20

HappyComputers02073757300

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

1. Place your mouse between the column headings

2. Double-click

Freezing a column
If you are making amendments to the information in your table, you may find it
easier if you fix into position one (or some) of the key columns. This means
when you scroll across your table these columns stay in place:

1. Select the Column or Columns


2. Right-click
3. Select Freeze Columns
Where are your frozen columns now?
Access will automatically move any columns that you choose to
freeze, to the beginning of your table.

Unfreezing a column
If you have chosen to freeze a column (or columns) then you can also unfreeze
them:
1. Right-click in the column heading area
2. Select Unfreeze All Columns
My columns are still at the beginning!
After you have unfrozen a column it will remain at the beginning of
the table, unless you choose to move it back to its original place.
Or you could choose not to Save the Layout changes when you
exit this table.

Hiding a column
You can temporarily hide columns to make keying information in easier:
1. Select the Column or Columns
2. Right-click
3. Select Hide Columns (2007)
or
Select Hide Fields (2010)

HappyComputers02073757300

Page21

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

Showing a column
Hidden columns can be shown again just as
easily:
1. Right-click on any visible column
2. Select Unhide Columns (2007)
or
Select Unhide Fields (2010)
3. Click in the box next to the column(s) you want to show (they wont
have a in them!)
4. Click Close

Saving the layout changes


If you do want to save the layout changes to your table:
1. Click the Close button on the table

2. Click Yes (to keep the changes)


or
Click No (to return to how the table originally looked)

Entering information into tables


What if I realise Ive made a mistake?
Just press the ESC key to escape out of a new record or a change
you dont want!

Editing a record
1. Click into the cell you want to edit
2. Make the changes you want
When are the changes saved?
As soon as you start typing a pencil will appear in your record
selector area:
Once you move to another record, the pencil will disappear and
any changes you have made ARE AUTOMATICALLY SAVED!

Page22

HappyComputers02073757300

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

Undoing changes to records


Access allows you to undo ONE action only when modifying data:
Click on the Undo button

Why am I allowed only ONE undo?


When editing records you can only undo one change because
after each change Access is automatically saving your data. For
this reason it is recommended that you regularly back up your
Database so that if a whole batch of data is changed incorrectly
you can go back to a previous version. When designing or building
a form you will be able to undo many more actions.

Entering a new record


1. Click on the New Record button
2. Type in the new record of information
3. Click into another record to save
Can I key a brand new record anywhere in my table?
No, only in the last row of the table:

This is your clue to where a new record goes:

HappyComputers02073757300

Page23

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

Repeating information
When typing in a new record you might want to key in some information that is
already in the record above:
(For example to add SALES to the next record here:)

1. Place your cursor in the field below


2. Press CTRL and
(the CTRL key plus the apostrophe key)

Deleting a record
1. Select the record
2. Press DELETE on your keyboard
What if your table is linked to another one?
If you are working in a table that is linked to another one, you may
not be able to delete any records for people who also have
records in the other table.

You will need to go to the other table or tables first and delete
there, then return to this table and try again.

Spell checking your information


1. Select the area of your table you want to check spelling on
2. Click on the Spelling button
3. When finished, Click on OK

Page24

HappyComputers02073757300

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

Using Auto Correct


You can use AutoCorrect to automatically correct text that you frequently
mistype:

1. Click on the Office button


or

and click on

(2007)

Click on the File tab and click on Options

(2010)

2. Click on
3. Click on
4. Click on
5. Click in the Replace box and mistype the text

6. Click in the With box and correctly type the text

7. Click on
8. Click on OK

Closing a table
Click the Close button on the table window

Or, if maximised

HappyComputers02073757300

Click here to
Close

Page25

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

Printing and print preview


Printing all your records
To print ALL the records in a table:
1. Click on the Office button (2007)
or
Click on the File tab (2010)
2. Click on Print
3. Click on

Printing a selection of records


1. Select the record or records
2. Click on the Office button (2007)
or
Click on the File tab (2010)
3. Click on Print

4. Click on
5. Click on OK

Using Print Preview


You can see the layout of what you print before sending it to the printer:
What will I see in Print Preview if I select a few records only?
Print Preview will show you ALL the records in your table because
at this point

the Print option of

hasnt been chosen yet!!!

1. Click on the Office button (2007)


or
Click on the File tab (2010)

Page26

HappyComputers02073757300

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase
2. Click on Print

3. Click on
4. Zoom in and out of your page using the mouse

5. Click on

Seeing the preview differently


You can choose to zoom in and out, see single pages, two pages
simultaneously, multiple pages or even change the size of the preview you can
see:
View multiple pages by
Clicking and dragging
over the grid that
Zoom in
and out by
previewing
different
sizes

View two
pages at
once

View
single
page

Changing the page orientation


When printing tables (or queries) the default page orientation is portrait. If you
want to fit more information across each page, then change the orientation to
landscape:

PORTRAIT:

HappyComputers02073757300

LANDSCAPE:

Page27

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

1. Go to Print Preview
2. Click on Landscape

Searching for and finding records


Searching for records in a table
One of the most regular things you will want to do in your table is search for a
particular record.
Finding a record allows you to easily:

View a records information


Amend a piece of information
Delete a record
Print a record
1. Click into the column you want to search on

2. Click on the Find button


3. Type what you want to find here:

4. (Change the Match option if necessary:


see next page for more info on this)
5. Click on
(keep clicking on this until you find the record you want)

Page28

HappyComputers02073757300

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

6. Click on OK at the end


7. Click on

when youve finished

The match options you have


Access gives you three different Match options:

For example:
Option

Result

Any Part of
Field

This will find any lastname that contains keeg


anywhere in it:

Whole Field

This will find any lastname that is exactly keegan:

Start of Field

This will find any lastname that begins with kee:

HappyComputers02073757300

Page29

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

Doing a more specific search


If you want to be very specific about what you are searching for then you can
turn on more options:
1. Click into the column you want to search on

2. Click on the Find button


3. Type what you want to find here:

4. (Change the Match option if necessary:


5. Choose the Option you want:

Option

Result

Search

All will search the entire column you


selected
Up will search just the records above
where your cursor was in the column
Down will search just the records below
where your cursor was in the column

Match Case

If you turn this on, then you will have to


type the text EXACTLY the way it is in the
table
For example: type Keegan to find Keegan

Search Fields as
Formatted

If you turn this on, then you will have to


type what you are looking for in EXACTLY
the way that the field was formatted in the
table
For example: type 02 February 1986 to
find 02 February 1986

6. Click on
(keep clicking on this until you find the record you want)

7. Click on OK at the end

Page30

HappyComputers02073757300

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

8. Click on

when youve finished

What can go wrong when searching for


information?
The search hasnt found any information

If you are searching for a record (or number of records) and your search is
unsuccessful, even though you know the information exists, there is one of two
likely reasons:
Yourcursorwassittinginthewrongcolumnwhenyoustartedthesearch
If your cursor is sitting in the wrong column (field) the search will not be able to
find the information that you want.
1. Click on
to close the Find box
2. Check you are clicked into the correct column you want to search on

3. Click on the Find button


Continue with the usual steps to search for your record(s).
Thematchoptionwasnotsetcorrectly
If you are searching for only part of a word, or just the letters at the start of a
word then you must choose the correct Match option.
Access gives you three different Match options:

HappyComputers02073757300

Page31

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

In the Find dialogue box


1. Change the Match option if necessary:
2. Click on
(keep clicking on this until you find the record you want)
Click on OK at the end
3. Click on

when youve finished

Sorting records
Access will let you sort your table by whichever field you choose. This can make
it easier to work with your records, or help you to find information.
There are only three field types which you CANNOT sort on:

Memo a field that can contain potentially up to 64,000 characters


OLE a field that contains a graphic or picture
Hyperlink a field that jumps you to a destination outside of Access, for
example:

Sorting records in a table


1. Click into the column you want to sort on
2. Click on one of the sort buttons
Sort
ascending

Sort descending (this can


be useful for dates or
numbers)

Where will any blanks appear once Ive sorted?


If you choose to sort in ascending order, then the blank fields in a
record will appear first.
If you choose to sort in descending order, then the blank fields in a
record will appear last.
Sort Choice

Result

Ascending

Sorts from A to Z for text, from lowest to highest


for numbers and oldest to newest dates.

Descending

Sorts from Z to A for text, from highest to lowest


for numbers and newest to oldest dates

Page32

HappyComputers02073757300

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

Saving the sort


You can also SAVE a sort if you want to, so that your information is permanently
stored in that order:
1. Click the Close button on the table window

2. Click Yes
Why is it asking me to save the Design of the table?
Access will previously have sorted your table by a key field, which
would have been set up when the table was first created.

Using a form instead


What is a form?
Forms provide a way to key in information that can be much more user friendly
than a table:

Forms allow you to see just one record at a time

Opening a form
Double Click on the form you want to open

HappyComputers02073757300

Page33

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

The different parts of a form


A label

A field/control

Record
Selector
each
page is
one
record

Record
navigation
buttons

The record navigation buttons


You can click here, type the record
number you want & press return to
go there

First
record

New
record
Previous
record

Next
record

Last
record

Selecting a record
Click on the
record selector
of a record

Editing a record
1. Click into the cell you want to edit
2. Make the changes you want

Page34

HappyComputers02073757300

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

When are the changes saved?


As soon as you start typing a pencil will appear in your record
selector area:
Once you move to another record, the pencil will disappear and
any changes you have made ARE AUTOMATICALLY SAVED!

Deleting a record
1. Select the record
2. Press DELETE on your keyboard
What if your records are linked to other ones?
If you are working in a form where the records are linked to other
ones, you may not be able to delete any records for people who
also have records elsewhere.

You will need to go to the other records first and delete there, then
return here and try again.

Searching for a record


1. Click into the field you want to search on

2. Click on the Find button


3. Type what you want to find here:

4. (Change the Match option if necessary:

5. Click on
(keep clicking on this until you find the record you want)

6. Click on OK at the end

HappyComputers02073757300

Page35

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

Sorting your records


1. Click into the column you want to sort on
2. Click on one of the sort buttons
Sort
ascending

Sort descending (this can


be useful for dates or
numbers)

Printing a form
When you print a form by default you will print a form for the ENTIRE list.
You might want to change the page orientation first!
If your form is quite wide, it would make sense to change the
orientation to Landscape before you print! To do this you will need
to be in Print preview
1. Click on the Office button (2007)
or
Click on the File tab (2010)
2. Click on Print

3. Click on
4. Click on Landscape
5. Click on OK

To print just a selection of records:


1. Select the record or records (see previous page)
2. Click on the Office button (2007)
or
Click on the File tab (2010)
3. Click on Print

4. Click on
5. Click on
6. Click on OK

Closing a form
Click the Close button on the form window

Page36

Click here
to Close

HappyComputers02073757300

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

Will I be prompted to SAVE?


You will NOT be prompted to save, even if you have chosen to
SORT your records at some point in using the form.

Filters
What Are Filters?
A filter is a way of filtering out the records you want to see based on criteria
which you set, e.g. all the people in the Sales department. It's a bit like using
criteria in queries except quicker and easier.
Filters, however, can be applied to a table, a query or a form. When you apply
them, Access will filter the records according to the criteria you set.

Filtering by Selection
1. Open the table, query or form you wish to filter
2. Select the information which you would like to see from any record
e.g. selecting this will base your filter options on SALES

3. Click Filter By Selection


4. Chose your filter option and your records will be filtered

You can see whether records


have been filtered by checking
next to the navigation buttons

Do you have to select the whole field?


No! You can also select:

The first part of the field, e.g. selecting


will filter all
the records which begin with the letters 'And' such as
Anderson, Andrews etc

Any part of the field, e.g. selecting


will filter all the
records which contain the letters 'der' anywhere within them
such as Anderson, Sanderson etc

HappyComputers02073757300

Page37

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

Can I filter records which have been filtered?


Yes! If you repeat the same steps now you will be filtering down
this list further.

Switching back the full list


Click on the Toggle Filter button
(If required, click on the button again to see the filtered list again)

Filtering by Selection Options


This option will only return records
where the department field is SALES
This option will only return records
where the department field is not
SALES
This option will return records where
the department field contains SALES
e.g. EUROPEAN SALES
This option will only return records
where the department field does not
contain SALES

Removing Filters
1. Click on the Advanced button
2. Click on Clear All Filters

Using a Filter by Form


Filter by Form allows you to do more complex filtering than Filter by Selection. It
creates a form, which you use to fill out the criteria you require.
1. Open the table, query or form you wish to filter
2. Click on the Advanced button
3. Click Filter by Form
A form will appear for you to fill in.
If you have used filters before, Access will remember the last thing
you filtered and add this as your criteria
4. Click into the field you wish to add criteria to

Page38

HappyComputers02073757300

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase
5. Click down arrow and choose the criteria you wish to add
or
Type in the criteria you wish to add
6. Click on Advanced
7. Click Apply Filter icon

Filtering for two criteria where both must be true (AND)


For example searching for contacts who are Female and work in Sales.
What does AND mean?
See p53 What Are AND and OR? for more details.

1. Open the table, query or form you wish to filter


2. Click on Advanced filter
3. Click Filter by Form icon
4. Enter the criteria you require for all the appropriate fields
5. Click on Advanced filter
6. Click Apply Filter icon

Filtering for two criteria where either can be true (OR)


For example searching for all contacts who work in either Sales or Admin.
What does OR mean?
See p53 What Are AND and OR? For more details.

1. Open the table, query or form you wish to filter


2. Click on Advanced filter
3. Click Filter by Form icon
4. Enter your first criteria in the appropriate field
5. Click OR tab at the bottom of the form

HappyComputers02073757300

Page39

Access2007/2010EssentialsThefourkeypartstoanaccessdatabase

6. Enter your next criteria in the appropriate field


7. Repeat steps 4 and 5 if you have more criteria
8. Click on Advanced
9. Click Apply Filter icon

You can use NULL and NOT in Filter by Form


If you would like to filter the blanks in a field, type the word 'null'
into the form underneath the relevant field
If you would like to find records which do not meet the criteria you
specify, type the word 'not' before the criteria, e.g. not Sales

Saving a Filter as a Query


1. Click on Advanced filter
2. Click Filter by Form icon
3. Enter your criteria as required
4. Click on Advanced
5. Click Save as Query icon
6. Enter a name for your query
7. Click OK
You can access your query from the queries in the Database window.

Deleting Criteria
1. Select the criteria you wish to delete
2. Press DELETE on your keyboard

Page40

HappyComputers02073757300

Access2007/2010EssentialsQueries

Queries
Queries
What is a query?
Queries provide a way for you to ask questions of your Database.
For example:
I want to see all the women in the sales department in alphabetical order
by surname
I want to see all the staff who earn between 20,000 and 30,000 in
numerical order with the highest earners showing first
I want to see all the staff who live outside London in alphabetical order by
Town

What type of query do I need to create?


Mostly, you will need to create SELECT queries. In simple terms these are
queries that select the information you ask for and then display it this type of
query is the default.

What does a SELECT query produce?


When you run a select query it produces a table of data.
For example:
I want to see all the records where we havent keyed in a department so I
can correct these errors
What happens if I change the data in a query?
Any changes you make will be stored in the original table.
So, if you run a query to find blanks (or missing data), you can
correct the information there and then and it will automatically
change the data in the table you are working on!

Creating a simple query without wizards


Summary of the 4 steps
Creating a Query without the wizard has four main steps:
Choosing which table to base your query on
Choosing which fields to include in the query
Running the query to see the result
Saving the query (if required)

HappyComputers02073757300

Page41

Access2007/2010EssentialsQueries

Step 1 Creating a query and choosing the table to base your query on
1. Click on the Create Tab
2. Click on Query Design

3. Double Click on the table (or tables) you want to use

4. Click Close
Access now displays a grid for you to lay out your query. This is called the
Query by Example grid, and makes it really easy to create queries from
scratch!
The different parts of the query grid:

This is the table your


query will be based on

This is the query grid


you write your query here!

Page42

HappyComputers02073757300

Access2007/2010EssentialsQueries

Step 2 Choosing which fields to include in the query


Selectingafieldtoincludeinthequery

Double
Click on the
field you
want

Access will
then add it
here

Or:

Click and Drag the


field you want to
here in the grid

Can I add several fields at once?


Yes! Select all the fields you require then click and drag them to
the grid.
To select fields that are next to each other:
Click on the first field, hold down SHIFT, click on the last field
To select cells that arent next to each other:
Click on the first field, hold down CTRL, click on the rest of the
fields

HappyComputers02073757300

Page43

Access2007/2010EssentialsQueries

Selecting all the fields:


What if you want to include all of the fields in the table in your query:
1. Double Click the title bar of the table
2. Click within the selection and drag to the grid
Or:
1. Drag the Asterisk to the grid

What will I see in the query grid if I use the asterisk?


With this method you will not see the individual fields in the grid:

However, when you run the query all the fields will appear.
Deleting a field:
1. Click in the grey bar to select the whole field column in the grid

2. Press DELETE on your keyboard

Moving a field:
1. Click in the grey bar to select the whole field column in the grid
2. Move your mouse to the very top of the selected column

3. Click and drag the field to where you want it

Page44

HappyComputers02073757300

Access2007/2010EssentialsQueries

Step 3 Running the query


Once you have chosen the table and fields for your query, you are ready to run it
and see the results:

Click on the Run button


Return to the query grid:
If you want to add anything to the query design or amend something that isnt
quite right, then you need to go back to the design view of your query:

Click on the View button


When you are happy with everything in the design of the query you can run it
again
Is there any difference between using the Run button and the
View button?
or
There isnt any difference in a Select query both will allow you to
view the query result.

Step 4 Saving the query


Are you likely to need this query again? If so, then you might as well save it!
1. Click on the Save button
2. Type a name that clearly describes the query
3. Click on OK
What should I call my query?
When saving a query it is good practice to identify it as a query in
the name. For example:

It is also good practice not to leave spaces and to capitalise the


first letter of each word.

HappyComputers02073757300

Page45

Access2007/2010EssentialsQueries

Closing a query
Click the Close button on the query window

Click here
to Close

What are the main views of a query?


The main views of a query
There are two main views to a query:
Design View
Datasheet View

Design view
In design view you can:
Add or Amend fields
Add or Amend criteria
Sort on more than one field
Choose whether or not to show a field in the result of the query

Page46

HappyComputers02073757300

Access2007/2010EssentialsQueries

Datasheet view
In Datasheet view you can:
View the actual data that meets this criteria
Add or Amend data

Switching between views

Click on the Run button

to see the Datasheet

Click on the View button

to see the Design

HappyComputers02073757300

Page47

Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?

What can go wrong when creating a


query?
It can be really easy to make a mistake when creating queries (especially when
learning something new). If a mistake happens then dont worry, theres usually
an easy solution to help you correct it!
Wevelistedourfavouritemostcommonmistakeshere

I didnt add a table when I first created my query

1. Click on the Show Table button


2. Double-click on the table (or tables) you want to use
3. Click Close

I added the same table twice by mistake when I first created my query

Page48

HappyComputers02073757300

Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?

1. Click anywhere on the second table


2. Press DELETE on your keyboard

My table seems to have disappeared from the query grid

The fact that you still have fields shown in your query grid is
your clue that the table hasnt actually been deleted!

Click on the left pointing arrow on the Scroll bar


(below where the table is normally displayed:)

HappyComputers02073757300

Page49

Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?

Why does one of my field names look odd when I run the query?

Whoops!

If one of your field headings starts with Expr, then youve probably added it
twice in the query grid by mistake!

1. Go to design View of the query


2. Select the column of the field that has been added twice

3. Press DELETE on your keyboard

Page50

HappyComputers02073757300

Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?

Creating a query using simple criteria


The EXTRA STEP when creating a query with criteria
If you want to be more specific when creating a query, i.e. I only want to see the
staff in the Sales department, then you need to use criteria in the querys design:

Add your criteria to ask the question you want

Searching for records with one piece of criteria


If you want to match the criteria EXACTLY to the records:
1. Click in the criteria box of the correct column
2. Type in the word (or words) to search for

Does it matter whether I use capital letters or lower case?


No, you can type it in whatever way you like, as long as you spell it
correctly!
Do I need to type the quote marks?
No, Access will automatically add these for you the quote marks
let the query know you are looking for text (rather than dates or
numbers).

Searching for records which do NOT meet a piece of criteria


You may want to look for records that DONT match the criteria.
For example, if you want to see all staff, EXCEPT those who work in the sales
department:

HappyComputers02073757300

Page51

Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?

Why might I want to do this?


It can be much quicker to say not sales, instead of, I want the
executive or personnel or finance or admin or computer
departments!

Searching for records where the information is missing


You may want to look for records that contain blanks (or are missing some
information).
For example, if you want to see all staff where we have not keyed in the
department:

Type is null in the


column where you are
searching for the
missing information

Why search for blanks?


The most common reason would be so that you could correct the
information!
However, you may want to set up a field so that you can do
something with the blanks.
For example: Find me all the blanks in the membership column
so I can write to them and remind them to renew their subscription.

Using more than one criteria


If you want a more complex query then you can add more than one piece of
criteria and even use dates and numbers!
When you use more than one piece of criteria, Access will want to know exactly
how you want to use it.
In computer terms, you need to decide whether:

Or:

Page52

You are searching for records which meet ALL the criteria
You are searching for records which meet ANY of the criteria

HappyComputers02073757300

Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?

The difference between And and Or


AndIncomputerlanguage,ANDmeansmeetsallthecriteria.
You ask for

You get

Gender = female AND Gender =


male

Nothing no-one can be both


simultaneously

Gender = female AND Department


= sales

Only women who work in the sales


department

OrIncomputerlanguage,ORmeansmeetsanypieceofthecriteria.
You ask for

You get

Gender = female OR Gender =


male

All the people in the Database


(apart from where youve forgotten
to key in the information)

Gender = female OR Department =


sales

All the women in the Database, plus


all the people in the sales
department

Using more than one criteria on one field


If you want to use more than one piece of criteria, you just tell Access whether
you are using AND or whether you are using OR:
What will I use if Im searching for text?
You will be using OR.

1. Click in the criteria box of the correct column


2. Type in the words to search for separating the criteria with the word or

HappyComputers02073757300

Page53

Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?

This will show all the staff


who work in either the
sales or the executive
department

Remember: You dont


need to type the quote
marks or use capitals
Access will sort the
punctuation out for you!

Using more than one criteria on two or more fields


How do you tell the query you want And or Or?
If you want to use AND place your criteria on the same line.
If you want to use OR place your criteria on different lines.

Using And
If you are searching for records which meet ALL the criteria, then you need to
use AND by placing your criteria on the same line:

This will show all female staff in the


sales department who have a BA
degree

Page54

HappyComputers02073757300

Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?

Using Or

This will show any female


staff, plus any staff who
work in the sales
department, plus any staff
have a BA degree

IfyouaresearchingforrecordswhichmeetANYofthecriteria,thenyouneedtouse
ORbyplacingyourcriteriaondifferentlines:

Using numbers, dates and wildcards


What if I want to find a number or date higher or smaller than I
choose?
Then you can use these symbols:
> Greater than
< Less than
>= Greater than or Equal to
<= Less than or Equal to

What if I want to choose a range of numbers or dates?


Then you can use the word between to find the numbers or dates
between and inclusive of what you choose.

HappyComputers02073757300

Page55

Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?

Using numbers
Example

What the query will find

>100

Numbers greater than 100

<100

Numbers less than 100

>=100

Numbers greater than or equal to


100

<=100

Numbers less than or equal to 100

between 100 and 200

Numbers between 100 and 200,


including 100 and 200 themselves

This will show all sales staff who earn


between (and inclusively) 10,000 and
20,000

Remember:
You dont
need to type
signs or
use capitals

Using dates
Example

What the query will find

>1/1/99

Dates after 1/1/99

<1/1/99

Dates before 1/1/99

>=1/1/99

Dates after 1/1/99 and equal to


1/1/99

<=1/1/99

Dates before 1/1/99 and equal to


1/1/99

between 1/1/99 and 31/3/99

Dates between 1/1/99 and


31/3/99, including 1/1/99 and
31/3/99 themselves

Page56

HappyComputers02073757300

Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?

This will show all sales staff who were


hired between (and inclusively) 1st Jan
99 and 1st June 99

Do I need to type the hashes?


No, Access will automatically add these for you the hashes let
the query know you are looking for dates (rather than text or
numbers).
Can I type a dates with full stops 1.1.99?
No, Access wont like it. You will see an error message.
Always use slashes like this instead: 1/1/99

HappyComputers02073757300

Page57

Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?

Using the * wildcard


If you want to search for partial information in a field then you will need to use
the * wildcard:
Example

What the query will find

ke*

Finds all words beginning with ke

For example:

Will find:

*man

Finds all words ending in man

For example:

Will find:

Example

What the query will find

*84

Finds all dates in the year of 1984

For example:

Will find:

Page58

HappyComputers02073757300

Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?

Do I need to type the word Like and the quote marks?


No, Access will automatically add these for you the word Like
and the quote marks let Access know you are using a wildcard.

Checking a querys results


Always check the result of a query
It is always worth taking a moment or two to check the results that a query gives
you:
Does the total number of records look about correct?
Do the actual records correspond to the criteria you thought you keyed
in?
Have you missed anyone out?
Have you included too many records?

What can go wrong?


WhatifmyanswerlooksdifferenttowhatIexpected?
There are at least two likely reasons:
Youtypedthecriteriainthewrongcolumn

Whoops! This should be in the department column!


Delete it from here and type it in the correct place.

HappyComputers02073757300

Page59

Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?

Whoops! Check your scroll bar in both directions to make


sure there is none of the criteria left behind from a previous
search!
Delete any criteria that shouldnt be there.

Youdidntdeletesomeofthecriteriayouusedpreviously
Got a problem with date criteria?
It could be that your PC is set up to recognise American date
formats instead of British so do check this!

Seeing the top values in a query


If the query is likely to give a result that is rather long, then you can choose to
see just part of it while you are checking to see whether your criteria is correct or
not:
1. In Design view, Click on the Return dropdown
2. Click on the required choice
If you want a number or % NOT in the
list, Click here and type what you
require

5 will pick the first 5, 25% will


show the first 25%

3. Run the query as usual

Page60

HappyComputers02073757300

Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?

Examples for using criteria


Here are some examples of criteria, which will help you to work out the sort of
things you might need to type:
Usingtext:
Example

What the query will find

london

Will find London

london or manchester

Will find London or Manchester

Not usa

Will find fields not containing USA

Like s*

Find fields that start with the letter S

Like *imports

Will find fields that end with the word


Imports

Like [a-d]*

Will find fields starting with the letters


A and D, inclusive
(Note: you have to type the word Like
and the quote marks)

Null

Will find blank fields

Usingnumbers:
Example

What the query will find

>=15000

Will find numbers greater than or equal


to 15000

20000

Will find numbers that are equal to


20000

Between 45 and 50

Will find numbers between 45 and 50,


including 45 and 50 themselves

Usingdates:
Example

What the query will find

#6/6/99#

Will find the 6th of June 1999

Like */6/99

Will find any dates during June 1999

Between #1/1/99# and


#31/3/99#

Will find any dates between the 1st of


January 1999 and the 31st of March
1999, inclusive

>=#1/1/99#

Will find any dates after and including


the 1st of January 1999

HappyComputers02073757300

Page61

Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?

Sorting your query


As well as choosing to see certain records, you can also change the order in
which the information is displayed. To do this, you need to sort the query.
You can sort either in datasheet view or design view.
Whats the difference between sorting in Datasheet or Design
view?
In Datasheet view you can sort on one field only and the sort will
only show while you are in this view, this time.
In Design view you can sort on more than one field and the sort
will be saved as part of the query, so it will appear in this order
everytime you view it.

Sort on one field datasheet view


Click into the column you want to sort on Click on one of the sort
buttons

Sort on one field design view


1. Click into the Sort row of the field you want

2. Click on the downward arrow


3. Click on Ascending or Descending

Sorting by Ascending order on the LASTNAME field will produce an alphabetical


list in order of surname:

Page62

HappyComputers02073757300

Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?

Sort on more than one field design view


You may wish to sort on more than one field, this is only possible in design view!
For example to produce a list sorted by Gender and within that, sorted by
Surname, you need to sort in Ascending order on BOTH of these fields:
1. Click into the Sort row of the first field you want

2. Click on the downward arrow


3. Click on Ascending or Descending
4. Click into the Sort row of the second field you want

5. Click on the downward arrow


6. Click on Ascending or Descending
Does it matter in which order the fields appear in the query
grid?
Yes, this is crucial!
In order for a sort to work on more than one field, the field which is
your first choice MUST be on the left of the other field(s).

Thissort:

HappyComputers02073757300

Page63

Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?

Will produce this:

Showing/hiding fields
You may decide to include a field (or fields) in the query grid because you want
to select certain criteria, but you dont need to see the detail when the query is
run.
Forexample,hidingthesalaryanddepartmentfieldsofallExecutivestaffearning
12,000:

Willproducethis:

(Insteadofthis:)

Page64

HappyComputers02073757300

Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?

Hiding fields in a query


Click in the Show row of the field you want to hide, to remove the tick

Showing fields in a query


Click in the Show row of the field you want to show (it will show if the box
is ticked)

HappyComputers02073757300

Page65

Access2007/2010EssentialsCreatingaDatabase

Creating a Database
Design Principles

Designing a Database takes time and thought!


The more care you put in at the start, the more effective it will be later!

What is the purpose of my Database?

What do you want the Database to do for you?


What will other people need the Database to do?
Do you already use some paper forms in a manual system? This
information could be valuable!

The key question I must ask What information do I want out of my


Database?
Startworkingonpaperfirst!
List all the information that you want out
Spend time ensuring you have thought of everything

Why should information never be keyed in twice?


Information in a Database should only ever need to be typed once!
Typinginformationasecondtime:
For example, you should never find yourself typing in the name and details of a
person a second time. The reasons are:

Wasted time and effort


Potential inconsistency when typing in the information more than once
Storing out of date information (if for instance any of the details change,
you would have to remember to make the changes in ALL the places they
appear in your Database)

In our example Debbie Anderson has


been on two training courses so she
appears twice this could cause
problems later as mentioned above!

Page66

HappyComputers02073757300

Access2007/2010EssentialsCreatingaDatabase

Duplicatingfields:
You should also never duplicate fields in one table, for example Training 1,
Training 2, Degree 1, Degree 2, etc. The reasons are:

Difficulty in searching for information if it could be held in more than one


field
Difficulty in producing statistics on more than one field

Although this gets around the problem of


repeated information for Debbie Anderson, I
would have problems if I needed to find
everyone who had attended an Access
Essentials course which column would I
search on!

Thesolution:
If you cannot see a way to avoid storing the information twice, you need to use
more than one table and relate them together:
In our example:

Create one table for the staff information


Create another table for the training information
Then, you link the two tables through a common field. This creates a ONE to
MANY relationship between the two tables.
ONE member of staff can go on MANY training days:

to

MANY

(For more information on creating a relationship see the complete section on


Relational Databases on page 96.)

HappyComputers02073757300

Page67

Access2007/2010EssentialsCreatingaDatabase

On paper decide which tables you need


The tables are the basic building blocks of the Database. Once you know what
information you want to retrieve you can work backwards to determine what you
need to store. This can be tricky because what you want out of the Database
will probably not give you any clues as to the structure of the tables you will
need!

Look at the facts that make up your Database and divide them into
fundamental groups each group can then be a table

On paper decide which fields belong in each table


Once you have the tables, you need to determine the characteristics of the table
and divide it into fields:

Make sure each field relates directly to the subject of the table
Try to include all the information that you need from the start
Dont include a field with information that needs to be calculated (for
example, a persons age as long as you have a field for their date of
birth you can create a query to calculate how old they are)
Decide what sort of information will be held in each field
(for example, text, numbers or dates etc)
Decide which fields will need to be lookups
(which fields are you most regularly going to search on where the
information typed in would need to be consistent)

On paper decide which tables need to be linked to each other


Once you have the tables and the fields, draw the links to each table and make
sure that you have the appropriate fields to be able to link everything together!

Consult your colleagues


If more than one person is involved, consult with each of them to make sure that
nothing is missed and that you all agree on the list of information which needs to
be retrieved!

Page68

HappyComputers02073757300

Access2007/2010EssentialsCreatingaDatabase

Creating a new database without wizards


Creating a new Database (2007)
1. Click on the Office button

2. Click on the New button


3. Type in the Database name

Essential
You MUST save (and name) your Database before you can create
any tables or queries etc!

4. Click on
An empty Database will be created for you with a blank table open in datasheet
view:

HappyComputers02073757300

Page69

Access2007/2010EssentialsCreatingaDatabase

Creating a new Database (2010)


1. Click on the File tab
2. Click on New

3. Type a name for your database on the right


4. Click on the yellow folder button

5. Click on Create

An empty Database will be created for you, with a blank table open in datasheet
view:

Page70

HappyComputers02073757300

Access2007/2010EssentialsCreatingaDatabase

Creating a simple table without wizards


Summary of the 4 steps
Creating a Table without the wizard has four main steps:
1.
2.
3.
4.

Creating a table
Creating the fields and deciding the data type for each field
Deciding which field will be your Primary key
Saving the table

Step 1 Creating a table


FirstyoumustcloseTable1thatAccessopened:
Close the table using the X in the top-right corner

Tocreateanewtable
1. Click on the Create Tab

2. Click the Table design icon

A new table will open in design view


Thedifferentpartsofthetablegrid

HappyComputers02073757300

Page71

Access2007/2010EssentialsCreatingaDatabase

Add
your
field
names
in this
column

Determine
the data
type for
each field
in this
column

(If appropriate)
Add a relevant
description for
each field in this
column

You are now ready to determine the fields and their data types!

Step 2 Creating the fields and deciding the data type for each field
When you create a field, you give it a name, a data type and an optional
description:
1. Click into the Field Name column and type the first field name

2. Tab to the Data Type column and select a data type from the drop
down list

(see over the page for more information)


3. Tab to the Description column and type an optional description
(if appropriate)

4. Tab into the Field Name column and type the next name, etc

Page72

HappyComputers02073757300

Access2007/2010EssentialsCreatingaDatabase

You should end up with something like this:

Decidingthedatatypeforeachfield
Access gives you a choice of data types for holding different types of
information:
Data Type

What does it store

Extra Information

Text

Letters or numbers

This field can hold up


to 255 bytes (1 byte
per character i.e. 255
characters)

Essential You should amend the default field size!


When using the Text data type the default field size is 50
characters your Database will run much more efficiently and
save on space if you reduce each of these fields to a more
appropriate size! (See the section on setting field properties.)
Data Type
Memo

What does it store

Extra Information

Letters or numbers, usually you


The field can hold up to
would use this data type for a
64,000 bytes
comments field because it will
expand as you add new information

Number

Numbers (either whole numbers or


numbers with decimal points)

Is a phone number a Number Data Type?


No! For phone numbers, part numbers and other numbers you
dont intend to use for mathematical calculations, you should
select the Text data type!
Data Type

What does it store

Date/Time

Dates and times

HappyComputers02073757300

Page73

Access2007/2010EssentialsCreatingaDatabase

Currency

Monetary values

AutoNumber

A unique sequential (incremented


by 1) number or random number
(assigned by Access) whenever a
new record is added to the table AutoNumber fields cannot be
updated by you

Yes/No

A field with a ready made choice


of Yes or No

Data Type

What does it store

Extra Information

OLE Object

OLE objects are generally graphics


or other binary data (for example,
choose this data type if you want
to scan in a photograph or logo)

This field can hold up


to 1 gigabyte (limited
by disk space)

Hyperlink

A field with a link to somewhere


outside of your Database (for
example, a Word document, an
Excel spreadsheet or a World
Wide Web page)

An example of a
hyperlink:

Attachment

Allows you to attach a file to this


field the same way you would
attach something to an email

Calculation
(2010 only)

This allows you to create a


calculated field for example Total
price by multiplying the price by
1.175

This field is not set up


by choosing it here you
must set it up
separately

Lookup
Wizard

A field that allows you to make a


choice from a list to ensure
consistency of input

An example of a
lookup:

How will Access 2002(XP)/2003 interpret my dates?


This version of Access will interpret short date formats correctly:
Date range abbreviated

Interpretation by Access

1/1/00 through 31/12/29


2029

1st Jan 2000 through 31st Dec

1/1/30 through 31/12/99


1999

1st Jan 1930 through 31st Dec

Page74

HappyComputers02073757300

Access2007/2010EssentialsCreatingaDatabase

Step 3 Deciding which field will be your Primary key


Whatistheprimarykey?
It is a special field that uniquely identifies each record in the table
It is good practice to identify a primary key for each table
If you are creating a relationship between two tables then you must
have a primary key in the one side of a one to many relationship

Creatingaprimarykey:
1. Click in the field to become a primary key

2. Click on the Primary Key button

This is what it will look like:

Step 4 Saving the table


You must save your table, it will form the core structure of your Database!
1. Click on the Save button

2. Type a name that clearly describes the table


3. Click on OK
What should I call my table?
When saving a table it is good practice to identify it as a table in
the name. For example:

It is also good practice not to leave spaces and to capitalise the


first letter of each word.

HappyComputers02073757300

Page75

Access2007/2010EssentialsCreatingaDatabase

What are the main views of a table?


The main views of a table
There are two main views to a table:
Design View
Datasheet View

Design view
In design view you can:
Add or Amend fields
Amend the Data Type of a field
Add or Amend the Field Properties
Create Lookups

Datasheet view
In datasheet view you can:
View multiple records
Add, Amend, Delete, Sort, Find or Print records

Page76

HappyComputers02073757300

Access2007/2010EssentialsCreatingaDatabase

Switching between views

Click on this View button

to see Datasheet view

Click on this View button

to see Design view

Extra information on the primary key


Changing a primary key
If you choose the wrong field to make into a primary key, or you change your
mind, it is really easy to choose a different field:
1. In Design view of the Table, Click into the NEW field to become a
primary key
2. Click on the Primary Key button

3. Click on the Save button

Deleting a primary key


If you need to, you can permanently delete the primary key from a field, whilst
retaining the field name and its data:
1.
2.

In Design view, Select the Primary key field


Click on the Primary key icon to turn it off

The key symbol should be removedfrom the row selector area


3. Click on the Save button

HappyComputers02073757300

Page77

Access2007/2010EssentialsCreatingaDatabase

What can go wrong when creating a table?


IseemtohaveanewfieldthatIdidnttype
Where did
this ID
field come
from?

The likely reason is that you got this message:

and you Clicked on Yes Access will assume you want it to create the Primary
Key for you.
DeletingtheIDfieldyoudidntcreate
If you want to create your own Primary Key, then you will need to delete the ID
field beforehand:
1. In Design view of the Table, Select the primary key field to the left of
the row
2. Press DELETE on your keyboard

3. Click on Yes
4. Click on the Save button

Setting field properties


The EXTRA step when creating a table
If you want to have more control over the information typed into a field, for
example, I dont want to allow more than 20 characters to be typed, then you
need to set the Field Properties in the tables design.
Page78

HappyComputers02073757300

Access2007/2010EssentialsCreatingaDatabase

What do properties do?


Setting the Properties of a field can allow you to:

Control the appearance of information


Prevent incorrect information being typed in
Specify a default value
Speed up searching and sorting

Setting the field properties


You view and change field properties for only one field at a time:
1. Open the Table in Design View
2. Click into the field you want to set properties for

3. Change the properties information relevant to your field


(see next page for more details)

4. Click on the Save button

When can I change the field property settings?


You can actually change the properties of a field at any time. However
What if I set a field property AFTER I have already keyed in
some information?
Be aware that Access will want to test the information that exists,
to ensure that it meets the settings of your field property
requirements!

DecidingtherelevantPropertyforeachfield
Access gives you a choice of different properties, dependant on which data type
you have chosen for your information.

HappyComputers02073757300

Page79

Access2007/2010EssentialsCreatingaDatabase

ThesearetheFieldPropertiesyouaremostlikelytouse:
Property

What it means

Field Size

The maximum
number of characters

Format

How do you want


your information
displayed

Examples

You can type 6/6/84 and Long Date will


display this:
Or:

The Greater Than sign > will force


information to appear in Capitals
Default
Value

Validation
Rule

A piece of
information that is
entered
automatically when
new records are
created. If you set
a default value after
information has been
entered in the field,
it will NOT change
the previous
information
retrospectively!
Text or numbers that
define what
information is valid in
a particular field

Or:

Typing Date()will give you the current


date as a default

Typing something in the salary field will


now be limited by the validation rule
above

Validation
Text

The message that


you want to appear if
invalid information is
keyed in

This would be an appropriate message


for our example:

Required

This will force


information to be
typed in the field

A good example would be a surname or


organisation name field, where you
wouldnt want it left blank:

Page80

HappyComputers02073757300

Access2007/2010EssentialsCreatingaDatabase

Property
Indexed

What it means

Examples

If you set this to yes


There are two choices under Yes:
it speeds up searches
and sorting on this
field (Access will then Think about which is appropriate for your
field.
hold this information
For example:
in alphabetical or
numerical order in
If it was a surname field you would
the background)
want:
Think about which
If it was an organisation name field you
fields you will
might want:
regularly want to
search and sort on

I will want to search regularly on my Primary key field, should


I index it?
No need, Access will automatically create a
on any field you set as a primary key.

index

ThesearetheotherFieldProperties:
Property

What it
means

Examples

Decimal
Places

How many
decimal
places do
you want
displayed to
the right of
the decimal
point

If you choose the currency data type:

This will
force the
input of
information
to appear in
a pre-set
format or
allow a
preset
number of
characters
only

A good example would be something like a


persons National Insurance Number field, where
you want to force the input of 2 letters 6
numbers and 1 number, so you would type this:

Input Mask

HappyComputers02073757300

Then the default setting is:


This allows up to 2 decimal places

Page81

Access2007/2010EssentialsCreatingaDatabase

Property

What it
means

Examples

Caption

Where you
want the
heading for
a column to
be different
from the
actual field
name

For example, the field name is this:


You type this:
So it will appear in datasheet view like this:

Allow Zero
Length

A setting
that defines
whether
zero-length
strings are
permitted

This is an advanced setting, mainly used for


programming!

Unicode
Compression

This allows
symbols or
text to
always be
read
correctly

For example, a sign would always be read as a


sign, even if your Database was opened up by a
system set with another language!

IME Mode

Input
Method
Editor (IME)

An IME is a program that allows you to enter


Asian text in programs by converting your
keystrokes into Asian characters

IME
Sentence
Mode

Using the
IME Mode,
you can
then choose
from 4
options:
Phrase
Predict,
Plural
Cause,
Conversatio
n and None

For example, Conversation Mode can be used


when entering data that contains conversational
language

For further information on Field Properties, see the following sections

Page82

HappyComputers02073757300

Access2007/2010EssentialsCreatingaDatabase

What can go wrong with setting field


properties?
Changing a fields properties AFTER keying information in?
If you change the field property settings AFTER keying in some information, be
aware that Access will want to test the information that already exists!
Here is a sample of the messages you might see:
Reducingthesizeofafield

Makingafieldrequiredoraddingavalidationrule

Setting Field Properties


Wherever possible try to set the properties of a field BEFORE you
type any information in to it!
If you do set them afterwards, we would recommend taking a
back-up of your database beforehand, just in case you are not
happy with the results. Think carefully about the above messages
before you Click on Yes, to ensure you dont lose any information
that already exists!

Field properties extra information


Format property
Access can display values such as numbers and dates in many formats:

HappyComputers02073757300

Page83

Access2007/2010EssentialsCreatingaDatabase

Numberformats
With this format

this number

is displayed like
this

General Number

3456.789

3456.789

Currency

3456.789

3,456.79

Euro

3456.789

3456.79

Fixed

3456.789

3456.79

Standard

3456.789

3,456.79

Percent

0.8240

82.40%

Scientific

3456.789

3,46E+03

Dateandtimeformats
With this format

dates and times are displayed this


way

General Date

19/06/94

17:34:23

Long Date

19 June 1994

Medium Date

19-Jun-94

Short Date

19/06/94

Long Time

17:34:23

Medium Time

05:34

Short Time

17:34

Customformats
Although the formats that come with Access should meet most of your needs,
you can specify any format that you want. Here are a few useful custom
formats:
With this format

this value

is displayed like
this

mmm yyyy

1/92

Jan 1992

>

fund raiser

FUND RAISER

A/c No: 0000

123

A/c No: 0123

Page84

HappyComputers02073757300

Access2007/2010EssentialsCreatingaDatabase

Input mask property


If all the information in a field needs to be displayed in the same format, then you
can add an input mask to:

add literal characters (for example, brackets or dashes)


ensure that letters and numbers are typed in the correct position
ensure that the correct amount of characters are keyed in

Thefollowingtablewillhelpyouconstructyourinputmask
Mask character

What it means

Number (entry required)

Number (entry not required)

Number, + or sign, or space (entry not


required, blank positions are converted to
spaces)

Letter (entry required)

Letter (entry not required)

Letter or Number (entry required)

Letter or number (entry not required)

&

Any character or space (entry required)

Any character or space (entry not required)

.,:;-/

Decimal point, thousands, date and time


separators

<

Causes characters to the right to be converted to


lower case (cannot be used on its own)

>

Causes characters to the right to be converted to


upper case (cannot be used on its own)

Causes input to fill from right to left if included


anywhere in the mask use when optional
characters are on the left side of the input

Causes the character that follows to be shown as


a literal formatting character in the input use
when you want to include one of the above
characters in the formatting

HappyComputers02073757300

Page85

Access2007/2010EssentialsCreatingaDatabase

Examplesofinputmasks
Input Mask

Examples

(000) 000-0000

(206) 555-0123

(999) 000-0000!

(206) 555-0123
( ) 555-0123

000-0000 aaa999

555-0123 ext121

>L<?????????????????????

Happy computers

Validation rules and validation text


Setting a validation rule allows you to limit the values that can be entered into a
field.
By also setting the validation text property, you can choose the message that will
be displayed if the rule is broken:
Examples of validation rules

Possible validation text

Personnel or Finance or
Admin or Fund Raising

Please enter the correct


department either Personnel,
Finance, Admin or Fund Raising

<#1/1/92#

Please enter a date prior to 1992

>10000

Please enter an amount higher


than 10,000

>=#1/1/00# and
<=#31/12/00

Please enter a date for the year


2000 only

Do I need to type the quotes or hashes?


No, Access will automatically add these for you! But do check
where it has added them in case it has guessed wrongly!

Page86

HappyComputers02073757300

Access2007/2010EssentialsLookups

Lookups
Using lookups
What benefit do I gain by creating a lookup?
A lookup allows you to ensure that when you type in data it is done so
consistently, because you choose your information from a pre-typed list:

For example, to ensure that in a field for gender, the entries are keyed in
as Male or Female (instead of just M or F), you would create a lookup
field.

Using a lookup
1. Click on the
arrow to display
the list

2. Click on the
information you
want to enter

Which fields should be lookups?


You should create lookups for all the fields you will regularly want
to search on, either in a table or query.

Creating a lookup
How many ways are there to create a lookup in your table?
There are two ways to create a lookup:

Creating a lookup based on another table and then using the lookup
wizard to link everything
Creating a lookup solely using the lookup wizard
Why create a lookup based on another table?

Creating a lookup in this way, will give you much more flexibility
when you need to amend, add or delete any of the entries in the
list to choose from!

HappyComputers02073757300

Page87

Access2007/2010EssentialsLookups

What are the different format choices?


You can choose to display your list of information in two types of format the
format is only evident when you see the field in a form:
ComboBox
Only the information chosen is displayed (this is the default format):

ListBox
All of the information to choose from is displayed, but only the chosen
information is shown as highlighted:

Creating a lookup based on another table


Summary of the 2 steps
Creating a Lookup based on another table has three main steps:

Create and save a new table to hold your choices


Edit the field in the original table

Step 1 - Create and save a new table to hold your choices


1. Click on the Create Tab

2. Click the Table design icon

3. Create one field with a text data type

4. Click on the Save button


5. Type a name that clearly describes the table

Page88

HappyComputers02073757300

Access2007/2010EssentialsLookups

6. Click on

(to the message about creating a primary key)

7. Click on the Datasheet view button


8. Type in your list of information

9. Close your table (this is important!)

Step 2 - Edit the field in the original table


1. Open the original table in Design view

2. Click into the Data Type column of the field you want to turn into a
lookup
3. Click on Lookup Wizard

4. Click on
5. Click on
6. Click on the Table to base your lookup on

HappyComputers02073757300

Page89

Access2007/2010EssentialsLookups

7. Click on

8. Click on

to select your field

9. Click on
10. You are then asked if you want to sort the data within the lookup

11. Choose a field to sort on and click next


12. You can now adjust your column width if necessary
13. Click on
14. (Amend the label for your lookup if you want) Click on
15. Click on No you do NOT need to save this relationship

Page90

HappyComputers02073757300

Access2007/2010EssentialsLookups

Why havent we saved it?


The wizard has already told the table where to look for the
information. Creating an extra relationship here is unnecessary.

Does it work?
1. Click on the Datasheet view button
2. Click into your lookup field

3. Choose from the list

Creating a lookup solely using the wizard


Edit the field in the original table
1. Open the original table in Design view

HappyComputers02073757300

Page91

Access2007/2010EssentialsLookups

2. Click into the Data Type column of the field you want to turn into a
lookup

3. Click on Lookup Wizard


4. Click on
5. Click on
6. Click into Column 1

Type in your list of information


7. Click on
8. (Amend the label for your lookup if you want) Click on
9. Click on the Save button

Does it work?
1. Click on the Datasheet view button
2. Click into your lookup field

3. Choose from the list

Adding to the dropdown options


If when you are using this field you decide that you need more options in the list
Access provides a quick shortcut for you.
In datasheet view of your form:
1. Click on the dropdown arrow

Page92

HappyComputers02073757300

Access2007/2010EssentialsLookups

2. Click on the icon that appears at the bottom of the list

3. Type in your additional values (each one on a new line)

4. Click OK
This only works for dropdowns that were created solely using the
Wizard. However if you want to change the options in a lookup
based on another table, simply open that table and add a new
record.

Limit the choices in a lookup


The EXTRA STEP when creating a lookup
HowdoIensuremylookupworkstokeeptheinputconsistent?
If you want to ensure absolute consistency when inputting information into a
lookup field, then you need to amend one of the fields property settings:

Change the Limit To List property to YES

Limiting the choices in a lookup


1. Open the table with the lookup in Design view

2. Click into your field


(to select it)
3. Click on the Lookup tab

HappyComputers02073757300

Page93

Access2007/2010EssentialsLookups

4. Change Limit to List to Yes

5. Click on Save

What can go wrong when youre using the


lookup?
What does this error message mean?
This probably means that the
Lookups field size has been
set too small for the
information that needs storing
in it!

1. Open the table with the Lookup in, in Design view


2. Click into the Lookup field to select it

Page94

HappyComputers02073757300

Access2007/2010EssentialsLookups

3. Type a new increased Field Size

4. Click on the Save button

HappyComputers02073757300

Page95

Access2007/2010EssentialsRelationalDatabaseDesign

Relational Database Design


Relational Databases
What is a relational Database?
A relational Database is simply the technical term for a Database whereby:

Information is stored in several tables, which are linked together!

In fact, very few Databases (if they are designed correctly) hold all their
information in just one table!

Why have information in different tables?


Information is held in more than one table to:

Avoid keying in the same information twice


Make it easier to extract information

Considerthisexample:
You have a Database holding information on staff and their training:

This design is reasonable as long as each staff member only goes on one
training course, however, what happens when a staff member needs further
training, see Debbie Anderson
You could repeat the Training fields, and this certainly seems to work for Debbie:

However,wherewillyousearchforattendanceofanAccessEssentialscourse?Itcould
beinanyoftheTrainingfieldcolumns!

Page96

HappyComputers02073757300

Access2007/2010EssentialsRelationalDatabaseDesign

Thesolution:
You divide the Database into two tables, you hold the staff information in one
table and the training information in another table.
This design allows you to hold many days training against each one member of
staff:
ONE member of staff can go on MANY training days:

to

MANY

Linking tables
The primary key
Whatistheprimarykey?
It is a special field that uniquely identifies each record in the table
If you are creating a relationship between two tables then you must
have a primary key in the one side of a one to many relationship
It also needs to be present in the many end of the relationship, here it is
called the foreign key

The foreign key


Whatistheforeignkey?
It is the linking field in the many end of a one to many relationship
It links directly to the primary key in the one end of the relationship

One to many relationships


The previous example is called a ONE to MANY relationship:

HappyComputers02073757300

to

MANY

Page97

Access2007/2010EssentialsRelationalDatabaseDesign

What does a one to many relationship look like in Access terms?

The Primary
key (it is
always shown
with the
symbol)

The
Foreign
key

Creating a relationship between tables


What do you need to create a relationship between two tables?

Theoneside
A table with a field defined as the primary key
Themanyside
A second table with a field that has the same data type as the primary key
field in the first table, this is called the foreign key

WhatdatatypedoIneedformyforeignkey?

if your Primary Key data


type is

then your Foreign Key data type


must be

Text

Text

Autonumber

Number (with the Field Size =


Long Integer)

Number

Number (with the Field Size = to


the Primary Key Field Size)

Page98

HappyComputers02073757300

Access2007/2010EssentialsRelationalDatabaseDesign

What does a Field Size = Long Integer mean?


This is set in Design view of a table, in the Field Properties
section:

Long Integer means:


A long whole number (no decimal places)!

Creating a relationship between two tables


Make sure all tables, queries etc are Closed
1. Click on the Database tools Tab

2. Click on the Relationships button

This will also change the ribbon to the Design Tab

Have you previously created a Relationship?


If so, it will already appear in your Relationship Window. You may
not be able to see all of the tables you need:

Click on the Show button


Continue following the steps below:
3. Double Click on the Table(s) you want to work with
4. Click on
5. Click and Drag the Primary Key field to the matching field in the other
table

HappyComputers02073757300

Page99

Access2007/2010EssentialsRelationalDatabaseDesign

(The primary key field appears with the

next to it)

6. Click on
(see next page for further info)
7. Click on Cascade Update Related Fields

8. Click on
The relationship between your two tables has now been created (and
automatically saved!):

What will it look like?

The
Foreign
key

The Primary
key (it is
always shown
with the
symbol)

What is referential integrity?


Referential integrity helps ensure:

That the relationship between records remains valid


That you don't accidentally delete related data

Helping to ensure that the relationship between records remains valid


This means that if your Employees ID numbers range from 1 to 100, then your
Training Reference to these Employees must also be within the 1 to 100 range.
For example, in the tables below I cannot key in a new Training Course for
Employee number 126, because there is no Employee with that number!

Page100

HappyComputers02073757300

Access2007/2010EssentialsRelationalDatabaseDesign

to

MANY

Avoiding accidentally deleting related data


When you enforce referential integrity you cant delete a record from the ONE
side of a relationship if there are related records in the MANY side!
For example, in a relationship between employees and their training you cant
delete an employee from the employee table because then you would have
training courses that didnt belong to anybody.
(The exception to this is if you turn on Cascade Delete - see the next page for
an explanation.)

What does cascade update mean?


If you select the Cascade Update option, any time you change the primary key
of a record in the ONE side, Access automatically changes the foreign key to the
new value in all related records in the MANY side.
For example, if you change an Employee ID in the Employees table, the
Employee ID field in the Training table is automatically updated for all of that
employees training so that the relationship isn't broken.
Access will update all related records without displaying any message.

What does cascade delete mean?


If you select the Cascade Delete option, any time you delete a record in the
ONE side, Access automatically deletes all the related records in the MANY
side.
For example, if you delete an employee record from the Employees table, all the
employees training courses are automatically deleted from the Training table.
Access does warn you that related records will also be deleted.

HappyComputers02073757300

Page101

Access2007/2010EssentialsRelationalDatabaseDesign

Closing the relationship window


Click the Close button on the relationships window
Click here
to Close

Click on
Do I need to save?
It is your choice
You are being prompted to save the LAYOUT of the relationships
window, not the actual relationship the relationship between two
tables is saved as soon as you create it!

What might go wrong when setting up a


relationship?
Why does the edit relationships dialogue box want me to set up a ONE to
ONE relationship?

Whoops!
This
indicates
that you
are
trying to
link two
primary
keys!

Page102

HappyComputers02073757300

Access2007/2010EssentialsRelationalDatabaseDesign

This is
wrong
this field
should be
the foreign
key!

This is
correct
this field
should be
a primary
key!

In a One to Many relationship, only one field should be a primary key whilst the
other one should be a foreign key!
Youneedtocorrectthisinthefollowingway
1. Close down the Edit Relationships window
2. Close down the Relationships window
- if prompted to Save the Layout changes)
(Click on
3. Open the MANY side table in Design view
For example

4. Click on the Primary Key button


symbol from your foreign key)

(to remove the Primary key

5. Add a new field that will be the Primary key in this table e.g.CourseID
(make it an Autonumber)

Click on the Primary Key button


Primary key)
6. Close down the Table window

(to make the new field the

7. Click on
8. Click on the Relationships button

HappyComputers02073757300

Page103

Access2007/2010EssentialsRelationalDatabaseDesign

9. Click and Drag the Primary Key field to the matching field in the other
table
(The primary key field appears in Bold)
10. Click on
11. Click on Cascade Update Related Fields

12. Click on

What can I do if I forgot to set Enforce referential integrity?

Whoops! This should


really look like this

Youneedtoedittherelationshipoptions
1. Double Click on the line between the two tables

2. Click on
3. Click on Cascade Update Related Fields

Page104

HappyComputers02073757300

Access2007/2010EssentialsRelationalDatabaseDesign

4. Click on

HappyComputers02073757300

Page105

Access2007/2010EssentialsRelationalDatabaseDesign

What does this error message mean?

WhatdatatypedoIneedformyforeignkey?

When you try to link the


primary key and the foreign
key, you will get this
message if the data types of
these fields arent
compatible!

if your Primary Key data


type is

then your Foreign Key data type


must be

Text

Text

Autonumber

Number (with the Field Size =


Long Integer)

Number

Number (with the Field Size = to


the Primary Key Field Size)

1. Close down the Edit Relationships window


2. Close down the Relationships window
(Click on
- if prompted to Save the Layout changes)
3. Open the MANY side table in Design view
For example

4. Change the Data Type of the Linking field to the correct one
5. Check the Field Properties of the Linking field and amend as
necessary
6. Click on the Save button
7. Close the Table
8. Click on the Database tools tab

9. Click on the Relationships button

Page106

HappyComputers02073757300

Access2007/2010EssentialsRelationalDatabaseDesign

10. Click and Drag the Primary Key field to the matching field in the other
table
11. Click on
12. Click on Cascade Update Related Fields

13. Click on

What does this error message mean?


If there is some
information in the
foreign key that does
not exist in the primary
key, then this message
will appear when you
try to link these fields!

Forexample
Primary key

Foreign key

A record for employee


number 56 does not exist
here, but it does show in the
MANY side!

A record for employee


number 56 is shown here,
but it does not exist in the
ONE side!

HappyComputers02073757300

Page107

Access2007/2010EssentialsRelationalDatabaseDesign

You will now have to find which records exist in the MANY side that do not exist
in the ONE side, so that you can delete them:
1. Close down the Edit Relationships window
2. Close down the Relationships window
(Click on
- if prompted to Save the Layout changes)
3. Create a new query in Design View
4. Add the two Tables you are trying to link in a relationship

5. Add the primary key and foreign key fields, plus any extra fields that
will help you to spot an error
Foreign key
Primary
key

6. Right-click on the join between the two tables

7. Click on Join Properties and click on choice number 3

Page108

HappyComputers02073757300

Access2007/2010EssentialsRelationalDatabaseDesign

8. Click on
9. Add Is Null to the criteria of the Primary Key field

10. Click on the Run button

11. Select any records that dont belong there


12. Press DELETE on your keyboard
13. Close the query (there is no need to save it)
14. Click on the Relationships button

15. Click and Drag the Primary Key field to the matching field in the other
table
16. Click on
17. Click on Cascade Update Related Fields

18. Click on

HappyComputers02073757300

Page109

Access2007/2010EssentialsRelationalDatabaseDesign

Amending relationships between tables


Amending the options in a relationship
You may want to go back into the relationship between two tables to amend the
options:
1. Double Click on the line between the two tables

2. Change the options as necessary

3. Click on

Page110

HappyComputers02073757300

Access2007/2010EssentialsRelationalDatabaseDesign

Deleting a relationship
If you want to permanently delete the relationship between two tables:
1. Click on the line between the two tables

2. Press DELETE on your keyboard

3. Click on

Choosing what to display in the relationship


window
Removing a table from the display
If you have set up lots of relationships in your Database, then the relationships
window can get rather cluttered!
1. Click on the Table to be deleted
For example, to delete our Lookup table from view

2. Press DELETE on your keyboard

HappyComputers02073757300

Page111

Access2007/2010EssentialsRelationalDatabaseDesign

3. Close the Relationships window

4. Click on
If I delete the table, am I deleting the relationship or link
between the tables?
No, as long as you only select the table before you press Delete,
then only the table will be deleted!

Showing relationships that arent seen in the display


If youve deleted some tables from view, or you want to check that you are
seeing ALL of the relationships in your window:
1. Click on the Design tab
2. Click on the Show All Relationships button

Printing out your relationships


One of the best improvements to Access 2002(XP)/2003 is that you can print out
a visual picture of your relationships, as viewed in the relationships window:

Printing your relationship window


1. (Open the Relationships window)
2. Make sure you are in the Design tab
3. Click on Relationships Report button

Page112

HappyComputers02073757300

Access2007/2010EssentialsRelationalDatabaseDesign

4. Click on the Print button

5. Close the Report window

6. Click on
7. Type in a name that clearly describes the report

8. Click on

HappyComputers02073757300

Page113

Access2007/2010EssentialsThehierarchyofanAccessDatabase

The hierarchy of an Access Database


The hierarchy of an Access Database
Howdoesitallfittogether?

You have to create a table first


A query is based on a table
A form can be based on either a table or a query
A report can be based on either a table or a query

TABLE

You might want to


draw some lines
between the Access
objects, so that you
know what can be
based on what

QUERY

FORM
REPORT

Page114

HappyComputers02073757300

Access2007/2010EssentialsForms

Forms
Forms
What benefits do I gain by creating a form?
Forms provide a way to key in information that can be much more user friendly
than a table:

Forms allow you to see just one record at a time

Should I base my form on a table or a query?


As a general rule you can base a Form directly on the table UNLESS:

You want to view or work with only a selection of your records.

For example, you may want to view in your form, just the staff that are currently
employed (rather than the full staff list):

HappyComputers02073757300

Page115

Access2007/2010EssentialsForms

Creating a form using the wizard


Creating a form using the wizard
1. Click on the Create tab
2. Click on the More Forms button and Click on Form wizard (2007)
or
Click on Form Wizard (2010)

3. Choose the Table to base your form on (or the Query)

4. Double-click on the Available Fields to select the fields you want

5. Click on
6. Choose a Layout for your Form

Page116

HappyComputers02073757300

Access2007/2010EssentialsForms

Columnar is the layout most commonly used

7. Click on
8. Choose a Style for your Form (2007 only)

9. Click on
10. Type a name that clearly describes the form

11. Click on
When is my form saved?
Your form is saved as soon as you give it a Title and Click on
Finish in the Form Wizard!

HappyComputers02073757300

Page117

Access2007/2010EssentialsForms

A form will be created for you:


If I add a new field to my table will the form automatically
update?
No, you will need to manually go into your form in Design view and
add the field there. See page 129.

What are the main views of a form?


The main views of a form
There are three main views to a form:
Design View
Form View
Layout View
I can see different views!
If your database was originally created in Access 2003 or earlier
then you may see different views for any existing forms. Any new
forms created from now on will see the three views shown

Design view
In design view you can:
Add fields
Delete fields
Move fields
Resize fields
Add descriptive text next to fields and in the Footer
Add a Title for the form in the Header
Change the format of all the fonts
Change the colours and borders of the fields
Change the Style of the form

Page118

HappyComputers02073757300

Access2007/2010EssentialsForms

Form view
In form view you can:
View records singularly
Add, Amend, Delete, Sort, Find or Print records

HappyComputers02073757300

Page119

Access2007/2010EssentialsForms

Layout view
Layout view is a combination of form view and Design view. The form displays
real data.
In Layout view you can:
View records singularly
Add fields to your form
Delete fields
Change font
Move and resize fields and labels
Change field and label properties

I cant see layout view!


If your database was originally created in Access 2003 or earlier
then you may not see Layout view for any existing forms. If you
want to use this view you could create a new form based on your
old one.

Switching between views


Why does my form look so small?
If your form isnt Maximised you may have difficulty working with it.
To maximise a form, Click on the Maximise button
window!

Click on this View button

Page120

on the form

to see the Design view

HappyComputers02073757300

Access2007/2010EssentialsForms

Click on this View button

to see the Form view

Click on the down arrow beneath the View button to select other views

Using the Views icons


The view icons are on the bottom right corner of your screen
Click here for
Design View

Click here for


Form View

Click here for


Layout View

Mine doesnt look like that!


If your view icons look like this:

Then your form was orginally created in a previous version of


access. If you want to use layout view create a new form based
on the old one

HappyComputers02073757300

Page121

Access2007/2010EssentialsForms

Design view of a form in more detail


What are all those things called that I see in design view?
A Control (this
is the actual
field)

A Label (this is just a


piece of descriptive text)

This is
the
Header,
whatever
is in here
will
appear
on every
page of
the form

All the record


information is
usually displayed in
the Detail area

This control is selected, so


it can be moved, resized,
or the font style amended

Selecting within a form in Design view


To amend the layout of a form or change the formatting style you first need to
make a selection.

Selecting a control
Click anywhere on the Control

(If your form is in a layout it may look like this instead)

Page122

HappyComputers02073757300

Access2007/2010EssentialsForms

Using the ruler to make a selection


Click in the ruler area next to the Control you want to select

Using the ruler to make a multiple selection


Click and Drag down the ruler area next to Controls you want to select

Selecting controls and labels that are next to each other


Click and Drag over the Controls or Labels you want to select

Selecting controls or labels that arent next to each other


1.
2.
3.
4.

Click on the first Control or Label you want


Hold down SHIFT
Click on the next Control or Label you want
Repeat steps 2 and 3 until you have selected all you require

Removing something from a selection


1. Hold down SHIFT
2. Click on the Control or Label you want to remove from the selection

HappyComputers02073757300

Page123

Access2007/2010EssentialsForms

Form Layout
Form layout works slightly differently in Access 2007 &
Access 2010
In Access 2007 when you create a form using the wizard all the
labels and controls are included in a layout (Stacked or Tabular).
This means that all your labels and controls will move and resize
together.
In Access 2010 if you create a form using the Wizard it will not
automatically put your labels and controls in a layout to use the
tools in this section (however it does if you use the Form button to
create a Quick form). To put your controls and labels into a layout:
1. Select all of the Controls and Labels
2. Click on the Arrange tab
3. Click on Stacked

Moving a control with its label within the layout


1. Click and hold on the label / control.
2. Drag your label / control up or down the column
(look for the yellow line, thats where your label and control will be
dropped when you let go of the mouse).

3. Release the mouse

Moving all of your Controls and labels


1. Click on one of the labels or controls
2. Click on the four-headed arrow on the top left hand corner

Page124

HappyComputers02073757300

Access2007/2010EssentialsForms

3. Click and drag the group to where you want it to go

4. Release the mouse

Resizing labels and controls


1. Click on the label or control
2. Two handles will appear at either end of the control / label

3. Click and drag the handles to resize your label / control

4. Release the mouse and the column of labels or controls will be


resized

Need to change the height of your control?


Click and drag from the corner.

I cant drag my control to the other side of my form!


While your controls and labels are included in the forms layout
they can only be moved up and down the column that they are
already in. If you want more control over your labels and controls
you must remove them from the layout (see below).

Moving controls and labels independently


To move labels and controls independently you must remove them from the
layout.
1. Select the labels(s)/controls(s) you wish to move
2. Go to the Arrange tab

HappyComputers02073757300

Page125

Access2007/2010EssentialsForms

3. Select Remove layout

How can I tell if my control is in the layout?


If when selected your control/label only has resizing handles
it is IN the layout
If it has a large handle in the top right corner

it has been REMOVED from the layout

Adding controls to the Layout


Once you have moved or added controls you might want to add them to the
layout. This will help to keep them lined up together and make generally make it
easier to set out your form neatly.
1. Select the controls and labels you want to add to the layout (use any
one or combination of the methods detailed above)
2. Go to the Arrange tab
3. Select stacked (or tabular)

If you change a sub form to continuous forms format and need your
labels into the header
You dont need to cope and paste, just select all your labels and controls,
and change the layout to Tabular.

Changing the look of your form


Moving a control or label separately
1. Select the Control or Label
2. Click and Drag on the Move handle of the thing you want to move

Page126

HappyComputers02073757300

Access2007/2010EssentialsForms

Moving a control with its label


1. Select the Control or Label
2. Click and drag on the border area of the selection

Resizing a control or label


1. Select the Control or Label
2. Click and drag on the relevant size handle

Deleting a control with its label


1. Select the Control
2. Press DELETE on your keyboard

Deleting just the label

1. Select just the Label


2. Press DELETE on your keyboard

Undoing a deletion or other action


Access allows you to undo up to 20 actions in Design View of a form:

Click on the Undo button


required)

(Click as many times as

Saving the changes


Click on the Save button

HappyComputers02073757300

Page127

Access2007/2010EssentialsForms

Improving the look of a form


How do I get my fields all neatly lined up?
The easiest way is to apply a Stacked layout. Select all of your
fields and Chose Stacked from the Arrange tab.

Adding descriptive text

You may want to add a Title into your header:

How do I make room in my header to add text?


Click and Drag down
between the Form
Header and the Detail
area

Or:

Add a descriptive piece of text next to a field:

Addinganewpieceoftext
1. Make room on your form for your text

2. Click on the Label button


(on the design tab)
3. Click on the form where you want the text and start typing!
4. Press Enter
5. Click on the Save button

Page128

HappyComputers02073757300

Access2007/2010EssentialsForms

Editing a piece of text in a label


You may decide that the text in a label could be more descriptive than the actual
field name:

You can only edit the text in a Label, you MUST NOT edit the text in a Control:
You can change this
text, it is only a
label!

1.
2.
3.
4.

This is the actual field,


so you must not amend
this piece of text!

Select the Label


Click and Drag over the text already there
Type in the new text
Press Enter

5. Click on the Save button

Adding another field


When you start to use the form, you may realise that you have missed off a field
from the table that is actually needed:
1. Make room on your form for the new field
2. Click on the Add Existing Fields button

3. Click and Drag the field you want to the correct place on the form

4. Click on the Save button

HappyComputers02073757300

Page129

Access2007/2010EssentialsForms

Changing the formatting of a control or label


1. Select the Control(s) or Label(s)
2. Click on the Design Tab, on the ribbon to make the changes you want
Font/Fore
Colour

Font Size

Fill/Back
Colour

Font

Bold, Italic or
Underline

Left Align,
Centre
Alignment or
Right Align

3. Click on the Save button


What happens if I change the size of the text?
The Label holding the text may need increasing in size as well, so
that all the text is displayed!

Just Double Click on one of the Size handles!

Changing the colours and borders of a control or label


1. Select the Control(s) or Label(s)
2. Click on the Formatting Too Design Tab to make the changes you
want
Line/Border
Width

Special
Effects

Line/Border
Colour

3. Click on the Save button

Page130

HappyComputers02073757300

Access2007/2010EssentialsForms

Using Auto format to change the style of a form (2007 only)


If you decide that you dont like the Style of the form, you can make a new
choice using the AutoFormat feature:
1. Change to Layout view
2. Click on Format Tab
3. Click the format you want

4. Click on the Save button


My formatting has gone
Note: by changing the background all of the existing formatting will
disappear.
Want more options?

Click here for more choices

Using themes to change the style of a form (2010 only)


1. Open the form in Design or Layout view
2. Click on the Design tab
3. Click on Themes

HappyComputers02073757300

Page131

Access2007/2010EssentialsForms

4. Hover over the designs to select the one you want

5. Click on the one you require

Setting the tab order


If you have moved Controls around on your form AFTER creating it, then the tab
order may need to be reset.

Resetting the tab order


This will automatically reset the tab order of the fields from left to right, row by
row:
1. Open the form in Design view
2. Click on the Arrange Tab (2007)
or
Click on the Design tab (2010)
3. Click on
4. Click on Auto Order
or
use the grey bar on the left to drag the fields to the position you
require

5. Click on OK
6. Click on the Save button

Page132

HappyComputers02073757300

Access2007/2010EssentialsForms

What can go wrong when editing a form?


One fairly common thing that can go wrong is the control (i.e. text box) cannot
find the field to display. The result is as follows:

In design view you will see a small green triangle in the corner to indicate the
problem. This may be because this field has been deleted from the table, in
which case you should delete it from the form. Alternatively it may be that you
accidentally edited the text and have lost the link to the field.
To fix this you need to relink the control to the correct field:
1. Open your form in Design view
2. Click into the problem control
3. Click on the yellow ! smart tag

4. Click the option to Edit the Controls Control Source Property

HappyComputers02073757300

Page133

Access2007/2010EssentialsForms

5. Click on the dropdown to reselect the correct field

Adding Smart tags to a form


Smart tags can be added to forms that will synchronise with other Microsoft
applications, particularly Outlook. These can be especially useful if you
frequently have to send emails to people on your Database.
To add the smart tag you must be in Layout or Design View:
1. Select the control you want to add the Smart Tag to
2. Right click the control and select

The properties window is displayed

Page134

HappyComputers02073757300

Access2007/2010EssentialsForms

3. Select the Data tab and click into the Smart Tags field
4. Click the build button The Smart Tags Options box is displayed

5. Click Person Name then OK


When the form is viewed in form view, the field with the Smart Tag added to it
has a purple triangle in the bottom right corner:

Hovering your cursor over the field displays the Smart Tag:

Clicking the Smart Tag brings up a menu:

Clicking Send Mail will


open a new mail in your
default email program

HappyComputers02073757300

Page135

Access2007/2010EssentialsMainandsubtablesandforms

Main and sub tables and forms


Main and sub tables
What is a main and sub table?
When your tables are linked in a ONE to MANY relationship, they will look like
this in Datasheet view:

The plus signs here indicate that a relationship


exists between this table and another table!

This would be referred to as a MAIN and SUB Table!

Opening a main and sub table


1. Double Click on the table you want to open
2. Click on the Plus Sign to the left of the record you want
Any related information will be displayed:

3. Click into the Sub table to Edit, Add or Delete a record


4. (When you have finished) Click on the Minus sign to the left of the
record

Closing a main and sub table


Click the Close button on the table window

Page136

Click here
to Close

HappyComputers02073757300

Access2007/2010EssentialsMainandsubtablesandforms

Main and sub forms


What is a main and sub form?
When your tables are linked in a ONE to MANY relationship, you can create a
Main and Sub Form to help you enter information in a more user friendly way:

This is the Main


form the ONE
side in a One to
Many
relationship!

This is the Sub form


the MANY side in a one
to many relationship!

What benefits do I gain by creating a main and sub form?


Main and Sub forms provide a way to key in information that can be much more
user friendly than using the tables:

You can view the information in two (or more) tables simultaneously
You can edit the information in the One and the Many side of two
relational tables

Creating a sub form on a main form


To add Sub form to a Main form, you need to have created the Main Form
first!

Adding a sub form to a main form


1. Double-click on the Main form you want to open

2. Click on the Design View button


3. (Maximise your form if necessary)

HappyComputers02073757300

Page137

Access2007/2010EssentialsMainandsubtablesandforms
4. Make some space in the lower half of your form

5. Click the Design Tab


6. Click on the Subform/Subreport button

Click and Drag


down here

(you may have to click on the more button under controls to see it
7. Click where you want to the sub form to appear

The wizard will appear

8. Click on
9. Choose the Table to base your subform on

10. Double-click on the Available Fields, to Select the fields you want
(Dont repeat a field on the Sub form that is already on the Main form)

Page138

HappyComputers02073757300

Access2007/2010EssentialsMainandsubtablesandforms

11. Click on
12. Check that it has found a connection

13. Click on
14. Type a name that clearly describes the sub form

15. Click on
When is my sub form saved?
Your sub form is saved as soon as you give it a Name and Click
on Finish in the Wizard!
(Maximise your form again if necessary)
A sub form will be created for you - at this point you will see it in Design view

HappyComputers02073757300

Page139

Access2007/2010EssentialsMainandsubtablesandforms

What does a main and sub form look like in design view?
This is how your Sub form might look in Design view:

Click on the Save button

(to save the Sub form in the Main form)

Switching to form view of the main form


Click on the View button

Switching to design view of a main and sub form

Click on the View button

Changing the default view of a sub form


The default layout of a Sub form is datasheet view:

However, you can change this if you choose:

This layout
is called
Continuous
Forms

Page140

HappyComputers02073757300

Access2007/2010EssentialsMainandsubtablesandforms

Tochangethelayoutofasubform:
1. Open the Main form in Design view
2. Select the Sub form, by Clicking here

You should
have a black
square in this
box, if the form
is selected

3. Click on the Properties button


4. Change the Default View to
5. Close the Properties window
6. Click on the Save button

(to save the Sub form changes)

7. Switch to Form view

(to view your amended Form)

Closing a main and sub form


Click the Close button on the Main form window

Click here
to Close

HappyComputers02073757300

Page141

Access2007/2010EssentialsMainandsubtablesandforms

What can go wrong in creating a main and sub


form?
I seem to have the same information in the sub form as the main form

Whoops!
The
information
in the sub
form should
be different
to the main
form!

Deletingthesubform,soyoucanstartagain
If you want to recreate the sub form, then you will want to delete the wrong sub
form beforehand:
1. In Design or layout view of the Main form, Click on the Sub form to
select it

2. Press DELETE on your keyboard


3. Follow the steps to recreate the Sub form

Page142

HappyComputers02073757300

Access2007/2010EssentialsMainandsubtablesandforms

4. Click on the Save button


How do I make sure my Sub form is based on the correct
table?
Always check the Sub form wizard carefully at this point:

Ask yourself: Is this the correct table for my Sub form?


If not, Choose a different table!

I seem to have the primary key field in the main form and the sub form

Whoops!
The primary key
field appears in
both my main
form and my sub
form!

Deletingtheprimarykeyfromthesubform
Because you dont need the primary key field in both forms and it can be
confusing to see the information twice, you will need to delete the primary key
from the Sub form:
1. In Design view of the Main form, Click on the Label to select it

HappyComputers02073757300

Page143

Access2007/2010EssentialsMainandsubtablesandforms
2. Press DELETE on your keyboard
3. Click on the Control to select it

4. Press DELETE on your keyboard


5. Click on the Save button

Creating a main and sub form together


If you want to create the Main and Sub form in one go, then you can do this
using the Form Wizard:

Creating a main and sub form in one go!


1. Click on the Create tab (if required)
2. Click on More forms and the Form Wizard (2007)

Or
Click on Form Wizard (2010)

3. Choose the Table or Query to base your Main form on

4. Double-click on the Available Fields, to Select the fields you want for
the Main form

Page144

HappyComputers02073757300

Access2007/2010EssentialsMainandsubtablesandforms

5. Choose the Table or Query to base your Sub form on

6. Double-click on the Available Fields, to Select the fields you want for
the Sub form

7. Click on
8. (Make sure

is checked)

9. Click on

HappyComputers02073757300

Page145

Access2007/2010EssentialsMainandsubtablesandforms

10. Chose a Layout for your Sub form

Datasheet view is the default layout

11. Click on
12. Choose a Style for your Main form (2007 only)

13. Click on
14. Type a name that clearly describes each form

15. Click on
When are my forms saved?
Your forms are saved as soon as you give them a Title and Click
on Finish in the Form Wizard!

Page146

HappyComputers02073757300

Access2007/2010EssentialsMainandsubtablesandforms

A Main form with a Sub form will be created for you:

Closing a main and sub form


Click the Close button on the Main form window

Click here
to Close

Creating a second sub form


You may want to see more than one Sub form in your Main form:
1. Double-click on the Main form you want to open

2.
3.
4.
5.
6.

Click on the Design View button


(Maximise your form if necessary)
Make some space in the lower half of your form (if required)
Click on the Design tab
Click on the Subform/Subreport button

(you may have to click on the more button under controls to see it

HappyComputers02073757300

Page147

Access2007/2010EssentialsMainandsubtablesandforms

7. Click on
8. Choose the Table to base your form on

9. Double Click on the Available Fields, to Select the fields you want
(Dont repeat a field on the Sub form that is already on the Main form)

10. Click on
11. Check that it has found a connection between the two forms

12. Click on
13. Type a name that clearly describes the sub form

14. Click on
When is my sub form saved?
Your sub form is saved as soon as you give it a Name and Click
on Finish in the Wizard!
(Maximise your form again if necessary)
A sub form will be created for you - at this point you will see it in Design view

Page148

HappyComputers02073757300

Access2007/2010EssentialsMainandsubtablesandforms

The Main
form

The Sub
forms

HappyComputers02073757300

Page149

Access2007/2010EssentialsMainandsubtablesandforms

Using a main and sub form


Opening a main and sub form
Which form do I open?
Always open the Main form this holds ALL the information from
any linked forms!
Double-click on the Main form you want to open

The different parts of a main and sub form

A field

A label

Record
Selector
for the Sub
form

Record
Selector
for the
Main
form

Record navigation
buttons for the Sub
form

Record
navigation
buttons for the
Main form

Closing a main/sub form


Click the Close button on the Main forms window

Page150

HappyComputers02073757300

Access2007/2010EssentialsMainandsubtablesandforms

Changing the label of a sub form


You may prefer the text above (or next to) your sub form, to be more descriptive
than the name that you save the sub form under you can easily change this:

1. In Design view of the Main form, Click on the Label of the Sub form to
select it

2. Click and Drag over the text already there


Type in the new piece of text, for example
3. Press Enter
4. Click on the Save button

HappyComputers02073757300

Page151

Access2007/2010EssentialsReports

Reports
Reports
What benefits do I gain by creating a report?
Reports provide a way of producing professional looking output:

You can produce a report that will group information by key headings
You can produce a report that will calculate totals and work out statistical
information
You can produce mailing labels

Should I base my report on a table or a query?

If you base your report directly on a table, then ALL of the entries in the
table will appear in the report
If you base your report directly on a query, then only the SELECTION of
entries in the query will appear in the report

Opening a report
1. Click on the Reports tab
2. Double Click on the report you want to open

(if required)

Your report will be opened in print preview:

Seeing the preview of your report differently


You can choose to zoom in and out, see single pages, two pages
simultaneously, multiple pages or even change the size of the preview you can
see:

Page152

HappyComputers02073757300

Access2007/2010EssentialsReports

You can click on one of the options in the Zoom Group on the Ribbon

Or
Click on the zoom button and select from the options

or
Move the slider on the Zoom Control

Printing an entire report


1. Click on Print

2. Click Ok

HappyComputers02073757300

Page153

Access2007/2010EssentialsReports

Printing a selection of the pages


1. Click on Print

2. Click on
3. Enter the range of pages
4. Click on OK

Closing a report
Click the Close button on the report window
Click here to
Close

Or

Click on

Creating a quick report


Creating a quick Report
1. Click on the table or query you want to base your report on (you dont
need to open it).
2. Click on the Create tab
3. Click on the report button

4. A new report will open in Layout View

Page154

HappyComputers02073757300

Access2007/2010EssentialsReports

Report in
layout view

Grouping,
Sorting and
Totals can be
created here
(this may not
be turned on
yet)

My report looks too crowded!


By default Access will include ALL the fields in your table or query
and fit them all onto your report. It will also name your report after
the table or query it was based on.
Luckily, layout view makes it easy to change your report!

Editing your report in Layout View


No matter how you have created your report, layout view makes it easy to edit
and change the look of your report.
In layout view you can:

Format text
Add and remove fields
Change titles and headings
Add grouping
Sort
Add totals
Automatically format your report

Dont forget to look for the extra tabs on the ribbon when in
layout view!

HappyComputers02073757300

Page155

Access2007/2010EssentialsReports

Applying an AutoFormat (2007)


1. Select the Format tab (if necessary)
2. Click on an Auto format style to apply it

Click here to scroll


thorough the other
designs

Click here to see all


the designs at once

Applying a Theme (2010)


1. Click on the Design tab (if necessary)
2. Click on the Themes button

3. Hover over the themes to get a preview of how they will look

4. Click on the one that you like

Rename you report


1. Click on the title

2. Select the text you want to change/delete

3. Edit the title

Removing fields from your report


1. Right-click on the heading

2. Select Delete column

Page156

HappyComputers02073757300

Access2007/2010EssentialsReports

Adding fields to your report


1. Click on Add existing fields button

2. From the field list window drag the field you want onto your report.

3. A vertical bar will indicate where your new field will appear

If youve created your relationships you can add fields from


the linked tables in the same way as above!

Moving fields
Click and drag your fields to their new positions

HappyComputers02073757300

Page157

Access2007/2010EssentialsReports

Format or edit headings


1. Select the heading

2. Edit the text and/or apply formatting

Want to format all of your headings at once?


Select them all by clicking in the left margin

Resizing fields
1. Select the field

2. Click and drag the field to resize

Grouping information
You may have a report with repetitive information in it:
For example, a list of employees showing the department they work in
Department
Sales
Sales
Sales
Executive
Executive
Executive

Name
P Smith
K Patel
J Monahan
K Levine
J Adewole
H Stewart

You would probably prefer the information to look like this:


Department
Executive

Name
J Adewole
K Levine
H Stewart

Sales
J Monahan
K Patel
P Smith

Page158

HappyComputers02073757300

Access2007/2010EssentialsReports

Applying Grouping
1. Click on the Group and Sort button
(if you cannot see the Group, Sort and Total section at the bottom)

The Grouping Sorting and Totals window will appear beneath your
report

2. Click Add a group


3. Select the field you would like to group on

4. To change the grouping click here and select another field

My field has moved to the left of my report


When you group by a field Access moves that field to the left of
your report.

Removing grouping
To remove grouping click here

HappyComputers02073757300

Page159

Access2007/2010EssentialsReports

Add sorting
1. Click on the Group and Sort button
(if you cannot see the Group, Sort and Total section at the bottom)

The Grouping Sorting and Totals window will appear beneath your
report

2. Click Add a sort


3. Select the field you would like to sort on
4. To change the sorting click here and select another field

Removing sorting
To remove grouping click here

Adding totals to your report


1. Select the field you would like a total for

2. Click on the totals button

3. Select
If youve added any groupings you will have a sub total for
each group and a grand total at the end!

Page160

HappyComputers02073757300

Access2007/2010EssentialsReports

Page orientation
1. Click on the Page Setup tab

2. Select landscape or portrait as desired

Saving your report


When you Close a Report, you will automatically be prompted to Save it:

1. Click the Close button on the report window


Click here
to Close

If you do want to keep the report, then:


2. Click on Yes
3. Type in a name that clearly describes the report

4. Click on OK

HappyComputers02073757300

Page161

Access2007/2010EssentialsReports

What are the different views of a report?


How many views are there?
There are three views to a report:

Design View
Layout View
Print Preview

Design view
In design view you can:

Page162

Add fields
Delete fields
Move fields
Resize fields
Add descriptive text next to fields
Add or Amend a Title for the report in the Page Header
Add or Amend information in the Page Footer (like page numbers)
Change the format of all the fonts
Change the colours and borders of the fields
Change the Style of the report

HappyComputers02073757300

Access2007/2010EssentialsReports

Layout view
In layout preview you can:

Add fields
Delete fields
Move fields
Resize fields
Add descriptive text next to fields
Format numbers as dates or currency
Add or Amend a Title for the report
Add or Amend information in the Page Footer (like page numbers)
Change the format of all the fonts
Change the colours and borders of the fields
Change the Style of the report

Layout view allows you to change your report in a What You See I What You
Get (WYSIWYG) view that you may find easier than design view

Print preview
In print preview you can:

View the information in the report, to see exactly how it will appear on
each page
Change the page setup
Print your report
Export your report to word or a web page

HappyComputers02073757300

Page163

Access2007/2010EssentialsReports

Switching between views


Why does my report look so small?
If your report isnt Maximised you may have difficulty seeing all the
information.
To maximise a report, Click on the Maximise button on the report
window!

Switching to design view of a report


Click on the Design View button

Switching to print preview of a report


Click on the Print Preview button

Switching to layout view


Click on the Layout View button

Page164

HappyComputers02073757300

Access2007/2010EssentialsReports

Tips on improving a reports layout


How can I improve the look of a report?
Formattingnumberstolooklikecurrency

How can I format


my numbers to
look like currency?

Formatting numbers to look like currency


If a field needs to be formatted as currency you SHOULD set this
at Table level (in Design view).
(Although this can be changed in a reports design, you would then
have to change it EACH time you created a new report causing
you lots of wasted time!)
1. (in layout view) Click on the first number in the field

2. Click on the Format tab


3. Click on the currency button

HappyComputers02073757300

Page165

Access2007/2010EssentialsReports

Sending a report to Word


Sending a report to Word
To send a COPY of a report to Word for Windows:
1. Open your report in Print Preview or report view
2. Click on the External Data tab
3. Click on the Word button in the Export group (2007)
or
Click on the More button and select Word (2010)

4. Specify a location and name if necessary

5. Click OK
Publishing a report to Word
Be aware, only a COPY of the information will be sent! If you
change any of the information in Word it will not change the data in
your Database!

Creating a report using the wizard


Creating a report using the wizard
1. Click on the Create tab
2. Click on the Report Wizard Button

Page166

HappyComputers02073757300

Access2007/2010EssentialsReports

3. Choose the Query to base your report on

(or the Table)

4. Double-click on the Available Fields, to Select the fields you want

5. Click on
6. Double-click on the field(s) you want to Group by

7. Click on
8. Choose a field to Sort by
9. Click on

HappyComputers02073757300

Page167

Access2007/2010EssentialsReports

10. Choose a Layout for your Report

11. Click on
12. Choose a Style for your Report (2007 only)

13. Click on
14. Enter a name for your Report
(this is the name it will be saved with)

15. Click on Finish


When is my report saved?
Your report is saved as soon as you give it a Title and Click on
Finish in the Report Wizard!

Page168

HappyComputers02073757300

Access2007/2010EssentialsReports

A report will be created for you:


The Title will probably
need to be changed!

Blanks will
always appear
first!
In our
example, we
have three
people without
a department!

My report doesnt look as good as I thought it would!


Remember: What you get OUT will only be as good as what you
put IN!

Creating a report with calculations using the


wizard
Creating a report with calculations using the wizard
What do I have to do to get my report to calculate?
As long as you include a Number or Currency field in the Query or
Table that you base your report on, Access will be able to do the
calculations for you!
1. Click on the Create tab
2. Click on the Report Wizard Button

HappyComputers02073757300

Page169

Access2007/2010EssentialsReports

3. Choose the Query to base your report on

(or the Table)

4. Double-click on the Available Fields, to Select the fields you want

5. Click on
6. Double-click on the field(s) you want to Group by

7. Click on
8. Choose a field to Sort by
9. Click on

Page170

HappyComputers02073757300

Access2007/2010EssentialsReports

10. Click the calculation choices you want


11. Click on
12. Click on
13. Choose a Layout for your Report

14. Click on
15. Choose a Style for your Report (2007 only)

16. Click on
17. Enter a name for your Report
(this is the name it will be saved with)

18. Click on Finish


When is my report saved?
Your report is saved as soon as you give it a Title and Click on
Finish in the Report Wizard!

HappyComputers02073757300

Page171

Access2007/2010EssentialsReports

Editing text in a report


Changing the title in a report
You may decide that the text in the Title of a report, could be improved or more
descriptive than the actual report name:
The wizard automatically
provides information on how
many records there are for
each group, when you choose
summary options!
This text can be amended if
you want!

These refer to your total we can amend the text (on the left) and format the
number as currency (on the right) to improve your report!

1. (Open your report in Design or Layout view)


2. Click on the Label to Select it

3. Click and Drag over the text already there


4. Type in the new Title
5. Press Enter
6. Click on the Save button

Editing the text describing the calculations


You may decide that the text referring to the totals in your report, could be
improved, or more descriptive than what Access automatically gives you:

ImprovingtheSumlabel
1. (Open your report in Design view)
2. Click on the Label to Select it

Page172

HappyComputers02073757300

Access2007/2010EssentialsReports

3. Click and Drag over the text already there


4. Type in the new piece of text, for example
5. Press Enter
6. Click on the Save button
ImprovingtheDetailrecordslabel
1. (Open your report in Design view)
2. Click on the Label to Select it

3. Click and Drag over the text you want to change


(be careful not to remove any of the quote marks or the actual
calculations!)
4. Type in the new piece of text, for example:

5. Press Enter
6. Click on the Save button

For example, this looks much more professional:

Formatting the total as currency


You may decide that the format of the number referring to the totals in your
report, could be improved:

1. (Open your report in Design view)


2. Click on the Control to Select it

HappyComputers02073757300

Page173

Access2007/2010EssentialsReports

3. Click on Property Sheet

4. Click into the Format property

5. Choose the Currency format


6. Close the Properties window
7. Click on the Save button
For example, this looks much more professional:

Creating mailing labels


Creating a mailing labels using the wizard
1. Highlight Table or Query in navigation pane
2. Click on the Create tab
3. Click on the Labels Button

4. Choose the correct label size

You may need to


change the info
here, to find the
correct labels for
you!

5. Click on

Page174

HappyComputers02073757300

Access2007/2010EssentialsReports

6. Change these settings if necessary

7. Click on
8. Create your label
9. Type any extra text that you want
Double-click on the Available fields, to add them to your label

(Remember to press Enter and use the SPACEBAR as appropriate!)


10. Click on
11. Choose a field to Sort by

(Sort by a field like Surname or Org Name in case of a print jam!)


12. Click on
13. Type in a name that clearly describes the labels

14. Click on
When are my labels saved?
Your labels are saved as soon as you give them a Title and Click
on Finish in the Label Wizard!

HappyComputers02073757300

Page175

Access2007/2010EssentialsReports

A labels report will be created for you:

Ive got a Trim message!


This has appeared because you have some extra spaces in your
data. Dont worry by changing the settings on your computer we
can work around it.
1. Press Ctrl + G (to open the VBA window)
2. Click on the Tools menu
3. Click on References
4. Look for anything with the word MISSING in front that is
ticked

5.
6.
7.
8.

Remove the tick


Click OK
Close the VBA window
Open your labels

With most databases you will not need the bit that is missing and
this will solve your problem. If this doesnt work or causes other
advanced features not to work then you will need to find the
missing element, contact your IT department in this case.

Page176

HappyComputers02073757300

Access2007/2010EssentialsReports

Creating a mail merge to Word


What is a mail merge?
Mail Merge is a way of producing individually addressed standard letters.

The mail merge process Summary of the 3 steps

You need to use or create a 'Data Document' this contains the names,
addresses and other personal information
You need to create a 'Main Document' this contains the standard text
of the letter

Then you Merge the two.


Letter:
Standard text in a
letter format (Word)

Data Document:
Names & Addresses
Name
-------------------

This comes
from Access
in the form of
query a or
table

------------------------------------------

Add
-------------------------------------------------------------------------------------

Town
----

PCod
------

------------------

-----------------

-------

-------

------------------------------------

-------------------------------

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Step 1 - Creating a mail merge from access


Before proceeding with your Mail Merge you need to decide:

HappyComputers02073757300

Page177

Access2007/2010EssentialsReports

Are you writing to everyone in your table

Or:

Are you writing to just a selection of people in this case you need to
create a query first!
1. Click on the Query or Table

(to select it)

Or
2. Click on the External Data tab
3. Click on the More button and click on Merge It with Microsoft Word
(2007)

Or
Click on Word Merge (2010)
4. Click on the option that is relevant for you

5. Click on
Word will automatically open with a new document, where you can complete
your Mail Merge:
Ive got an error message!

Close and Reopen your database and it should let you do it next
time!

Step 2 - Creating a letter


1. Click on the Insert Merge Field button

Page178

HappyComputers02073757300

Access2007/2010EssentialsReports

2. Click on the first field you want to insert. The merge field will be
inserted into your letter.

3. Repeat steps 6 and 7 as necessary, dont forget to use the


SPACEBAR and Enter keys as appropriate
Insertingadateinyourdocument:
To insert a date, that will update automatically each time the letter is printed:
1. Click on the Insert tab
2. Click on Date and Time
3. Choose a Date format from the available list

4. Click on
5. Click on
Typingtheletter:
Type the standard text of the letter, inserting extra fields as necessary:

Step 3 - Merging with the letter


When your letter has been created:

HappyComputers02073757300

Page179

Access2007/2010EssentialsReports

1. Click on the Finish and Merge button

2. Click on
3. Click on OK

Do I need to save my letters?


No, you dont usually save the result of a merge the many personalised letters
because these will take up lots of disk space! Only save the result of a merge
if you have to keep a copy for example for legal reasons.
You can always quickly merge the Data Document and the Letter again.
What should I save then?
Always save the Letter this is the document with all the fields in
it! Then you can use it again.

What if I only want to print some of my letters?


If you want to print specific letters only, then follow these steps
1. Click on the Office button (2007)
or
Click on the File tab (2010)
2. Click on Print (click on Print again for 2010)
3. Click into the Pages box and type the record numbers you want

In our example, we want the


letters on page 15 to page 48
inclusive!

Page180

HappyComputers02073757300

Access2007/2010EssentialsReports

4. Click on

Using a previously saved document to merge


Merging a word document again!
1. Click on the Query or Table

(to select it)

Or
2. Click on the External Data tab
3. Click on the More button and click on Merge It with Microsoft Word
(2007)

or
Click on Word Merge (2010)

4. Click on
5. Click on
6. Find your Word letter Click on it to select it
7. Click on
You will now be taken to your previously saved document in Word, where you
can complete your Mail Merge:

Merging with the letter


Make any necessary amendments to your letter, then
1.

Click on the Finish and Merge button

2. Click on
3. Click on OK

HappyComputers02073757300

Page181

Page182

Access2007/2010EssentialsReports

HappyComputers02073757300

Access2007/2010EssentialsAdvancedQueries

Advanced Queries
What if my information is stored in more than one table?
If your information is stored in more than one table, then you add ALL of the
tables that hold the information you need to extract!

Creating a query based on more than one table


1. Click on the Design tab (if required)
2. Click on Query Design
3. Double Click on the tables you want to use
4. Click

Your two tables are


automatically linked,
because you have created
a relationship between
them!

5. Double Click on the fields to include in the query

6. (Add any criteria if required) and (Choose which fields you want to
Sort on if required)

HappyComputers02073757300

Page183

Access2007/2010EssentialsAdvancedQueries

7. Click on the Run button

Returntothequerygrid:
If you want to add anything to the query design or amend something that isnt
quite right, then you need to go back to the design view of your query:
8. Click on the View button

When you are happy with everything in the design of the query you can run it
again
9. Click on the Save button

10. Type a name that clearly describes the query


11. Click on OK

Queries that prompt for criteria


Why might you want a query that prompts you for criteria?
Rather than adding and amending criteria in the Design view of a query, you can
create a query that will prompt you for the criteria you want each time you open
it!
This type of query is called a parameter query:

Page184

HappyComputers02073757300

Access2007/2010EssentialsAdvancedQueries

Creating a parameter query


1. Create a new query, add the fields you want
(or open an existing one you wish to amend)
2. In the Criteria row of the correct field, type the text you want as a
prompt
enclosed in square brackets

For Example, type [Please enter the department you want] to have Access
prompt the user to type in the required department:

3. Click on the Save button


4. Type a name that clearly describes the query
5. Click on
How many prompts can I have?
You can specify as many prompts as you like! In Design view of
the query, just type your text enclosed in square brackets, then
when you open the query you will be prompted for the criteria one
by one!

Running a parameter query


1. Double Click on your query

2. Type your criteria


3. Click on
Your query will be opened:

HappyComputers02073757300

Page185

Access2007/2010EssentialsAdvancedQueries

Creating a parameter query using wildcards


What if I dont want to type the EXACT criteria in the prompt?
For example, you might want to type A to find Admin,
Administration, Admin Assistant, Admin Manager etc.
To achieve this you need to include a wildcard outside of the
prompt!
1. Create a new query, add the fields you want

(or open an existing one you wish to amend)


2. In the Criteria row of the correct field, type Like then the text you want

as a prompt
enclosed in square brackets and then & *

For Example, type Like [Please enter the department you want]& *
to have Access prompt the user to type in part of the required
department:

Page186

HappyComputers02073757300

Access2007/2010EssentialsAdvancedQueries

I cant see all my criteria in Design view how can I


view/check what Im typing?
Press SHIFT F2 in the Criteria row

Type your criteria, Click on OK

3. Click on the Save button


4. Type a name that clearly describes the query
5. Click on

Creating a parameter query to select numbers or dates within a range


What if I want to use prompts to select dates or numbers
within a range?
To do this you need to set up two temporary fields using the Query
Parameters dialogue box!
1. Create a new query, add the fields you want
(or open an existing one you wish to amend)
2. Click on Parameters (on the Design tab)
3. Type the temporary names for your prompts and set the Data Types

4. Click on
5. In the Criteria row of the correct field:
type Between then the first temporary field name enclosed in square
brackets
then And
then the second temporary field name enclosed in square brackets

For Example, type Between [Lowest Salary Level] and [Highest Salary
HappyComputers02073757300

Page187

Access2007/2010EssentialsAdvancedQueries

Level] to have Access prompt the user to type in the required salary amounts:

6. Click on the Save button


7. Type a name that clearly describes the query
8. Click on

Running a parameter query to select numbers or dates within a range


1. Double Click on your query

Type your first criteria


2. Click on

3. Type your second criteria


4. Click on

Your query will be opened:

Page188

HappyComputers02073757300

Access2007/2010EssentialsFlowchartDatabasedesign

Flowchart Database design


Flowchart Database design

HappyComputers02073757300

Page189

Access2007/2010EssentialsIndex

Index
Access
Closing ...................................... 12
AND.............................................. 53
In Filters .................................... 39
Ascending ................................... 32
Auto format ................................. 131
AutoCorrect .................................. 25
Blanks .......................................... 52
Calculations ................................ 169
Cascade Delete .......................... 101
Cascade Update ........................ 101
Closing
Access....................................... 12
Forms ........................................ 36
Main and Sub Forms ............... 147
Main Form ............................... 141
Queries...................................... 46
Relationship Window ............... 102
Reports.................................... 154
Tables ....................................... 25
Column
Freezing .................................... 21
Hiding ........................................ 21
Moving....................................... 20
Selecting ................................... 19
Width ......................................... 20
Combo Box .................................. 87
Control........................................ 122
Criteria.......................................... 51
AND........................................... 51
Blanks ....................................... 52
Deleting ..................................... 40
Examples .................................. 61
Multiple Criteria ......................... 52
NOT........................................... 51
Numbers, Dates and Wildcards . 55
OR ............................................. 51
Data.............................................. 10
Data Type..................................... 73
Database
Advantages ................................. 6
Creating..................................... 69
Definition ..................................... 6
Design Principles ...................... 66
Heirarchy ................................. 114
Opening..................................... 11
Page190

Parts ............................................ 7
Relational Definition .................. 96
Database Design........................ 189
Dates ............................................ 55
Inserting in a Mail Merge ......... 179
Deleting
Controls and Labels ................ 127
Criteria ...................................... 40
Fields ........................................ 78
Fields From Query Grid ............. 44
Primary Key............................... 77
Records ..................................... 24
Relationships........................... 111
Descending ................................ 32
Design Principles ......................... 66
Design View
Form ........................................ 122
Query ........................................ 46
Report ..................................... 162
Table ......................................... 76
email .......................................... 134
Field ............................................. 10
Adding to a Form..................... 129
Creating .................................... 72
Data Type ................................. 73
Deleting From Query Grid ......... 44
Deleting Primary key ................. 78
Hiding in a query ....................... 64
Moving in Query Grid ................ 44
Properties .................................. 78
Sorting in a query ...................... 62
Filters
Filtering by form ........................ 38
Filtering by selection ................. 37
Removing .................................. 38
Saving as a Query..................... 40
Find records ................................. 28
Foreign Key .................................. 97
Form
Adding Descriptive Text .......... 128
Adding Fields .......................... 129
Closing ...................................... 36
Closing Main and Sub ............. 147
Closing Main Form .................. 141
Creating a Main and Sub Form 144
Creating a Sub Form ............... 137
HappyComputers02073757300

Creating With the Wizard ......... 116


Design View............................. 122
Editing Labels .......................... 129
Formatting ............................... 130
From Layout ............................ 124
Info .......................................... 115
Main and Sub .......................... 137
Main and Sub Form Using ....... 150
Multiple Objects ......................... 15
Opening ..................................... 15
Parts of ...................................... 34
Printing ...................................... 36
Selection .................................. 122
Sub Form Creating .................. 137
Sub Forms ............................... 137
Switching Between Views ........ 120
Tab Order ................................ 132
Using ......................................... 33
Views ....................................... 118
Format property ............................ 83
Freezing columns in a Table ........ 21
Hiding
Columns in a Table.................... 21
Input Mask .................................... 85
Jargon .......................................... 10
Labels ......................................... 174
Trim ......................................... 176
Landscape Printing ....................... 27
Letters ........................................ 179
List Box ......................................... 87
Lookups
Based on another table ............. 88
Creating ..................................... 87
Definition ................................... 87
Format ....................................... 87
Limit to List ................................ 93
With the Wizard ......................... 91
Mail Merge .................................. 177
Main and Sub ..................... 136, 144
Merging a Word doc again ......... 181
Moving
Columns .................................... 20
Controls and Labels in a Form. 126
Field in Query Grid .................... 44
Navigation Pane ........................... 13
New record ................................... 23
Numbers ....................................... 55
One to Many relationships ............ 97
Opening
A Database ................................ 11

HappyComputers02073757300

Access2007/2010EssentialsIndex
Table, Query, Form, Report....... 15
OR ................................................ 53
Orientation .................................... 27
Outlook ....................................... 134
Page Orientation .......................... 27
Parameter Queries ..................... 184
Parameter Queries using Ranges
................................................ 187
Parameter Queries Using Wildcards
................................................ 186
Parts of a database ........................ 7
Portrait Printing............................. 27
Primary Key ............................ 77, 97
Print Preview
Reports .................................... 163
Print Preview of a Table ............... 26
Printing ......................................... 26
Forms ........................................ 36
Landscape ................................. 28
Portrait ....................................... 28
Relationships ........................... 112
Reports .................................... 152
Problems
Field Properties ......................... 83
Lookups ..................................... 94
Primary Key ............................... 78
Queries ................................ 48, 59
Relationships ........................... 102
Sub Forms ............................... 142
Queries
Adding Criteria........................... 51
Changing View .......................... 45
Creating ..................................... 42
Creating without Wizards........... 41
Definition ................................... 41
Example Criteria ........................ 61
Hiding Fields.............................. 64
Numbers, Dates and Wildcards . 55
Opening ..................................... 15
Parameter................................ 184
Relational Tables ..................... 183
Results ...................................... 59
Running ..................................... 45
Saving ....................................... 45
Sorting ....................................... 62
Top Values ................................ 60
Trouble-Shooting ................. 48, 59
Two Tables .............................. 183
Views ......................................... 46
Query

Page191

Multiple Objects ......................... 15


Record.......................................... 10
Creating a New one................... 23
Deleting ..................................... 24
Does NOT Meet Criteria ............ 51
Entering ..................................... 22
Extracting in a Query ................. 51
Finding ...................................... 28
Finding Blanks ........................... 52
Form Navigation Buttons ........... 34
Navigation Buttons .................... 18
Printing ...................................... 26
Selecting ................................... 19
Sorting in a Table ...................... 32
Specific Search ......................... 30
Referential Integrity .................... 100
Relationships ................................ 96
Creating..................................... 98
Deleting ................................... 111
Editing ..................................... 110
Main and Sub Tables .............. 136
Printing .................................... 112
Trouble-shooting ..................... 102
What you Need ......................... 97
Window Display ....................... 111
Repeating Info .............................. 24
Reports....................................... 152
Auto Format ............................ 156
Calculations ............................. 169
Changing the Title ................... 172
Creating with the Wizard ......... 166
Editing in Layout View ............. 155
Editing Text ............................. 172
Formatting ............................... 173
Labels...................................... 174
Mailing Labels ......................... 174
Opening..................................... 15
Quick Report ........................... 154
Sending to Other Programs ..... 166
Sorting ..................................... 160
Switching Between Views ....... 163
Views....................................... 162
Re-Sizing
Controls or Labels ................... 127
Saving
Filter as a Query ........................ 40
Saving the sort in a Table............. 33
Selection
In a Table .................................. 19
In Forms .................................. 122

Page192

Access2007/2010EssentialsIndex
Sorting
In a Query ................................. 62
Spell-Check .................................. 24
Starting
Access ...................................... 11
Sub
Forms ...................................... 137
Forms Changing Title .............. 151
Forms Creating ....................... 137
Forms Creating a Second ....... 147
Tables ..................................... 136
Tab Order ................................... 132
Table
Changing the Layout ................. 20
Closing ...................................... 25
Creating .................................... 71
Creating for a Lookup ................ 88
Entering Records ...................... 22
Field Properties ......................... 78
Freezing Columns ..................... 21
Hiding Columns ......................... 21
Info ............................................ 17
Linking ....................................... 97
Main and Sub .......................... 136
Multiple Objects......................... 15
Opening .................................... 15
Parts of ...................................... 17
Printing ...................................... 26
Record Navigation Buttons ....... 18
Relationships............................. 97
Saving ....................................... 75
Saving Layout Changes ............ 22
Searching .................................. 28
Selection ................................... 19
Sorting ....................................... 32
Sub Tables .............................. 136
Switching Between Views ......... 77
Trouble-shooting ....................... 78
Views ........................................ 76
Trim ............................................ 176
Trouble-shooting
Field Properties ......................... 83
Lookups .................................... 94
Primary Key............................... 78
Queries ............................... 48, 59
Relationships........................... 102
Sub Forms .............................. 142
Undo ............................................ 23
Validation ..................................... 86
Views

HappyComputers02073757300

Form ........................................ 118


Query ......................................... 46
Report ...................................... 162
Table ......................................... 76
What's Wrong
Field Properties ......................... 83
Lookups ..................................... 94

HappyComputers02073757300

Access2007/2010EssentialsIndex
Primary Key ............................... 78
Queries ................................ 48, 59
Relationships ........................... 102
Sub Forms ............................... 142
Wildcards...................................... 55
Word ........................................... 166
Word-Mail Merge ........................ 177

Page193

Вам также может понравиться