1. Students’ Result System
2. Workers’ Payroll System
I will discuss students' result system in this part 4 of chapter 4 the MS Access tutorial and discuss workers' payroll system query in part 5 (last part of chapter 4).
TIPS:
Please try to type the expressions of functions used in these examples. Don’t copy the syntaxes as it will help to reduce syntax errors and also improve your rate of comprehension.I will also give you some practice exercises which you should do on your own in the last part of chapter 4 (part 5).
QUERYING THE STUDENTS’ RESULT SYSTEM (GRADE LIST) IN MS ACCESS 2013 & 2016
You can apply query to filter some record that match your criteria. For example, you might want to see the records of students who performed very well in a particular subject, etc.
In the illustration below, you will see the IIF and AVERAGE functions in action.
PRACTICAL QUESTION
Given that the marking scheme of Government Secondary School Owerri is as follows:• 0 – 39.9 = F
• 40 – 49.9 = E
• 50 – 59.9 = D
• 60 – 69.9 = C
• 70 – 79.9 = B
• 80 – 100 = A
• Above 100 = ERROR
If 50 Students participated in this examination in the following subjects:
• Maths
• English
• Biology
1. Using the above marking scheme, calculate the following:
a. Total score
b. Average score
c. Grades on respective subjects
d. Overall grades
2. Filter all the students that made grade “A“ in English and Maths.
3. Filter all the female students that made grade “A” in Biology.
SOLUTIONS TO THE STUDENTS’ RESULT SYSTEM QUESTION
First, you have to create a table which will contain students’ information like ID, First name, Sex, Scores for each subject, Total score, Average Score, Overall grade, etc. Ensure that you specified the right data type for each field column.While creating the table in design view, specify Number data type for columns that will contain numbers like the T SCORE, AVG SCORE columns, etc. Also specify Short Text data type for columns that will contain text like the FIRST NAME, SEX columns, etc. The data type for the ID column would be Auto Number as shown in the figure below.
NOTE:
HOW TO FORMAT A CALCULATED FIELD
You can change the default properties of a calculated field to your own taste. You can add a description, set the data format, specify the number of decimal places, set input mask, add caption, set lookup for a calculated field.You will notice from the image above that the query result in the AVG SCORE column is not fixed. You can correct this and set it to any number of decimal places of your choice.
To set the number of decimal place of that calculated column or field:
1. Go back to query design view,2. Right click on that calculated field and select Properties.
3. This prompts the Property Sheet dialogue at the extreme right of the screen.
4. Note that you can also call up the Property Sheet by Clicking the Design tab and then clicking Property Sheet in the Show/Hide group as shown below.
5. The Property Sheet has two tabs: General and Lookup tabs. Click the Format property under the General tab and change the format value to Fixed.
6. Also click in the Decimal Places property and enter 2 or any number decimal places you want for that calculated field as shown below.
7. Save your work and go back to datasheet view, you will notice that all the values in that calculated field now has the number of decimal places you set in the property sheet.
You can also try to format the calculated fields further on your own.
No comments:
Post a Comment
WHAT'S ON YOUR MIND?
WE LOVE TO HEAR FROM YOU!