Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / February 2007

Tip: Looking for answers? Try searching our database.

how do I buid an automatic student grading exam in Access

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pacoda_z - 25 Feb 2007 14:57 GMT
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!!!
Dhonan - 25 Feb 2007 15:47 GMT
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.

> 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!!!
pacoda_z - 26 Feb 2007 07:45 GMT
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?

> 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
[quoted text clipped - 10 lines]
> > and (0 - 39 grade D)]
> > Thank you for somebody like to help me!!!
John W. Vinson - 26 Feb 2007 17:37 GMT
>Thank You Dhonan, I just received you suggestion, I'll try it.
>(another way is to create a module that update grade_field whenever
[quoted text clipped - 16 lines]
>> > 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]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.