how to calculate the gpa?? (1 Viewer)

pal

Registered User.
Local time
Yesterday, 17:34
Joined
Mar 12, 2010
Messages
14
"hi

first of all,thanx for your time



i build up a database for students in a college %26 i need to calculate the GPA for each one depend on this formula

GPA=[(points*no. of cridet hr. for course)+(points*no. of cridet hr. for course)+(points*no. of cridet hr. for course)+.....]/(total no. of hrs.)

points:A=4/B+=3.5/B=3/C+=2.5/C=2/D+=1.5/D=1/F=0



i have 4 tables in the database

students:studentId(pk)-studeNtname

enrolment:studentId(pk)-courseId-grade

courses:courseId(pk)-courseName-hours

gpa:studentId(pk)-gpa



what will be the formula in access and in where shall i put it?

i appreciate your help

thanx a lot"
 

Xx_TownDawg_xX

Registered User.
Local time
Yesterday, 19:34
Joined
Jan 16, 2009
Messages
78
Link the four tables together into a common query, and then while in design view "build" the formula/calculation you need. For example, the screenshot below is not "YOUR" calculation, but it shows you how this is done inside a query.



Also.. looking at your problem some more.. You might have to make some summary rollups, (linking the query to OTHER queries) because you have implied parent-child relationships of course. For example, here is where I used a query to SUM/total my information so I could use that information in another query.



Let me see if I can set up a sample database showing you how all that would work.
 
Last edited:

Xx_TownDawg_xX

Registered User.
Local time
Yesterday, 19:34
Joined
Jan 16, 2009
Messages
78
OK.. I think I have it. Check out this example.

By the way, using LETTERs (although common practice) is a pain.. but to answer your question:

wght: Switch([grade]="A ",4,[grade]="B+",3.5,[grade]="B ",3,[grade]="C+",2.5,[grade]="C ",2,[grade]="D+",1.5,[grade]="D ",1,[grade]="F ",0)


GPA: Sum([tblStudents Query].[HrsWght])/Sum([tblStudents Query].[hours])



Hope that helps sir.


(DISCLAIMER: I just noticed that I forget to use standard naming convention on my queries. Sorry about that. I was doing like 4 things at once here at work today.)
 

Attachments

  • GPA.zip
    14 KB · Views: 442
  • qrySummary.JPG
    qrySummary.JPG
    65.1 KB · Views: 370
  • qryCalc.jpg
    qryCalc.jpg
    78.2 KB · Views: 333
  • qry2JPG.JPG
    qry2JPG.JPG
    85.4 KB · Views: 293
  • qry1.jpg
    qry1.jpg
    98.4 KB · Views: 391
Last edited:

pal

Registered User.
Local time
Yesterday, 17:34
Joined
Mar 12, 2010
Messages
14
Dear TownDawg,
thanx alot for ur help
it was perfect

but i have a small problem>>
i could not do a report that include every student sparetly with thier information:
studentID/studentName/courseID/courseName/grade/hours/total hours/GPA

can i know how to do that??

thanx sir :)
 

Xx_TownDawg_xX

Registered User.
Local time
Yesterday, 19:34
Joined
Jan 16, 2009
Messages
78
I get the feeling I just did your "Introduction To Microsoft Access" school assignment?.. but here you go sir.
 

Attachments

  • GPA (revised).zip
    35.8 KB · Views: 860

Users who are viewing this thread

Top Bottom