FahadTiger
Member
- Local time
- Today, 20:33
- Joined
- Jun 20, 2021
- Messages
- 120
Hi everyone..
I have a query to display students' scores..and there are 8 subjects..such as mathematics, physics, chemistry, etc..each subject is in a field
In case that the student obtained a grade between 20 and 24 in mathematics, we write in the field (pass)
In case that he obtained a score between 24 and 30 in physics, we write in the field (pass)
I made a function to pass the math value..and everything is fine
Does this mean that I need 8 functions to pass the values of the rest of the subjects?
Any advice
-----------------
Function CheckDegree(sMath As Double) As String
If sMath > 20 And sMath < 24 Then
CheckDegree = "pass"
Else
CheckDegree = ""
End If
End Function
and in query I put this..
CheckDegree(Math)
I have a query to display students' scores..and there are 8 subjects..such as mathematics, physics, chemistry, etc..each subject is in a field
In case that the student obtained a grade between 20 and 24 in mathematics, we write in the field (pass)
In case that he obtained a score between 24 and 30 in physics, we write in the field (pass)
I made a function to pass the math value..and everything is fine
Does this mean that I need 8 functions to pass the values of the rest of the subjects?
Any advice
-----------------
Function CheckDegree(sMath As Double) As String
If sMath > 20 And sMath < 24 Then
CheckDegree = "pass"
Else
CheckDegree = ""
End If
End Function
and in query I put this..
CheckDegree(Math)