[go: up one dir, main page]

0% found this document useful (0 votes)
21 views3 pages

Student DB

This document contains Visual Basic code for managing a student marklist. It includes subroutines for adding, deleting, updating, and clearing records, as well as exiting the form. Additional code calculates the student's total marks, average marks, determines their grade based on thresholds, and sets the corresponding text in different boxes.

Uploaded by

Bharathi Indhu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views3 pages

Student DB

This document contains Visual Basic code for managing a student marklist. It includes subroutines for adding, deleting, updating, and clearing records, as well as exiting the form. Additional code calculates the student's total marks, average marks, determines their grade based on thresholds, and sets the corresponding text in different boxes.

Uploaded by

Bharathi Indhu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

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

You might also like