how do I buid an automatic student grading exam in Access

G

Guest

How do I create one field(grade_field) that automatic load grade (A,B,C or D)
which "grade_Field" are lookup value from other field such as ("mark_field").
example: [(marks 80 - 100 grade A), (60 - 79 grade B), (40 - 59 grade C),
and (0 - 39 grade D)]
Thank you for somebody like to help me!!!
 
G

Guest

There are 2 ways that I can think of. the way I would proably do is make it
a calculated field in a query. Example

iif(mark_field >= 80, "A", iff(mark_field >= 60, "B", iif(mark_field >= 40,
"C", "D"))) as grade_field

another way is to create a module that update grade_field whenever
mark_field is update.
 
G

Guest

Thank You Dhonan, I just received you suggestion, I'll try it.
(another way is to create a module that update grade_field whenever
mark_field is update)

If you don't mind, How to create module?



Dhonan said:
There are 2 ways that I can think of. the way I would proably do is make it
a calculated field in a query. Example

iif(mark_field >= 80, "A", iff(mark_field >= 60, "B", iif(mark_field >= 40,
"C", "D"))) as grade_field

another way is to create a module that update grade_field whenever
mark_field is update.


pacoda_z said:
How do I create one field(grade_field) that automatic load grade (A,B,C or D)
which "grade_Field" are lookup value from other field such as ("mark_field").
example: [(marks 80 - 100 grade A), (60 - 79 grade B), (40 - 59 grade C),
and (0 - 39 grade D)]
Thank you for somebody like to help me!!!
 
J

John W. Vinson

Thank You Dhonan, I just received you suggestion, I'll try it.
(another way is to create a module that update grade_field whenever
mark_field is update)

If you don't mind, How to create module?



Dhonan said:
There are 2 ways that I can think of. the way I would proably do is make it
a calculated field in a query. Example

iif(mark_field >= 80, "A", iff(mark_field >= 60, "B", iif(mark_field >= 40,
"C", "D"))) as grade_field

another way is to create a module that update grade_field whenever
mark_field is update.


pacoda_z said:
How do I create one field(grade_field) that automatic load grade (A,B,C or D)
which "grade_Field" are lookup value from other field such as ("mark_field").
example: [(marks 80 - 100 grade A), (60 - 79 grade B), (40 - 59 grade C),
and (0 - 39 grade D)]
Thank you for somebody like to help me!!!

Actually, I would recommend that you take a third option. A module
will certainly work, but it is inflexible and hard to maintain.

What you can do instead is create a small three-field Grades table:

Grades
MarkLow Integer
MarkHigh Integer
Grade Text

with records like

80; 100; "A"
60; 79; "B"

and so on. Join this to your Marks table using a "non equi join" -
first just join the mark_field to MarkLow, then go into SQL view in
the query and edit

INNER JOIN Grades ON yourtable.mark_field = Grades.MarkLow

to

INNER JOIN Grades ON yourtable.mark_field >= Grades.MarkLow AND
yourtable.mark_field <= Grades.MarkHigh

You can then include the Grade field in your form or report.

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top