Gaadlight computer Training Institute
MICROSOFT ACCESS
1
Gaadlight computer Training Institute
Microsoft Access is a database package. It provides tool for management of a collection of
interrelated facts (data). Data can be stored, updated, manipulated, retrieved and reported in a
variety of ways.
Starting Microsoft Access
Click on Start on the Task Bar
Move to Programs or All Programs(for version 2007, click on Microsoft Office) then
Click on Microsoft Access ( click on Blank Database, type the database name, then click on
Create)
Creating a New database
Click on File Menu or Office Button
Click on New, then click on Blank Access Database
Type the database name, then click Create
Opening an Existing File
Click on File Menu or Office Button
Click on Open
Change to the storage location containing the file you want to open
Select the file to open
Click on Open
Closing a File in Access
Click on File Menu or Office Button
Click on Close (or click the X at the top right of your screen)
Working with Tables
Creating Table in Design View
Click on Tables in the Object section or click on Create Menu
Double click on Create Table in Design View or click on Table Design
Enter the Field Name in the Filed Name column and press Enter
Select the correct Data type for the Field (e.g. Text, Number, Memo etc)
Click on General Tab in the Field Properties section at the lower part of the design view
sheet.
Set the appropriate properties for each field (e.g. field size, index, format, etc)
Set the appropriate properties for each field (the text to entered must describe the contents of
the field)
Repeat the above steps to successfully enter all the fields.
Click on File in the menu
Click on Save
Type the name of the table in the space provided
Click Ok (NOTE: if it asked for primary Key, click yes to include a primary key)
Close the Table Design View
2
Gaadlight computer Training Institute
Working with Forms
Form is the data entry interface. It is the medium through which you enter data into the table you
have already created.
Creating Forms in Access
Click on Forms in the Object section or click on Create Menu
Double click on Create Form by using Wizard or click on more Form, then form wizard
Select the appropriate table in the Table/Query section
Move the required fields from the Available Fields to Selected Fields
Click on Next
Click on the desired form layout
Click on Next
Select any form style of your choice
Click Next
Type the name of the form
Click on Finish
Working with Queries in Access
Creating Queries in Design View
Click on Queries in the Object section or click on Create Menu
Double click on Create Queries in Design View or click on Queries Design
In the Show Table dialogue box, select either the Table or Query to be used and click on Add
Click Close to close the Show Table dialogue box
Add all the necessary field names in the Filed row
Click on sort row of any of the field you want to sort (either ascending or descending)
Click on the criteria row of any field you want to build a expression for and enter the
expression
Save the query
Close the query when you are done
NB:The query to be written depends on the data type that was defined for the field in the table design view.
Examples are the use of logical operators such as: <,>, <=, >=, < >, for field of the data type of Number or
Date/Time. The use of LIKE, “, *, etc for Text Data Type. The general use of AND, OR, NOT etc.
Examples:
To test for Character or Text
On the Criteria row type
Like “*Text”
Like “Text*”
For logical Comparism
On the criteria row type
>value, <value, >=value, <>value, etc
3
Gaadlight computer Training Institute
Calculated Field
Calculated field is added when there is need for mathematical calculation
Adding Calculated Field in Queries
Click on Queries in the Object section or click on Create Menu
Double click on Create Queries in Design View or click on Queries Design
Click Add to the selected Table or Query to the query design view
Click on Close to close Show Table
Add all the necessary fields in the Field row
Right Click on the next available column
Click on Build
Double click on Tables or query (depend on where the field you want to work on are)
Click on the table or the query name
Double click on the necessary field name in the second column and once on any operator
sign you want to use with it
Click Ok after building the expression
Rename the Expression to any name of your choice
Click on File in the menu
Click on save
Type the query name
Click Ok
Double click on the query name to view the result
Close the query when done
Working With Reports Creating Wizard
Click on report in the Object section or click on Create Menu
Double click on Create Reports By using Wizard or click on Report Wizard
Select the Table or Query you want to use for your report in the Table/Queries Section
Move all the field needed in the Available Field to the selected Field
Click Next
Click Next if no grouping level is needed
Select the first field to sort on either in ascending or descending order
Do the same for fields 2 to 4 if needed
Click next
Select the type of Layout you want
Select the type of Orientation you want (portrait or landscape)
Click next
Select the type of style you want
Click next
Type the title of your report
Click Finish (Your report is automatically displayed)
Close the report when done
4
Gaadlight computer Training Institute
Exercise 1
As the examination coordinator, you are to process and produce the result of all the students in
your class putting into consideration the following conditions in the table below:
Name Number Class Subject 1 Subject 2 Subject 3
Yahaya Isah B110 SS2 45 65 50
Uche Nkem B109 SS2 50 33 70
Paul Faith B108 SS2 50 40 50
Patrick Williams B107 SS2 55 60 38
Patrick Susan B106 SS2 55 63 50
Oladele Janet B105 SS2 60 50 55
Oladele Aina B104 SS2 58 44 56
Oladele Adebola B103 SS2 43 58 55
Collins Janet B102 SS2 61 70 60
Akinolu Bola B101 SS2 52 63 80
1. Create a database called Examination for the above table. In the database, create a table
called examtable to be used in storing the examination records of all the students.
2. Create a form called examform to be used in entering data into the table
3. Create query called Name Patrick to filter out all the names that has Patrick as their first
name.
4. Add a calculated field called Total to display the total score for each student. Save the query
as Total
5. Using the Total Query filter out all the records that has Oladele as their first name and
scored not less than 50 in subject 2. Save the query as Oladele>=50
6. Generate the detailed report of all the students in the class. Name the report as STUDENT
EXAMINATION RESULT
Exercise 2
As a Data Processing Officer in the National Population Commission, you are to produce all the
information state below using the data in the table.
Name Sex Age Home Town LGA State Nationality
Kola Folake F 18 Isanlu Yagba East Kogi Nigerian
Paul Bola F 20 Egbe Yagba West Kogi Nigerian
Kunle Ajala M 19 Mopa Mopa/ Kogi Nigerian
Amuro
Ademola John M 26 Mopa Mopa/ Kogi Nigerian
Amuro
Oluwole Peter M 25 Isanlu Yagba East Kogi Nigerian
Kike Ajala F 18 Egbe Yagba West Kogi Nigerian
James Ajala M 20 Mopa Mopa/ Kogi Nigerian
5
Gaadlight computer Training Institute
Amuro
1. Create a database called POPULATION and design in it a table called
POPULATIONTABLE to be used in storing the above data.
2. Design a form called DATA ENTRY FORM to enter all the above records into the designed
table in 1.
3. Create query called AGELGA that will filter out all the people that their age is between 18
and 20 and at the same time came from Yagba West Local Government Area.
4. Create a query called NAME(AJALA) to filter out all the names that has Ajala as their
second name.
5. Create a query called ABOVE20 to show all the people that their ages are above 20.
6. Design a report called KOGI STATE NPC to display all the data in the table.
7. Design another report called KOGI STATE NPC(AB20) to display all the people that their
ages are above 20.
Exercise 3
Create a database named FELLOW to contain a table called FELLOWDATA. Enter the
following records into the table.
Name Traveling Traveling Cost Departure Destination Airline
Date Class Time Name
Akin Olujimi 7 July 2004 Economy 9,000.00 7.00am Abuja Chachangi
Uche Chidi 7 July 2004 Business 12,500.00 7.00am Kaduna Chachangi
Isah 7 July 2004 Business 12,500.00 7.00am Abuja Sosoliso
Mohammed
Daniels 7 July 2004 Economy 9,000.00 7.00am Abuja Chachangi
Martins
Frank Janet 7 July 2004 Business 12,500.00 7.00am Abuja Sosoliso
Godfrey Odu 7 July 2004 Business 12,500.00 7.00am Abuja Sosoliso
Johnson 7 July 2004 Economy 9,000.00 7.00am Abuja Chachangi
Love
Peters 7 July 2004 Economy 9,000.00 7.00am Abuja Sosoliso
Okpara
Daniels Bola 7 July 2004 Economy 9,000.00 7.00am Kaduna Sosoliso
Daniels John 7 July 2004 Economy 9,000.00 7.00am Kaduna Chachangi
1. Create a query named CLASS and DESTINATION to filter out all the travelers that
traveled in Economy class and Destination is Kaduna.
2. Create another query called ABUJA to filter out all the travelers going to Abuja.
3. Create a query called DANIELS to filter out all the records that have Daniels as their first
name and travelled in Economy class with Chachangi airline.
6
Gaadlight computer Training Institute
4. Generate a report to show all the people that traveled from the airport on 7 th July, 2004.
Name your report as LIST OF TRAVELLERS FROM NMA ON 7TH JULY, 2004