E
Eugene7899
I am trying to create a function in MS Access (Module) that assigns a Grade
for a particular Credit Bureau Score but the functions I created returns the
same value for all scores. Must be doing something wrong. I'm new at this
so any help would be appreciated.
Here are two Functions I created, both returning the same value:
1st Function
Option Compare Database
Function Grade2() As Integer
If score >= 720 Then
Grade2 = 1
ElseIf score >= 680 And score < 720 Then
Grade2 = 2
ElseIf score >= 650 And score < 680 Then
Grade2 = 3
ElseIf score >= 630 And score < 650 Then
Grade2 = 4
ElseIf score >= 600 And score < 630 Then
Grade2 = 5
ElseIf score >= 0 And score < 600 Then
Grade2 = 6
End If
End Function
2nd Function
Option Compare Database
Function Grade1() As String
Grade1 = IIf(score < 600, "E", IIf(score < 630, "D", IIf(score < 650,
"C", IIf(score < 680, "B", "C"))))
End Function
for a particular Credit Bureau Score but the functions I created returns the
same value for all scores. Must be doing something wrong. I'm new at this
so any help would be appreciated.
Here are two Functions I created, both returning the same value:
1st Function
Option Compare Database
Function Grade2() As Integer
If score >= 720 Then
Grade2 = 1
ElseIf score >= 680 And score < 720 Then
Grade2 = 2
ElseIf score >= 650 And score < 680 Then
Grade2 = 3
ElseIf score >= 630 And score < 650 Then
Grade2 = 4
ElseIf score >= 600 And score < 630 Then
Grade2 = 5
ElseIf score >= 0 And score < 600 Then
Grade2 = 6
End If
End Function
2nd Function
Option Compare Database
Function Grade1() As String
Grade1 = IIf(score < 600, "E", IIf(score < 630, "D", IIf(score < 650,
"C", IIf(score < 680, "B", "C"))))
End Function