STUDENT MARKLIST
ADD:
Private Sub Command1_Click()
Adodc1.Recordset.AddNew
MsgBox "record added"
End Sub
DELETE:
Private Sub Command2_Click()
Adodc1.Recordset.Delete
MsgBox "record deleted"
End Sub
UPDATE:
Private Sub Command3_Click()
Adodc1.Recordset.Update
MsgBox "record updated"
End Sub
CLEAR:
Private Sub Command4_Click()
Text1.Text = " "
Text2.Text = " "
Text3.Text = " "
Text4.Text = " "
Text5.Text = " "
End Sub
EXIT:
Private Sub Command5_Click()
Unload Me
End Sub
GRADE TEXTBOX:
Private Sub Text10_GotFocus()
If Val(Text5.Text) > 40 And Val(Text6.Text) > 40 And Val(Text7.Text) > 40 And Val(Text9.Text) > 75 Then
Text10.Text = "O"
Text11.Text = "OUTSTANDING"
ElseIf Val(Text5.Text) > 40 And Val(Text6.Text) > 40 And Val(Text7.Text) > 40 And Val(Text9.Text) > 60
Then
Text10.Text = "A"
Text11.Text = "FIRST"
ElseIf Val(Text5.Text) > 40 And Val(Text6.Text) > 40 And Val(Text7.Text) > 40 And Val(Text9.Text) > 50
Then
Text10.Text = "B"
Text11.Text = "SECOND"
ElseIf Val(Text5.Text) > 40 And Val(Text6.Text) > 40 And Val(Text7.Text) > 40 And Val(Text9.Text) > 40
Then
Text10.Text = "C"
Text11.Text = "THIRD"
ElseIf Val(Text5.Text) < 40 And Val(Text6.Text) < 40 And Val(Text7.Text) < 40 And Val(Text9.Text) <= 40
Then
Text10.Text = "FAIL"
Text11.Text = "NIL"
End If
End Sub
TOTAL:
Private Sub Text8_GotFocus()
Text8.Text = Val(Text5.Text) + Val(Text6.Text) + Val(Text7.Text)
End Sub
AVERAGE:
Private Sub Text9_GotFocus()
Text9.Text = Val(Text8.Text) / 3
End Sub