n107jkx
Board Regular
- Joined
- Dec 3, 2002
- Messages
- 51
I am trying to use a module to convert a grade into a numeric value. I am using the code as below and I have already used similar coding to convert a mark number into a grade. As i am a novice in using VBA, i would be grateful if anybody could point out where i am going wrong.
Function ConvertGrade(ScoreIn As Variant)
Select Case ScoreIn
Case Is = A
ConvertGrade = "6"
Case Is = AB
ConvertGrade = "5.5"
Case Is = B
ConvertGrade = "5"
Case Is = BC
ConvertGrade = "4.5"
Case Is = C
ConvertGrade = "4"
Case Is = CD
ConvertGrade = "3.5"
Case Is = D
ConvertGrade = "3"
Case Is = DE
ConvertGrade = "2.5"
Case Is = E
ConvertGrade = "2"
Case Is = U
ConvertGrade = "1"
End Select
End Function
Also, can anybody recommend the best way to create a scatter graph in Access.
Function ConvertGrade(ScoreIn As Variant)
Select Case ScoreIn
Case Is = A
ConvertGrade = "6"
Case Is = AB
ConvertGrade = "5.5"
Case Is = B
ConvertGrade = "5"
Case Is = BC
ConvertGrade = "4.5"
Case Is = C
ConvertGrade = "4"
Case Is = CD
ConvertGrade = "3.5"
Case Is = D
ConvertGrade = "3"
Case Is = DE
ConvertGrade = "2.5"
Case Is = E
ConvertGrade = "2"
Case Is = U
ConvertGrade = "1"
End Select
End Function
Also, can anybody recommend the best way to create a scatter graph in Access.