Академический Документы
Профессиональный Документы
Культура Документы
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
Queries ............................................................................... 41
Queries............................................................................................................ 41
Creating a simple query without wizards ......................................................... 41
What are the main views of a query? .............................................................. 46
Lookups ............................................................................. 87
Using lookups .................................................................................................. 87
Page2
HappyComputers02073757300
Access2007/2010EssentialsContents
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
Page4
HappyComputers02073757300
Access2007/2010EssentialsHappyComputersTelephoneHelpLine
help_line@happy.co.uk
020 7375 7373
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.
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
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
Tables
Queries
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
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
For example:
Field
For example:
Data
Page10
HappyComputers02073757300
Access2007/2010EssentialsThefourkeypartstoanaccessdatabase
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
1. Click on Open
Exiting Access
Click the Close button on the Access window
Page12
HappyComputers02073757300
Access2007/2010EssentialsThefourkeypartstoanaccessdatabase
Using a Database
The Navigation Pane
The Navigation Pane provides easy access to all of your objects:
HappyComputers02073757300
Page13
Access2007/2010EssentialsThefourkeypartstoanaccessdatabase
Click here
Page14
HappyComputers02073757300
Access2007/2010EssentialsThefourkeypartstoanaccessdatabase
And here to
restore it
Double-click on
the object you
want to open
Windows
Tabs
HappyComputers02073757300
Page15
Access2007/2010EssentialsThefourkeypartstoanaccessdatabase
Usingwindows
Each Database object will open in a new window:
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
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:
Opening a table
Double-click on the table you want to open
A cell
Scroll
bars to
move
about
Record
Selectors
each
row is
one
record
HappyComputers02073757300
Page17
Access2007/2010EssentialsThefourkeypartstoanaccessdatabase
First
record
New record
Previous record
Next
record
Last
record
F2
Spacebar
Esc
Page18
HappyComputers02073757300
Access2007/2010EssentialsThefourkeypartstoanaccessdatabase
Selecting a record
Click on the record selector of a record
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
Moving a Column
1. Select the column
2. Place your mouse in the column heading
Page20
HappyComputers02073757300
Access2007/2010EssentialsThefourkeypartstoanaccessdatabase
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:
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
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
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:)
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.
Page24
HappyComputers02073757300
Access2007/2010EssentialsThefourkeypartstoanaccessdatabase
and click on
(2007)
(2010)
2. Click on
3. Click on
4. Click on
5. Click in the Replace box and mistype 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
4. Click on
5. Click on OK
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
View two
pages at
once
View
single
page
PORTRAIT:
HappyComputers02073757300
LANDSCAPE:
Page27
Access2007/2010EssentialsThefourkeypartstoanaccessdatabase
1. Go to Print Preview
2. Click on Landscape
Page28
HappyComputers02073757300
Access2007/2010EssentialsThefourkeypartstoanaccessdatabase
For example:
Option
Result
Any Part of
Field
Whole Field
Start of Field
HappyComputers02073757300
Page29
Access2007/2010EssentialsThefourkeypartstoanaccessdatabase
Option
Result
Search
Match Case
Search Fields as
Formatted
6. Click on
(keep clicking on this until you find the record you want)
Page30
HappyComputers02073757300
Access2007/2010EssentialsThefourkeypartstoanaccessdatabase
8. Click on
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
HappyComputers02073757300
Page31
Access2007/2010EssentialsThefourkeypartstoanaccessdatabase
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:
Result
Ascending
Descending
Page32
HappyComputers02073757300
Access2007/2010EssentialsThefourkeypartstoanaccessdatabase
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.
Opening a form
Double Click on the form you want to open
HappyComputers02073757300
Page33
Access2007/2010EssentialsThefourkeypartstoanaccessdatabase
A field/control
Record
Selector
each
page is
one
record
Record
navigation
buttons
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
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.
5. Click on
(keep clicking on this until you find the record you want)
HappyComputers02073757300
Page35
Access2007/2010EssentialsThefourkeypartstoanaccessdatabase
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
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
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
HappyComputers02073757300
Page37
Access2007/2010EssentialsThefourkeypartstoanaccessdatabase
Removing Filters
1. Click on the Advanced button
2. Click on Clear All Filters
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
HappyComputers02073757300
Page39
Access2007/2010EssentialsThefourkeypartstoanaccessdatabase
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
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
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:
Page42
HappyComputers02073757300
Access2007/2010EssentialsQueries
Double
Click on the
field you
want
Access will
then add it
here
Or:
HappyComputers02073757300
Page43
Access2007/2010EssentialsQueries
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
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
Page44
HappyComputers02073757300
Access2007/2010EssentialsQueries
HappyComputers02073757300
Page45
Access2007/2010EssentialsQueries
Closing a query
Click the Close button on the query window
Click here
to Close
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
HappyComputers02073757300
Page47
Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?
I added the same table twice by mistake when I first created my query
Page48
HappyComputers02073757300
Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?
The fact that you still have fields shown in your query grid is
your clue that the table hasnt actually been deleted!
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!
Page50
HappyComputers02073757300
Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?
HappyComputers02073757300
Page51
Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?
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?
You get
OrIncomputerlanguage,ORmeansmeetsanypieceofthecriteria.
You ask for
You get
HappyComputers02073757300
Page53
Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?
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:
Page54
HappyComputers02073757300
Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?
Using Or
IfyouaresearchingforrecordswhichmeetANYofthecriteria,thenyouneedtouse
ORbyplacingyourcriteriaondifferentlines:
HappyComputers02073757300
Page55
Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?
Using numbers
Example
>100
<100
>=100
<=100
Remember:
You dont
need to type
signs or
use capitals
Using dates
Example
>1/1/99
<1/1/99
>=1/1/99
<=1/1/99
Page56
HappyComputers02073757300
Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?
HappyComputers02073757300
Page57
Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?
ke*
For example:
Will find:
*man
For example:
Will find:
Example
*84
For example:
Will find:
Page58
HappyComputers02073757300
Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?
HappyComputers02073757300
Page59
Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?
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!
Page60
HappyComputers02073757300
Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?
london
london or manchester
Not usa
Like s*
Like *imports
Like [a-d]*
Null
Usingnumbers:
Example
>=15000
20000
Between 45 and 50
Usingdates:
Example
#6/6/99#
Like */6/99
>=#1/1/99#
HappyComputers02073757300
Page61
Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?
Page62
HappyComputers02073757300
Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?
Thissort:
HappyComputers02073757300
Page63
Access2007/2010EssentialsWhatcangowrongwhencreatingaquery?
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?
HappyComputers02073757300
Page65
Access2007/2010EssentialsCreatingaDatabase
Creating a Database
Design Principles
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:
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:
to
MANY
HappyComputers02073757300
Page67
Access2007/2010EssentialsCreatingaDatabase
Look at the facts that make up your Database and divide them into
fundamental groups each group can then be a table
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)
Page68
HappyComputers02073757300
Access2007/2010EssentialsCreatingaDatabase
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
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 table
Creating the fields and deciding the data type for each field
Deciding which field will be your Primary key
Saving the table
Tocreateanewtable
1. Click on the Create Tab
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
4. Tab into the Field Name column and type the next name, etc
Page72
HappyComputers02073757300
Access2007/2010EssentialsCreatingaDatabase
Decidingthedatatypeforeachfield
Access gives you a choice of data types for holding different types of
information:
Data Type
Extra Information
Text
Letters or numbers
Extra Information
Number
Date/Time
HappyComputers02073757300
Page73
Access2007/2010EssentialsCreatingaDatabase
Currency
Monetary values
AutoNumber
Yes/No
Data Type
Extra Information
OLE Object
Hyperlink
An example of a
hyperlink:
Attachment
Calculation
(2010 only)
Lookup
Wizard
An example of a
lookup:
Interpretation by Access
Page74
HappyComputers02073757300
Access2007/2010EssentialsCreatingaDatabase
Creatingaprimarykey:
1. Click in the field to become a primary key
HappyComputers02073757300
Page75
Access2007/2010EssentialsCreatingaDatabase
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
HappyComputers02073757300
Page77
Access2007/2010EssentialsCreatingaDatabase
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
HappyComputers02073757300
Access2007/2010EssentialsCreatingaDatabase
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
Examples
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:
Validation
Text
Required
Page80
HappyComputers02073757300
Access2007/2010EssentialsCreatingaDatabase
Property
Indexed
What it means
Examples
index
ThesearetheotherFieldProperties:
Property
What it
means
Examples
Decimal
Places
How many
decimal
places do
you want
displayed to
the right of
the decimal
point
This will
force the
input of
information
to appear in
a pre-set
format or
allow a
preset
number of
characters
only
Input Mask
HappyComputers02073757300
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
Allow Zero
Length
A setting
that defines
whether
zero-length
strings are
permitted
Unicode
Compression
This allows
symbols or
text to
always be
read
correctly
IME Mode
Input
Method
Editor (IME)
IME
Sentence
Mode
Using the
IME Mode,
you can
then choose
from 4
options:
Phrase
Predict,
Plural
Cause,
Conversatio
n and None
Page82
HappyComputers02073757300
Access2007/2010EssentialsCreatingaDatabase
Makingafieldrequiredoraddingavalidationrule
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
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
123
Page84
HappyComputers02073757300
Access2007/2010EssentialsCreatingaDatabase
Thefollowingtablewillhelpyouconstructyourinputmask
Mask character
What it means
&
.,:;-/
<
>
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
Personnel or Finance or
Admin or Fund Raising
<#1/1/92#
>10000
>=#1/1/00# and
<=#31/12/00
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
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
ListBox
All of the information to choose from is displayed, but only the chosen
information is shown as highlighted:
Page88
HappyComputers02073757300
Access2007/2010EssentialsLookups
6. Click on
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
9. Click on
10. You are then asked if you want to sort the data within the lookup
Page90
HappyComputers02073757300
Access2007/2010EssentialsLookups
Does it work?
1. Click on the Datasheet view button
2. Click into your lookup field
HappyComputers02073757300
Page91
Access2007/2010EssentialsLookups
2. Click into the Data Type column of the field you want to turn into a
lookup
Does it work?
1. Click on the Datasheet view button
2. Click into your lookup field
Page92
HappyComputers02073757300
Access2007/2010EssentialsLookups
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.
HappyComputers02073757300
Page93
Access2007/2010EssentialsLookups
5. Click on Save
Page94
HappyComputers02073757300
Access2007/2010EssentialsLookups
HappyComputers02073757300
Page95
Access2007/2010EssentialsRelationalDatabaseDesign
In fact, very few Databases (if they are designed correctly) hold all their
information in just one table!
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
HappyComputers02073757300
to
MANY
Page97
Access2007/2010EssentialsRelationalDatabaseDesign
The Primary
key (it is
always shown
with the
symbol)
The
Foreign
key
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?
Text
Text
Autonumber
Number
Page98
HappyComputers02073757300
Access2007/2010EssentialsRelationalDatabaseDesign
HappyComputers02073757300
Page99
Access2007/2010EssentialsRelationalDatabaseDesign
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!):
The
Foreign
key
The Primary
key (it is
always shown
with the
symbol)
Page100
HappyComputers02073757300
Access2007/2010EssentialsRelationalDatabaseDesign
to
MANY
HappyComputers02073757300
Page101
Access2007/2010EssentialsRelationalDatabaseDesign
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!
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
5. Add a new field that will be the Primary key in this table e.g.CourseID
(make it an Autonumber)
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
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
WhatdatatypedoIneedformyforeignkey?
Text
Text
Autonumber
Number
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
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
Forexample
Primary key
Foreign key
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
Page108
HappyComputers02073757300
Access2007/2010EssentialsRelationalDatabaseDesign
8. Click on
9. Add Is Null to the criteria of the Primary Key field
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
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
3. Click on
HappyComputers02073757300
Page111
Access2007/2010EssentialsRelationalDatabaseDesign
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!
Page112
HappyComputers02073757300
Access2007/2010EssentialsRelationalDatabaseDesign
6. Click on
7. Type in a name that clearly describes the report
8. Click on
HappyComputers02073757300
Page113
Access2007/2010EssentialsThehierarchyofanAccessDatabase
TABLE
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:
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
5. Click on
6. Choose a Layout for your Form
Page116
HappyComputers02073757300
Access2007/2010EssentialsForms
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
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
Page120
on the form
HappyComputers02073757300
Access2007/2010EssentialsForms
Click on the down arrow beneath the View button to select other views
HappyComputers02073757300
Page121
Access2007/2010EssentialsForms
This is
the
Header,
whatever
is in here
will
appear
on every
page of
the form
Selecting a control
Click anywhere on the Control
Page122
HappyComputers02073757300
Access2007/2010EssentialsForms
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
Page124
HappyComputers02073757300
Access2007/2010EssentialsForms
HappyComputers02073757300
Page125
Access2007/2010EssentialsForms
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.
Page126
HappyComputers02073757300
Access2007/2010EssentialsForms
HappyComputers02073757300
Page127
Access2007/2010EssentialsForms
Or:
Addinganewpieceoftext
1. Make room on your form for your text
Page128
HappyComputers02073757300
Access2007/2010EssentialsForms
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.
3. Click and Drag the field you want to the correct place on the form
HappyComputers02073757300
Page129
Access2007/2010EssentialsForms
Font Size
Fill/Back
Colour
Font
Bold, Italic or
Underline
Left Align,
Centre
Alignment or
Right Align
Special
Effects
Line/Border
Colour
Page130
HappyComputers02073757300
Access2007/2010EssentialsForms
HappyComputers02073757300
Page131
Access2007/2010EssentialsForms
5. Click on OK
6. Click on the Save button
Page132
HappyComputers02073757300
Access2007/2010EssentialsForms
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
HappyComputers02073757300
Page133
Access2007/2010EssentialsForms
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
Hovering your cursor over the field displays the Smart Tag:
HappyComputers02073757300
Page135
Access2007/2010EssentialsMainandsubtablesandforms
Page136
Click here
to Close
HappyComputers02073757300
Access2007/2010EssentialsMainandsubtablesandforms
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
HappyComputers02073757300
Page137
Access2007/2010EssentialsMainandsubtablesandforms
4. Make some space in the lower half of your form
(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
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:
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
Click here
to Close
HappyComputers02073757300
Page141
Access2007/2010EssentialsMainandsubtablesandforms
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
Page142
HappyComputers02073757300
Access2007/2010EssentialsMainandsubtablesandforms
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
Or
Click on Form Wizard (2010)
4. Double-click on the Available Fields, to Select the fields you want for
the Main form
Page144
HappyComputers02073757300
Access2007/2010EssentialsMainandsubtablesandforms
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
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
Click here
to Close
2.
3.
4.
5.
6.
(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
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
Page150
HappyComputers02073757300
Access2007/2010EssentialsMainandsubtablesandforms
1. In Design view of the Main form, Click on the Label of the Sub form to
select it
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
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)
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
2. Click Ok
HappyComputers02073757300
Page153
Access2007/2010EssentialsReports
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
Page154
HappyComputers02073757300
Access2007/2010EssentialsReports
Report in
layout view
Grouping,
Sorting and
Totals can be
created here
(this may not
be turned on
yet)
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
3. Hover over the themes to get a preview of how they will look
Page156
HappyComputers02073757300
Access2007/2010EssentialsReports
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
Moving fields
Click and drag your fields to their new positions
HappyComputers02073757300
Page157
Access2007/2010EssentialsReports
Resizing fields
1. Select the field
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
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
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
Removing sorting
To remove grouping click here
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
4. Click on OK
HappyComputers02073757300
Page161
Access2007/2010EssentialsReports
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
Page164
HappyComputers02073757300
Access2007/2010EssentialsReports
HappyComputers02073757300
Page165
Access2007/2010EssentialsReports
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!
Page166
HappyComputers02073757300
Access2007/2010EssentialsReports
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
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)
Page168
HappyComputers02073757300
Access2007/2010EssentialsReports
Blanks will
always appear
first!
In our
example, we
have three
people without
a department!
HappyComputers02073757300
Page169
Access2007/2010EssentialsReports
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
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)
HappyComputers02073757300
Page171
Access2007/2010EssentialsReports
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!
ImprovingtheSumlabel
1. (Open your report in Design view)
2. Click on the Label to Select it
Page172
HappyComputers02073757300
Access2007/2010EssentialsReports
5. Press Enter
6. Click on the Save button
HappyComputers02073757300
Page173
Access2007/2010EssentialsReports
5. Click on
Page174
HappyComputers02073757300
Access2007/2010EssentialsReports
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
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
5.
6.
7.
8.
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
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
Data Document:
Names & Addresses
Name
-------------------
This comes
from Access
in the form of
query a or
table
------------------------------------------
Add
-------------------------------------------------------------------------------------
Town
----
PCod
------
------------------
-----------------
-------
-------
------------------------------------
-------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
HappyComputers02073757300
Page177
Access2007/2010EssentialsReports
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
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!
Page178
HappyComputers02073757300
Access2007/2010EssentialsReports
2. Click on the first field you want to insert. The merge field will be
inserted into your letter.
4. Click on
5. Click on
Typingtheletter:
Type the standard text of the letter, inserting extra fields as necessary:
HappyComputers02073757300
Page179
Access2007/2010EssentialsReports
2. Click on
3. Click on OK
Page180
HappyComputers02073757300
Access2007/2010EssentialsReports
4. Click on
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:
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!
6. (Add any criteria if required) and (Choose which fields you want to
Sort on if required)
HappyComputers02073757300
Page183
Access2007/2010EssentialsAdvancedQueries
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
Page184
HappyComputers02073757300
Access2007/2010EssentialsAdvancedQueries
For Example, type [Please enter the department you want] to have Access
prompt the user to type in the required department:
HappyComputers02073757300
Page185
Access2007/2010EssentialsAdvancedQueries
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
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:
Page188
HappyComputers02073757300
Access2007/2010EssentialsFlowchartDatabasedesign
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
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
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
HappyComputers02073757300
Access2007/2010EssentialsIndex
Primary Key ............................... 78
Queries ................................ 48, 59
Relationships ........................... 102
Sub Forms ............................... 142
Wildcards...................................... 55
Word ........................................... 166
Word-Mail Merge ........................ 177
Page193