Case Statement

waq963

Registered User.
Local time
Today, 14:43
Joined
Jan 27, 2009
Messages
84
Hi, I am trying to do a grading system for total marks students may get in an Exam. A want to show this in a report and i have a Label that should show the Grade accrdint to their Score. This is the code i have so far but i get the runtime error 438, Object doesn't support this porperty or method?

Code:
Private Sub Detail_Paint()
    Select Case Total_Score
    Case 0 To 85
    lblGrading = "G"
    Case 86 To 170
    lblGrading = "F"
    Case 171 To 255
    lblGrading = "E"
    Case 256 To 340
    lblGrading = "D"
    Case 341 To 425
    lblGrading = "C"
    Case 426 To 510
    lblGrading = "B"
    Case 511 To 598
    lblGrading = "A"
    End Select
End Sub
 
Is lblGrading a text box or a label?
If it is a label then use lblGrading.Caption = "G"
 
Cheers Mate works fine.
 

Users who are viewing this thread

Back
Top Bottom