Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Microsoft Access Exercise

1. Create a new database by the name Employees Information.


2. Create a table using design view and set fields, Data type and field properties as shown below.

Field Name Data Type Field Size Input Mask Caption


DeptCode Text 6 WV-000 Department Code
DeptName Text 25 - Department Name
3. Make the field DeptCode a primary key field of the table.
4. Save the table by a name Department.
Field Name Data Type Field Input Mask Caption Validation Format
Size Rule
DeptCode Text 6 WV-000 Department Code - -
RefID Text 4 SP000 Employee ID - -
Fname Text 10 >?<????????? First Name - -
Lname Text 10 >?<????????? Last Name - -
Sex Text 1 >? - M or F -
DOB Date/Time - - - Date of Birth Medium
Salary Currency - - - - -
Mstatus Text 10 >?<????????? Marital Status - -
5. Create a new table using design view and set the fields, data type and field properties as shown below.

6. Save the table by a name Staff.


7. Enter the following data for the Department table.

Department Code Department Name


WV-001 Administration
WV-002 Computer Service
WV-003 Public Relation

8. Enter the following data in Staff table

DepCode RefID First Name Last Name Sex Date of Birth Salary Marital Status
WV-001 SP001 Tesfaye Belay M 02/04/68 1200 Single
WV-001 SP002 Senait Abera F 04/11/70 2500 Married
WV-001 SP003 Dereje Mola M 06/03/74 1800 Divorce
WV-002 SP004 Abraham Gebeyehu M 11/11/67 1550 Married
WV-002 SP005 Frehiwot Adugna F 03/04/61 1770 Married
WV-002 SP006 Henock Lelisa M 04/06/75 1440 Single
WV-003 SP007 Sara Getachew F 01/01/75 1280 Single
WV-003 SP008 Emmanuel Gebru M 02/01/58 980 Married
WV-003 SP009 Lili Chala F 07/03/74 1480 Divorce
WV-001 SP010 Kedija Abdo F 04/02/78 600 Single
WV-002 SP011 Meti Olana F 06/01/70 800 Married
WV-003 SP012 Kiros Habtom M 05/08/60 1400 Married

9. Sort the Staf table by the DepCode field in ascending order.


QUERIES
10. Create relationship between the tables using the appropriate fields.
11. Create a select query, that selects all female employees and save it as FemaleStaff.
12. Create a select query that selects all staff members who were before 01/01/70 and save it as Jan70.
13. Create a select query that selects all employees who are married and save it as MarriedStaff.
14. Create a select query that selects all employees whose Salary is between 1200 and 2000 and save the query as
Between1200&2000.
15. Create a select query that contains all fields of the two tables and save the query as Payroll.
16. Create the following calculated fields based on the assumptions given for the query Payroll.
 Allowance: 350 for each employee
 Pension: 4% *[Salary]
 Tax: 10% *[Salary]
 Net Pay: [Salaary]+[Allowance]-[Pension]-[Tax]
 Age: Year(Now())-Year([DOB])

FORMS AND REPORTS


17. Create a tabular AutoForm for Staff table and save it as AutoFormStaff.
18. Creat a columnar form using Form wizard for Departments table.
19. Create a report using AutoReport columnar for the table Deprtments.
20. Create a tabular report using Report Wizard for the query Payroll.

You might also like