Microsoft Access Training Manual
Microsoft Access Training Manual
TABLES.................................................................................................................................................. 2
SORT RECORDS IN A TABLE .................................................................................................................... 3
TO SORT ON MORE THAN ONE COLUMN ................................................................................................... 3
FIND RECORDS IN A TABLE ..................................................................................................................... 3
MATCH ................................................................................................................................................. 3
TO FILTER RECORDS FOR VIEWING .......................................................................................................... 4
CREATING A TABLE ............................................................................................................................... 4
CREATE A TABLE IN DESIGN VIEW .......................................................................................................... 4
FIELD NAMES ...................................................................................................................................... 4
SETTING A PRIMARY KEY ....................................................................................................................... 5
TO ENTER RECORDS IN A TABLE.............................................................................................................. 5
TO ADD RECORDS TO A TABLE ................................................................................................................ 6
TO DELETE RECORDS FROM A TABLE ...................................................................................................... 6
QUERIES ............................................................................................................................................... 6
CREATING A QUERY USING DESIGN VIEW ................................................................................................ 6
TOTAL QUERIES ................................................................................................................................. 6
CREATING A TOTAL QUERY .................................................................................................................... 6
TO CREATE A NEW BLANK DATABASE......................................................................................... 7
FORMS ................................................................................................................................................... 7
CONTROLS ............................................................................................................................................ 8
Labels ............................................................................................................................................... 8
Text boxes ......................................................................................................................................... 8
CREATE A FORM USING AUTO FORM ....................................................................................................... 8
ADD NEW RECORDS TO A TABLE BY USING A FORM .................................................................................. 8
EDITING THE FORM DESIGN .................................................................................................................... 8
CREATE A FORM USING THE WIZARD ....................................................................................................... 9
REPORTS............................................................................................................................................... 9
CREATE A REPORT USING REPORT WIZARD .............................................................................................. 9
PREVIEWING AND PRINTING A REPORT .................................................................................................. 10
To preview two pages ...................................................................................................................... 10
To preview more than two pages ..................................................................................................... 10
TO PRINT THE REPORT .......................................................................................................................... 10
REPORT DESIGN VIEW .......................................................................................................................... 10
Report header ................................................................................................................................. 11
Page header.................................................................................................................................... 11
Detail ............................................................................................................................................. 11
Page footer ..................................................................................................................................... 11
Report footer................................................................................................................................... 11
Microsoft access
INTRODUCTION
Microsoft Access is a database tool that is used to store, maintain and use a collection of
information that is organized to serve a specific purpose e.g.
Employee personal information
Customer addresses and details
Flight information for airlines
Patient information in hospitals
Students in a school
Records of books in the library
A database is a collection of related information
The benefits of using a database to store such information include:
Fast retrieval of information because data is easy to find
Easy to maintain accurate and up to date data
Easy to analyze and make summary reports from the stored information
In access information is stored in a database. The components of an access database are:
Tables
Queries
Forms
Reports
Macros and modules.
These components are referred to as database objects (These objects are referred to in
detail on subsequent pages)
STARTING ACCESS
Click on start, point at programs and select Microsoft access
The window below will be displayed
Select the first two if you want to create a new database or the third if you want to
view a database you had saved.
To open an existing table
Select open an existing file
Click ok.
On the subsequent window, open the folder that contains your database
All the databases will have an icon similar to the one shown below
Open the database that contains the table you want to open
Fields
records
In the find what box type in the text for the record that you want to find
Click the find next button
If this is not the record you wanted click the find next button until you get the
required record.
Other options in the dialog box
Match
Any part of field
Searches for any occurrence of the text string e.g. searching for wood finds Woodley and
Kenwood
Whole field
Recognizes a match only when the text string matches the complete contents of the field
e.g. searching for station finds station not stationers
Start of field
Searches for the text string at the beginning of field e.g. searching for berg finds Bergen
not Heidelberg
Select filter from records menu, then select advanced filter /sort
Select the fields you want displayed
Type in the criteria. The criterion type is referred to as an expression
Click the apply filter button.
Creating a table
On the database window click on the tables object
Access provides three ways to create a table:
In design view-will allow you to create the fields of the table
Using the wizard-gives a step-by-step direction by asking you questions. Creates for
you the table using the answers you give
By entering data-gives you a blank datasheet with unlabelled columns. Enter the data
into the cells and click on the save button. The fields are given generic names like
field1, field 2 etc. To rename the fields:
Select the column
Click on the format menu and select rename column
Field names
These are the column headings for the fields in the table that you are creating.
Data types
The type of value that will be entered in the fields
Description
This column is optional but can be used to give a detailed description of the field
name.
Type in the field names
In the data type column select the type of data you want the field to contain by
choosing from the drop down list containing data types
The lower portion of the window shows the properties of the field. The properties
are used to decide how the data in that field should be displayed or stored. Select
the desired property
After creating all the fields you can save the table by clicking on the save button.
Type in a name
Steps
Change to table design view by clicking on table design from the toolbars
Right click inside the field that you want to define as the primary key
Select primary key
Save the changes.
Nb: Always use design view when you want to edit your table
QUERIES
Queries select records from a table so that they can be viewed. The resulting collection of
records is saved and can be easily used in the future.
TOTAL QUERIES
When you want a query that summarizes the information in a table without necessarily
giving details on each record you use a total query e.g. when you want to find out the
total number of books in each subject inside the library.
TYPES OF TOTALS
Type of calculation Used to calculate
Sum The total values in a field
Avg The average of values in a field
Min The lowest value in a field
Max The highest value in a field
Count The number of values in a field
StDev The standard deviation of values in a field
Var The variance of values in a field
First The field value from the first record in a
field
Last The field value from the last record in a
table or query
Run the query to view the results
In the query, access displays headings that reflect the type of calculation that has
been performed e.g. countofsubject, Maxofsalary
FORMS
A form makes viewing of records and entering of data into a table easy.
Below is a sample form
Navigation
buttons
Computers For Schools Kenya Simplified Handouts page 7 of 12
Microsoft access
Controls
Everything that is added to a form or created on a form is described as control. Examples
of controls are text boxes, labels.
Labels
Labels are descriptive items on forms, such as the form title and the text next to a text
box. They describe the information to be entered in a textbox
Text boxes
A text box is the area in which the information from the table appears or where
information is to be entered
REPORTS
Option description
Design view Used to create a report without using a
wizard
Report wizard Automatically creates a report based on the
fields selected
Auto report :columnar Creates a single column report i.e. the
records are arranged in a single column
Auto report: tabular Creates a tabular report i.e. Each record is
displayed from left to right across a report
Chart wizard Creates a report with a chart
Choose the table that contains the data you want to base your report on and then
click ok
Select the fields that will be used in the creation of the report from the available
list of fields
Click on the next button
Select the fields for grouping if required. Grouping datawithin a report means
arranging the data by a certain field so that all the records related to that field are
displayed in one group
Click on he next button
Select the field to sort by and specify the sort order
Click on next
Choose a layout for your report and click on next
Select a style and click on next
Type in a title and then click on finish.
After a few seconds the report is generated in print preview
Or
From view menu select pages and choose the number of pages you want to display
Report header
This section has the main header or title for the report. It is printed once at the beginning
of the report.
Page header
This section contains information to be printed at the top of each page of the report. This
may be information like date or column titles.
Detail
This section contains information that is that is printed for each record in the table. It
contains the actual records.
Page footer
This section contains information that is to be printed at the bottom of each page e.g.
page totals, page numbers etc
Report footer
Just like the report header, this section contains information that is printed once at the end
of the report like grand totals etc
Note: You can format any section of the report by right clicking and selecting properties