Access
Introduction
Name
Address
Courses never 12+ Months
Cancelled Schedule
24 Months UK Wide
Online Support Delivery
MicrosoftTraining.net
Accredited Learning Provider Certified Silver Partner
Rev 2-1Rev
2-1
Welcome to Your Access Introduction Training Course
Gain a good knowledge of the basics of Access
Be able to create a database from scratch
Understand and use tables, records and fields
Enter data and apply rules for data entry
Be able to create and use queries
Create simple forms and reports
Import from and export data to Excel and Access
Contents
Welcome to Your Access Introduction .............................................................. ii
Training Course .................................................................................................... ii
Unit 1: Database concepts and terminology ..................................................... 1
Database terminology and concepts ........................................................................................................................1
Exploring the Access environment .............................................................................................................................3
Planning and designing databases ............................................................................................................................4
Getting help.........................................................................................................................................................................7
Closing a database and Access....................................................................................................................................7
Unit 2: Access Basics ............................................................................................ 8
Exploring Tables ................................................................................................................................................................8
Exploring Forms .................................................................................................................................................................9
Examining Queries ......................................................................................................................................................... 10
Exploring Reports ........................................................................................................................................................... 11
Unit 3: Creating a Database .............................................................................. 13
Create a new Database ................................................................................................................................................ 13
Creating a Table .............................................................................................................................................................. 14
Entering Field Names and Data Types ................................................................................................................... 15
Add a Primary Key ......................................................................................................................................................... 17
Enter Records into a Table ......................................................................................................................................... 18
Unit 4: Working with Fields and Records ........................................................ 20
Modify a table design................................................................................................................................................... 20
Find values in a table .................................................................................................................................................... 22
Filter Records ................................................................................................................................................................... 24
Sort Records ..................................................................................................................................................................... 29
Unit 5: Querying Tables ..................................................................................... 31
Create, run, sort and save queries ........................................................................................................................... 31
Modify query results ..................................................................................................................................................... 34
Use Comparison Operators AND, OR, NOT, BETWEEN .................................................................................. 35
Find record with empty fields ................................................................................................................................... 35
Create queries from more than one table............................................................................................................ 36
Creating a Summary query......................................................................................................................................... 38
Unit 6: Creating and using Forms ..................................................................... 40
Create a form automatically ...................................................................................................................................... 40
Create a form with the Form Wizard ...................................................................................................................... 41
Modify a Form in Design View .................................................................................................................................. 43
Find, sort and filter records when using a Form ................................................................................................ 45
Unit 7: Creating and using Reports .................................................................. 46
Create reports with the Report Wizard from tables or queries ................................................................... 46
Group records in a report and summarize data ................................................................................................ 47
www.MicrosoftTraining.net 0207 987 3777 i
Modify and print reports ............................................................................................................................................. 48
Unit 8: Importing, Exporting and Linking Objects.......................................... 49
Importing from Excel .................................................................................................................................................... 49
Importing Objects from Access ................................................................................................................................ 51
Exporting Objects to Access....................................................................................................................................... 53
Linking Access Tables ................................................................................................................................................... 54
Linked Table Manger .................................................................................................................................................... 57
Quick reference: Access shortcuts .................................................................... 59
ii 0207 987 3777 www.MicrosoftTraining.net
Unit 1: Database concepts and terminology
In this unit you will learn how to:
Use database concepts and terminology
Explore the Access environment
Plan and design a database
Database terminology and concepts
Concepts
What is a database and why do we need to use it?
When to use Access versus Excel?
There are a number of considerations when choosing between storing your data in
Access versus Excel.
Size of data
Excel now allows for over a million rows of data. Access is not limited by the number
of records but is by the overall file size which cannot exceed 2Gbytes.
Linking Tables
With Access you can create a database with several linked tables called a ‘relational
database’.
Excel requires functions that lookup the data values or using add ins to build
relationships.
www.MicrosoftTraining.net 0207 987 3777 1
Queries
Access allow tables to be interrogated or queried and the results saved for later
use. With Excel you can filter list but not so easily create queries.
Forms
Access allows forms to be created for data entry and display. Forms can be created
with Excel but to do so requires macro programming.
Reports
With Access you can create many reports from one table, query or from multiple
linked tables. Excel would require linking multiple worksheets.
Terminology
When first using Access you will come across several new object names such as
tables, queries, forms, and reports. There is also terminology specifically used when
working with databases such as field, records and datasheets. Here is a summary
of some terms used:
Field
A field is a single piece of data such as name, date of birth or telephone
number.
Record
A record is a complete set of fields, for example a client name, company and
email address.
Table
A table is comprised of one or more records. Each table also has a unique
name.
Form
A form is a window or screen that containing fields organized in a logical
manner for easy access and manipulation.
2 0207 987 3777 www.MicrosoftTraining.net
Report
A report is the formatted result of a database query and contains useful
data for decision-making and analysis
Query
A Query searches a subset of data stored in a table. Access queries can be
saved, reused and automatically updated.
Relationships
A relationship in Microsoft Access connects information between tables. It
helps prevent redundant information and ensures that information is
consistent.
Primary and foreign keys
The primary key uniquely identifies each record in a table. The table is
automatically sorted is ascending primary key order.
A foreign key is a field that matches the primary key column of a different
table.
Exploring the Access environment
Home ribbon
File tab
Create tab
www.MicrosoftTraining.net 0207 987 3777 3
Planning and designing databases
When designing a new database ensure that you know exactly what you want.
Interview all involved to make sure that you know what they expect from the
database. Plan ahead and anticipate changes that might be needed to help avoid
huge time consuming work on the database in the future.
It helps to start from a piece of paper. Make a list of all the fields you need. Draw
the tables and relate them on the drawing. With a drawing like this it is much easier
to see an overview of the project.
Designing Tables
When creating a database there are some design practices that help manage the
database and improve its performance.
Break fields down to their smallest parts
Use an Employee Code rather than the employee full name if there are related
tables.
Remove repeating fields
Rather than have fields such as
Employee_Code Project_No_1 Project_No_2 Project_No_3 etc
Have one field making the data easy to filter and query.
Employee_Code Project_Number
E01 SL-99-01
E01 SL-99-02
4 0207 987 3777 www.MicrosoftTraining.net
E01 SL-99-03
E02 SL-99-01
E02 SL-99-01
Normalization
This process is called normalization. The following table has been normalized.
Fields such as the Customer and StoreName contain lookups to a Customer table
and a Stores table containing unique entries.
Database Relationships
Here is an example of relationships between tables within a relational database.
After transforming tables into smaller tables the Relationships can be identified and
created between each table. For example Product ID in the Line Items table with
Product ID in the Items table.
www.MicrosoftTraining.net 0207 987 3777 5
To create relationships select:
Database Tools, Relationships
Add the tables you wish to relate and drag your mouse from the field in one table
to a ‘foreign’ field of another table.
6 0207 987 3777 www.MicrosoftTraining.net
Getting help
Pressing F1 when selecting a property or data type gives contextual help on that
particular property.
The Help Screen in Access is similar in design to a web browsing program. It
contains navigation buttons to browse through the different help pages, a search
bar that lets you browse for a specific keyword or phrases.
You can also type questions into Google, watch YouTube videos and visit the Best
STL Support Forum.
Online support forum and knowledge base
www.microsofttraining.net/forum
Visit our forum to have your questions answered by our Microsoft qualified trainers.
Closing a database and Access
When closing a table, database or Access itself the data you have just entered is
automatically saved. Unlike other Office applications you are not prompted to save
your work. It saves it anyway.
To close a table the x on the top right of the table datasheet.
To close a database select File, Close.
To close Access select the x and the very top right corner.
You are possibly very used to using the Undo button. While Undo (Ctrl+z shortcut)
is fully available when designing tables, queries, forms and reports it is not when
entering records.
As soon as you move to the next or previous record the changes made are saved
to the database and can’t be undone. For this reason it pays to take care when
viewing data have a system of regularly backing up the database you are using.
www.MicrosoftTraining.net 0207 987 3777 7
Unit 2: Access Basics
In this unit you will learn how to:
Explore tables, queries, forms and reports
Examine design view for tables, queries and reports.
Exploring Tables
To view a table double click the name from the navigation pane on the left of the
screen.
Use the navigation buttons at the bottom of the window or the cursor key to move
around the table. Click View, Design View to see the table design. The top window
shows the field names for each column in the table and the Data Types indicates
which type of data can be entered into that field. The bottom window displays
further properties for the selected field.
8 0207 987 3777 www.MicrosoftTraining.net
Exploring Forms
Forms have many uses in an Access database. They can be used to view or edit
fields for a single record on one screen. Forms can also be used as a start menu
giving database users a central screen from which to operate the database.
When you open a form you see the data in normal Form view.
To see the design of the form select Design View from the View button.
www.MicrosoftTraining.net 0207 987 3777 9
Note that in design view the field names are displayed within the fields rather than
the record data. In design view you can rearrange fields and format the look of the
form. Deleting a field does not delete it from the source table. However in form
view changes made to the data are also made in the table. The form is just a
different view of a table’s data.
Examining Queries
Queries are created to display a subset of the data from a table or from more than
one table.
When you view a query it displays in a datasheet very much like a table. However
they appear very different from a tables in design view.
10 0207 987 3777 www.MicrosoftTraining.net
In design view you will see a field list for the table or tables and a grid showing the
fields and query criteria. In this example the criteria is Unit_price >2 and
Min_Stock<800.
This type of query is called a Select Query.
Exploring Reports
Reports are used to print tables and queries in a presentable format.
They can be used to group records and perform calculations.
To view a report right click its name from the Navigation pane and choose Print
Preview.
www.MicrosoftTraining.net 0207 987 3777 11
Use the navigation buttons at the bottom of the window to view other pages.
Click the Close Print Preview button then select Design View for the report.
In Report Design view for a tabular report the fields are located within the Detail
band and as with Form Design they contain the field names. Field headings or
captions in the Page Header band will be printed on every page. Items in the Report
header (or footer) print only on the first or last page of the report.
When creating reports it is often easier to start with the Report Wizard where you
can choose a field to group the report by. In the above example a sales report is
grouped by the employee full name field and bases on a query.
12 0207 987 3777 www.MicrosoftTraining.net
Unit 3: Creating a Database
In this unit you will learn how to:
Create and save a new desktop database file
Create a Table from Table Design
Add a Primary Key
Enter records into a table
Create a new Database
To create a new database select:
File, New and select Blank desktop database
Enter a file name, click the yellow folder to choose a location for the database then
click Create.
www.MicrosoftTraining.net 0207 987 3777 13
Creating a Table
When you create a blank database Access offers you a blank table to use called
Table1. As you won’t beusing this table Right click the tab for Table1 and choose
Close.
To create a new table select the Create tab then Table Design.
14 0207 987 3777 www.MicrosoftTraining.net
Entering Field Names and Data Types
Each column of a table has a Field Name and Data Type. The field names are often
typed without spaces and must be unique within the table.
You may find it easier to type the field names in the first column then choose the
data type for each field.
The table below describes the data types available.
Description of Data types
Short Text (Default) Text or combinations of text and numbers, as well as
numbers that don't require calculations, such as phone numbers.
Long Text Lengthy text or combinations of text and numbers. Useful for notes
or comments.
Number Numeric data used in mathematical calculations.
Date/Time Date and time values for the years 100 through 9999.
Currency Currency values and numeric data used in mathematical calculations
involving data with one to four decimal places.
AutoNumber A unique sequential (incremented by 1) number or random number
assigned by Microsoft Access whenever a new record is added to a
table. AutoNumber fields can't be updated
www.MicrosoftTraining.net 0207 987 3777 15
Yes/No Yes and No values and fields that contain only one of two values
(Yes/No, True/False, or On/Off).
OLE Object An object (such as a Microsoft Excel spreadsheet, a Microsoft Word
document, graphics or sounds file) linked to or embedded in a
Microsoft Access table.
Hyperlink Text or combinations of text and numbers stored as text and used
as a hyperlink address. A hyperlink address can have up to three
parts:
text to display — the text that appears in a field or control.
address — the path to a file (UNC path) or page (URL).
subaddress — a location within the file or page.
screentip — the text displayed as a tool tip.
The easiest way to insert a hyperlink address in a field or control is
to click Hyperlink on the Insert menu.
Attachment Allows a document to be attached and stored with each record of
the table.
Calculated Allows designer to carry out calculations in a table. (Note using this
data type will make your database unusable in earlier versions of
Access).
Lookup Creates a field that allows you to choose a value from another table
Wizard or from a list of values by using a list box.
16 0207 987 3777 www.MicrosoftTraining.net
Add a Primary Key
After entering the field names and data types you should save the table design.
Access then displays a prompt recommending that you create a Primary Key.
If you click Yes then a Primary Key is created but what is a primary key?
A Primary Key is a field containing unique values sorted in ascending order. It is not
imperative to have a primary key, but it makes the design of the database much
easier and eliminates the possibility of duplicate data. It allows for links to be made
between tables.
The following table has as its primary Key called OrderID.
www.MicrosoftTraining.net 0207 987 3777 17
While some of the orders have been deleted the OrderID still contains unique
values in asscendin order.
Enter Records into a Table
Once a table has been created with field names and data types it is ready for you
to start entering data.
From Design View click Datasheet View.
In this table the first field called OrderID is set to an Autonumber data type so you
can’t and wouldn’t want to type into the first column.
18 0207 987 3777 www.MicrosoftTraining.net
Either press Enter or the Tab key to move on to the next column. Now the
remaining fields can be completed.
To enter dates you can type in day/month/year separated by the / key. You can
also click the small calendar icon and choose a date from there. Click the Today
button for the current date.
To tick a Yes/No field either click with the mouse or press the Spacebar key.
Ticked means Yes.
At the end of a row just press Enter to start entering a new record.
When finished simply close the table. There is no option or prompt to save the
data. Access automatically saves it for you.
Here is another table containing a primary key, a date field and an example of a
Yes/No field.
Exercise
Create the following table starting from Create, Table Design.
www.MicrosoftTraining.net 0207 987 3777 19
Unit 4: Working with Fields and Records
In this unit you will learn how to:
Modify a table design by changing field properties
Find values in a table
Filter records
Sort data
Modify a table design
Most people using a database will not want to modify the design of tables. This is
something that is done when the database is being created. Some formatting
properties can be changed without going to design view.
Table Tools
To change formatting properties when viewing a table:
Select one value in a field you wish to format.
Then click Table Tools, Fields
For example a date field can be changed from Medium Date to General Date.
A Currency field can formatted in a similar way to decrease decimal places
20 0207 987 3777 www.MicrosoftTraining.net
To remove a currency symbol select the comma style.
Changing to Table Design
To change to the Design View for a table select
View, Design View
While many of the filed properties can be changed from Table Tools there are some
which you can only change from Design View.
Upper case
For example to ensure a field always displays in upper case:
Select the Format property anfd type >
Adding zeros
To add leading zeros to a number field:
Select Format and type 000
This will display a DepartmentID 1 as 001
Mandetary fields
To ensure a value is entered into a field:
Select Required property and choose Yes
www.MicrosoftTraining.net 0207 987 3777 21
Any changes to the table design must be saved before they take effect.
Find values in a table
With Access you can easily search for values in a table or form simply by pressing
the Find button or pressing the shortcut Ctrl+f
22 0207 987 3777 www.MicrosoftTraining.net
For example type a Last Name and then click inside the Last Name field then click
Find Next.
This will highlight the first record that matched. Clicking Find Next again finds the
next match and so on.
If you want to find a word contained within a field choose the Match option:
Select Any Part of Field before clicking Find Next.
www.MicrosoftTraining.net 0207 987 3777 23
Filter Records
Filtering is like Find except all the records that match are displayed at once.There
are sevral ways to filter records in a table. The easiest way is to use the filter buton
to the right of each column heading.
When filtering text untick Select All then tick the value or values to filter by and
press OK.
Text, Number and Date Filters
Depending on whether you are filtering a text, number or date field type you can
be more selective with filtering. Choose between Text Fiters, Number Fiters or Date
Filters.
Text Filters Number Filters Date Filters
Equals Equals Equals
Does not equal Does Not Equal Does Not Equal
Begins with Less Than Less Than
Does Not Begin With Greater than Greater than
Contains Between Between
24 0207 987 3777 www.MicrosoftTraining.net
Does Not Contain Today
Ends with Tomorrow
Does Not End With Yesterday
Next Week
This Week
Last Week
Next Month
This Month
Last Month
Next Quarter
This Quarter
Last Quarter
Past
Future
Dates in Period
Between is used for greater or equal AND less than or equal
When using Between start with entering the lower number or earlier date then
enter the higher number or later date.
Dates in Period allows you to choose specific years, quarters or months and tick
multiple choices.
Once you have made you choice of filter press OK. Now the records that match
your filter are displayed in the table. A small filter funnel indicates which column
the filter was applied to. You can hover the mouse over the icon to display the filter
criteria.
Filtering on more than one column
If you continue to filter on other columns then the records that match both filter
criteria are displayed. The more columns you filter on usually the fewer recodss
display.
www.MicrosoftTraining.net 0207 987 3777 25
For example County London AND Title Mr.
Note that the Navigation bar at the bottom indicates there are 12 recods filtered.
Select the Toggle Filter button to remove or reapply the last filter.
An orange button maked ‘Filtered’ indicates the data is filtered and can be pressed
as with
Toggle filter to remove or reapply the filter.
26 0207 987 3777 www.MicrosoftTraining.net
Typing in the box marked Search allows you to further seach the filtered list. This
filter applies to text contained within the whole datasheet.
Clearing Filters
A filter can permenantly cleared by selecting for example ‘Clear filter for County’
from the dropdown filter button. To clear all filtrers at once select:
Home tab, Advanced, Clear All Filters
Filter by Selection
An alternative method of filtering is by selecting a value and choosing Filter by
Selection.
This is usefull when selecting parts of a post code or a date field.
For example post dcodes starting with SW dates endig with 90.
Filter by Form
For more complicated filters you can use Filter by Form. This allows you to combine
several filters together as separate questions by using the OR tabs at the bottom
of the window.
For example, you can find male employees from London OR
all employees from Hampshire.
www.MicrosoftTraining.net 0207 987 3777 27
Click Toggle Filter to view the results of the filter
The next time you use Filter by Form it remembers the previous criteria.
To start a blank filter remember to use Advanced, Clear All Filters.
You can also use Advanced, Clear Grid to clear one OR tab at a time.
Filtering in Forms
When viewing data in a form there are no filter buttons on each field but you can
press the filter button from the ribbon.
Alternativey you can right click within a field and choose either Text Fiters or
Number Filters.
28 0207 987 3777 www.MicrosoftTraining.net
Saving a Filter
Filters that you may use regularly can be saved for future use. When you do this
the filter is saved as a query.
To save a filter choose from Home tab, Sort & Filter group
Advanced, SaveAs Query
Also if you are designing a Filter by Form clicking the Save button in the Quick
Access Toolbar saves the filter as a query.
Sort Records
Access alllows you to sort records very easily. It is also safe as it is not possible to
sort only one column without the related recods moving correctly. You can also
sort by multiple levels and there is an option to remove a sort.
To sort by one column only in Datasheet view simply click inside a column and then
click the Sort button from the Home tab.
Ascending order is alphabetical for text, lowest to highest for numbers and earliest
to latest for dates.
Descending order is reverse alphabetical for text, highest to lowest for numbers
and latest to earliers for dates.
To sort by a different column click in that column and click the sort button.
Clearing a Sort
Unlike Excel, Access does allow you to remove a sort.
Select Home, Remove Sort
www.MicrosoftTraining.net 0207 987 3777 29
Sorting by Multiple Columns
There is a quick way to sort more multiple columns
Suppose you wish to sort employee records by County and then by Post Code.
In this case County is the primary sort column and Post Code is the secondary sort
column.
To sort by multiple columns
Sort the secondary sort column (click AZ button)
Then sort the primary sort column
The data is now sorted by County and then by Post Code.
Note there is a up arrow icon indicating Ascending order.
Sorting from the Filter button
Rather than using the sort button from the Home ribbon you can also sort from
the filter selectors.
Both methods work in exactly the same way.
To clear a sort use the Home ribbon, Remove Sort as before.
30 0207 987 3777 www.MicrosoftTraining.net
Unit 5: Querying Tables
In this unit you will learn how to:
Create, run, sort and save queries
Modify query results
Use comparison operators AND, OR, NOT, BETWEEN
Find record with empty fields
Create queries from more than one table
Queries are similar to filters except you can select particular fields and the query
result displays in a separate view or record set. The data displayed is dynamically
linked back to the table so that changes are made to the record set update the
table automatically. For this reason a query result is sometimes referred to as a
Dynamset.
Queries can easily be sorted as with tables and modified through the query design
view.
In design view there is a field list and query grid where the criteria for the query is
entered.
Queries can refer to more than one table by linking the tables and even to
previously saved queries.
Create, run, sort and save queries
To create a query select the Create tab then Query Design.
Select the table to query and click Add.
www.MicrosoftTraining.net 0207 987 3777 31
Add fields
In the query design view you will see a field list for the added table and a query
grid. To add fields drag and drop them onto the query grid. Alternatively double
click a field from the field list adds it a field to the right without dragging.
Add Criteria
Click into row of the grid marked criteria
Type your criteria
In this example the criteria for the Count field is Hampshire.
Run the query
To run or view the result of the query select Design tab, Datasheet View from View
button.
32 0207 987 3777 www.MicrosoftTraining.net
Sort a query
When sorting a query first display the query design view.
Now in the grid row marked Sort choose either Ascending or Descending for the
column to sort by.
If you sort on more than one column the leftmost column takes priority and
becomes the primary sort column.
www.MicrosoftTraining.net 0207 987 3777 33
To sort by Last Name you could move the column to the first column of the grid.
Click near the top of the column and when you see a white arrow drag and drop to
the left.
Save a query
To save a query click the Save icon in the Quick Access toolbar and enter a name
for the query. For example, Hampshire Staff.
After closing the query you will see the saved query in the Query section of the
Navigation Pane.
If your queries are not displayed in the Navigation Pane select the option All Access
Objects.
Modify query results
To modify a saved query, from the Navigation Pane right click the query and select
Design View
34 0207 987 3777 www.MicrosoftTraining.net
You may wish for example not to show a column but not delete it.
To hide a column in a query untick the Show button.
Use Comparison Operators AND, OR, NOT, BETWEEN
When typing a criteria Access uses queries ‘by example’. You simply type what you
are looking for. But when you want to see a range of results you can use
Comparison Operators.
Comparison Operators Using conditions in queries
OR
> Greater than Enter for example “London” OR
< Less Than “Hampshire”
= Equal to Enter in 2 separate OR rows
<= Less than or equal to
>= Greater than or equal AND
to Enter for example
<> Not Equal to > 20000 AND < 30000
BETWEEN
For example BETWEEN #1/1/15# AND
#31/12/15#
NOT
For example NOT “Mr”
Alternatively <> “Mr”
Find record with empty fields
When filtering a table or form it is easy to find records containg empy fields.
www.MicrosoftTraining.net 0207 987 3777 35
Click the filter arrow and remove the tick from Select All
Then click on Blanks
However for a query (or when filtering a form) recods with an empty field can be
found by using the command Is Null
Similarly if you want to find all non empty cells type Is Not Null in the criteria line.
Create queries from more than one table
One of the main reasons for using Access is its ability to relate and link tables
together.
36 0207 987 3777 www.MicrosoftTraining.net
Once a relationship have been created a link line will appear between tables when
they are added to a query in design view.
Hint: To create or see relationships between tables select Database Tools,
Relationships
To add a second table to a query design click the Show Tables button and Add
the table.
For example this query shows employee names from one table and job title and
departments from another.
Once a table has been added you can select fields by dragging and dropping into
the query grid.
Click Datasheet view to run the query.
www.MicrosoftTraining.net 0207 987 3777 37
Removign a table from a query
To remove a table from a query in design view, right click on the table and choose
Remove Table.
Linking tables in query design
If a relationship has not previously been created between 2 tables you can still
create on while building the query. To create the link drag the field that is in
common between the two tabels. In the above example it is the Job Code field.
Creating a Summary query
Use the Total button when you wish to summarize or aggregate data. For example
displaying total employee salaries by the Department.
38 0207 987 3777 www.MicrosoftTraining.net
After adding the tables and dragging the Department to the grid click the Totals
button.
In the Total row for the Salary column change Group By to Sum.
When you run this query the total salaries for each department are displayed.
www.MicrosoftTraining.net 0207 987 3777 39
Unit 6: Creating and using Forms
In this unit you will learn how to:
Create a form automatically
Create a form with the Form Wizard
Modify a form in design view
Find, sort and filter records when using a Form
Within an Access database you may wish to view one record at a time. It may be
for easy data entry or it might be to view record data conveniently on the screen.
Forms also can be designed to show picture fields, graphical elements, buttons and
long text fields in an easy to read text box. Forms can also contain text lables and
multiple tabs to help with navigation and extra forms related to other tables.
Create a form automatically
A simple way to create a form instantly is to use the Form button.
Select a table in the Navigation pane
Click Create, Form
40 0207 987 3777 www.MicrosoftTraining.net
Then to change from ths view (Layout View) to Form View click Home, Form View.
Note that if relationships have been created between tables this way of creating a
form can include a ‘sub form.’ In this example an Orders sub form is created
showing orders made by that customer. Click the lower namvigation button to see
a different customer.
Create a form with the Form Wizard
Another way to create a form is with the Form Wizard.
First select the table to base the form on from the Navigation pane.
Select Create, Form Wizard.
www.MicrosoftTraining.net 0207 987 3777 41
Select fields either one by one or you can choose all fields by clicking the >>
button.
Click Next and then choose the type of form you wish to create.
There are 4 formats to choose from:
Columnar - shows one record at a time
Tabular – shows the data in a tablular form
Datasheet – shows the data just like a Datasheet
Justified - A cross between a columnar and tabular form
A Datasheet form
42 0207 987 3777 www.MicrosoftTraining.net
A Justified form
Modify a Form in Design View
Once a form has been creaed it can be saved as an object within the database.
Select the Save icon in the Quick Access toolbar or press the shortcut Ctrl+s.
To modify a form select it from the Navigation bar (Forms section) and choose
View, Design View
In Design View for a Columnar form you will see the fields as textboxes inside the
Detailed band. Each field has a label to identify each field and will be a title label in
the Form Header.
www.MicrosoftTraining.net 0207 987 3777 43
Exercise
Make changes to the above form:
Edit the form title.
Change the text size to 28.
Change the Header back colour to dark green.
Change the Detail section back colour to light green.
Change the title text colour to white.
Add an image called Team.jpg to the Header.
Add a command button to Close the form (name Close).
Move the address fields as a block to the right
Move the DepartmentID after DateofBirth field
Select Home, View, Form View to see your form
44 0207 987 3777 www.MicrosoftTraining.net
Save your form as frmEmployee2
Find, sort and filter records when using a Form
In Form View you can find, sort and filter data as easily as with tables.
For filtering and sorting right click in the field to sort or filter by.
To find data click in a field use the Find button.
Exercise
Open the form frmEmployee2 and use the Find button in the Address3 field Kent.
Use Text Filters to display only Paris in the Address3 field.
Filter the records for PostCodes starting with SE.
Remove the filter and sort in ascending order of Surname.
Finally remove the sort order.
www.MicrosoftTraining.net 0207 987 3777 45
Unit 7: Creating and using Reports
In this unit you will learn how to:
Create reports with the Report Wizard from tables or queries
Group records in a report and summarize data
Modify and print reports
In an Access databse you can create reports based on one or several tables. They
are used for printing or for creating PDF documents and they update if the data in
the tables is changed or added.
Create reports with the Report Wizard from tables or queries
The Report Wizard allows you to choose report data on a table or on a query.
For example after selecting the query qryOrdersbyEmployee in the Orderingdb
database click
Create, Report Wizard
Choose all the fields by clicking the >> button
46 0207 987 3777 www.MicrosoftTraining.net
Group records in a report and summarize data
On the next two screen you can see how to group and summarize a report using
the Report Wizard
Group the report by FullName
On the next screen select Summary Options and tick Sum for TotaCost.
Sort within each group by ProductName in ascending order.
Enter the name Employee Sales
Choose Portrait orientation
www.MicrosoftTraining.net 0207 987 3777 47
Modify and print reports
Exercise
Make the following modifications to this report:
Resize fields if necessary to fit one page wide.
Use the Page Setup tab to change the margins to Narrow.
Remove any fill colours for headers and detail band. Hint: Set the Alternate Back
color to None.
Change the font colour of the headings and totals to navy blue
Add a Line control above the title.
Format all totals to the Currency format property.
Hint: Use the Shift key to select more than one total at a time
Close the report then rename as rptSalesReport.
48 0207 987 3777 www.MicrosoftTraining.net
Unit 8: Importing, Exporting and Linking Objects
In this unit you will learn how to:
Import from Excel
Import Objects from Access
Export Objects to Access
Link Access Tables
Importing from Excel
Instead of creating tables from scratch you may want to import already existing
data in Excel into your Accees database.
To import all of the data from a worksheet ensure the first row of the data contains
unique column headings.
Then in your database select External Data.
In the Import & Link group of the ribbon choose Excel.
www.MicrosoftTraining.net 0207 987 3777 49
Click the Browse button and select the Excel workbook to import.
On the next screen choose the sheet that contains the data.
Note that if you want to import a selection of records rather than all the Excel data
create a Named Range first in Excel for the records rquired.
On the next screen ensure First Row contains Field Headings is selected.
On the next screen you have the option to format columns or even not include a
column in the imported table.
The next screen allows you to choose a Primary Key, let Access create one or choose
not to have one for the imported table.
50 0207 987 3777 www.MicrosoftTraining.net
Finally name the imported table (Artists)
You now have a new table withing the database.
Importing Objects from Access
When creating a database you can import objects (tables, forms, reports, queries)
from an already existing database.
As with importing from Excel start by clicking the External Data tab.
Now click Access from the Import & Link group.
www.MicrosoftTraining.net 0207 987 3777 51
Choose the first option then click Browse to select the Access database from which
you want to import objects.
Press OK then you can choose the tables to import.
If you want to import other objects click and select them from the other tabs before
pressing OK.
Use the Ctrl key for multiple selection.
Now click OK and all the objects selected will now be imported into the current
database.
52 0207 987 3777 www.MicrosoftTraining.net
Exporting Objects to Access
You may wish to export a table or another object to either an Access database or
to Excel.
To do this:
Select the table (or other object) from the Navigation pane.
Choose External Data, then choose Access from the Export group.
Click Browse then select the Access file to export into
Press Save.
On the next screen choose whether the export the whole table or just the table
definition.
Click OK and then the Close button.
Repeat the process to export other object.
To Export to Excel do the same but choose External Data, Excel from the Export
group.
www.MicrosoftTraining.net 0207 987 3777 53
Linking Access Tables
As well as importing and exporting objects, Access allows you to link to a table in
another database (or to a sheet of an Excel workbook). This can be advantageous
when many users wish to use the same data but to create their own reports, queries
and forms.
To link to a table of another daatabase select the External Data tab
Choose Acces from the Import & Link group
Select the second option – Link to data source by creatinf a linked table.
54 0207 987 3777 www.MicrosoftTraining.net
Click Browse to choose the database to link to, then OK.
Now choose the table or tables to link to and press OK.
Note that linked tables display a small blue arrow next to the table icon in the
Navigatiopn pane.
When you open a linked table the data displayed is coming from the other databse.
Any data added or deleted will be added or deleted in the table of the source
databse.
However you cannot make changes to the table design.
Changes tyo the table design must be made by opening the source table.
www.MicrosoftTraining.net 0207 987 3777 55
Linking to Excel
In a similar way you can link to a worksheet in an Excel workbook.
Choose External Data
Click Excel from the Import & Link group
Choose Link to data source by creatign a linked table.
Hint: Click Append data to an existing table if you want to copy andappend data
instead of linking it.
Blowse and select the Excel file and choose the worksheet to link to.
56 0207 987 3777 www.MicrosoftTraining.net
Unlike with linking to an Access table, when linking to Excel changes cannot be
made to data.
You must open the source Excel worksheet to make changes to data or to its
design.
Linked Table Manger
Changes to data will normally update automatically.
Use the Linked Table Manager if locations to tables have been changed and to view
all the linked tables at once.
Select External Data
Linked Table Manager.
Click OK to update a link location of a selected table.
www.MicrosoftTraining.net 0207 987 3777 57
Breaking a link
If you no longer need to link to a table then:
Right click the linked table in the Navigation pane
Select Delete
The dialog confirms that the link is being deleted and not the actual data in the
source table.
E&OE
STL Training reserves the right to revise this publication and make changes from
time to time in its content without notice.
58 0207 987 3777 www.MicrosoftTraining.net
Quick reference: Access shortcuts
Keystroke Command
Ctrl + Add new record
Ctrl-F2 Builder
spacebar Check/uncheck box or option button
Ctrl-W Close
Ctrl-C Copy
Ctrl-X Cut
Ctrl-Y Cut current line and copy to Clipboard
F6/Shift-F6 Cycle through sections
Ctrl-Tab/Shift-Ctrl-Tab Cycle through tab of each object's type (toggle)
F11 Database window
Ctrl - Delete current record
F2 Edit/Navigation mode (toggle)
Ctrl-Tab/Shift-Tab Exit subform and move to next/previous field in next
record
Shift-Down/Up Extend selection to next/previous record
F12 File/Save As
Ctrl-F Find
Shift-F4 Find Next
Shift-F3 Find Previous
Ctrl-G GoTo
Ctrl ; Insert current date
Ctrl : Insert current time
Ctrl-Alt-spacebar Insert default value
Ctrl-Enter Insert new line
Ctrl ' Insert value from same field in previous record
F10 Menu bar
Ctrl-Home/End Move to beginning/end of multiple-line field
Ctrl-Up/Down Move to current field in first/last record (Navigation
mode)
Ctrl-Home Move to first field in first record (Navigation mode)
Home/End Move to first/last field in current record (Navigation
mode)
Ctrl-End Move to last field in last record (Navigation mode)
Home or Ctrl-Left Move to left edge of page
F5 Move to page number/record number box
End or Ctrl-Right Move to right edge of page
Ctrl-F6 Next window
F4 Open combo box
Ctrl-Enter Open in Design view
www.MicrosoftTraining.net 0207 987 3777 59