0% found this document useful (0 votes)
16 views8 pages

Student Mark Management System

The document contains code for a student management system that allows students to login, view and update their personal details, view marks, add marks, and calculate percentages. It includes code for three forms - the login form, personal details form, and marks form. It also includes code for three classes - Personal, Markdet, and Admin that handle functions like validating login, accessing and updating the database, and calculating percentages. The database contains three tables to store admin, student personal details, and student marks details.

Uploaded by

mrmanojgopi
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views8 pages

Student Mark Management System

The document contains code for a student management system that allows students to login, view and update their personal details, view marks, add marks, and calculate percentages. It includes code for three forms - the login form, personal details form, and marks form. It also includes code for three classes - Personal, Markdet, and Admin that handle functions like validating login, accessing and updating the database, and calculating percentages. The database contains three tables to store admin, student personal details, and student marks details.

Uploaded by

mrmanojgopi
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

STUDENT MARK DETAILS PROJECT

FORM1 CODING
Private Sub Command1_Click()
Dim s As personal_class
Dim ad As admin_class
If [Link] = True Then
Set s = New personal_class
Call s.login_verify(Trim([Link]), Trim([Link]))
Else
If [Link] = True Then
Set ad = New admin_class
Call ad.login_verify(Trim([Link]), Trim([Link]))
End If
End If
End Sub

[Link]
Form control Details
Add Button– Command1
DisplayDetails –Command2
Display Marks –Command3
MainForm –Command4
Clear –Command5

Code:
Dim s_per As personal_class

Private Sub Command1_Click()


Set s_per = New personal_class
Call s_per.ad_per_detail([Link], [Link], [Link], [Link])
End Sub

Private Sub Command2_Click()


Set s_per = New personal_class
Call s_per.display_per_detail
End Sub

Private Sub Command3_Click()


[Link]
[Link]
[Link] = False
[Link] = False
[Link] = [Link]
'[Link] = [Link]
End Sub

Private Sub Command4_Click()


[Link]
[Link]
End Sub

Private Sub Command5_Click()


End
End Sub

Private Sub Command6_Click()


[Link] = ""
[Link] = ""
[Link] = ""
[Link] = ""
[Link] = ""
End Sub

Private Sub Form_Load()


[Link] = [Link]
End Sub
[Link]
Form Control Details
AddMarkDetails- Command1
Calculate Percentage –Command2
DisplayMarkDetails –Command3
MainForm –Command4
Logout –Command5
Clear- Clear

Code:
Dim s_mark As markdet_class

Private Sub Clear_Click()


[Link] = ""
[Link] = ""
[Link] = ""
[Link] = ""
[Link] = ""
[Link] = ""
End Sub

Private Sub Command1_Click()


Set s_mark = New markdet_class
Call s_mark.add_mark_detail(Trim([Link]), [Link], Int(Trim([Link])),
Int(Trim([Link])), Int(Trim([Link])))
End Sub

Private Sub Command2_Click()


Set s_mark = New markdet_class
Call s_mark.cal_percentage(Trim([Link]), [Link])
End Sub

Private Sub Command3_Click()


Set s_mark = New markdet_class
Call s_mark.display_mar_det(Trim([Link]), [Link])
End Sub

Private Sub Command4_Click()


[Link]
[Link]
End Sub

Private Sub Command5_Click()


End
End Sub

Private Sub Form_Load()

End Sub

ADMIN CLASS
Option Explicit
Private uname As String
Private pwd As String
Dim db As [Link]
Dim rs As [Link]
Public Sub login_verify(aname As String, apwd As String)
Set db = [Link]("D:\OOADLAB\Student\[Link]")
Set rs = [Link]("admin")
[Link]
Dim flag As Boolean
flag = False
Do While Not [Link]
If Trim(rs(0).Value) = aname Then
If Trim(rs(1).Value) = apwd Then
[Link]
[Link] = True
[Link] = True

[Link]
Exit Do
End If
End If
[Link]
Loop
[Link]
[Link]
End Sub

MARKDET CLASS
Option Explicit
Private regno As String
Private sem As String
Private mark1 As Integer
Private mark2 As Integer
Private mark3 As Integer

Dim db As [Link]
Dim rs As [Link]

Public Sub add_mark_detail(sregno As String, ssem As String, sm1 As Integer, sm2 As Integer, sm3
As Integer)
Set db = [Link]("D:\OOADLAB\Student\[Link]")
Set rs = [Link]("stud_mark")
MsgBox "inside"
[Link]
rs(0).Value = sregno
rs(1).Value = ssem
rs(2).Value = sm1
rs(3).Value = sm2
rs(4).Value = sm3
rs(5).Value = 0
[Link]
MsgBox "Values Added"
End Sub

Public Sub display_mar_det(sregno As String, ssem As String)


MsgBox "Please enter Semester"
Set db = [Link]("D:\OOADLAB\Student\[Link]")
Set rs = [Link]("stud_mark")
[Link]
Do While Not [Link]
[Link] = [Link]
If rs(0).Value = sregno Then
If rs(1).Value = ssem Then
[Link] = rs(2).Value
[Link] = rs(3).Value
[Link] = rs(4).Value
[Link] = rs(5).Value
[Link] = rs(1).Value
Exit Do
End If
End If
[Link]
Loop
End Sub

Public Sub cal_percentage(sregno As String, ssem As String)


Set db = [Link]("D:\OOADLAB\Student\[Link]")
Set rs = [Link]("stud_mark")
[Link]
Do While Not [Link]
If rs(0).Value = sregno Then
If rs(1).Value = ssem Then
[Link]
rs(5).Value = (rs(2).Value + rs(3).Value + rs(4).Value) / 3
[Link] = rs(5).Value
[Link]
Exit Do
End If
End If
[Link]
Loop
[Link]
[Link]
End Sub

Personal class
Option Explicit
Private regno As String
Private pwd As String
Private name As String
Private dob As Date
Private dept As String
Private address As String
Public NewProperty As markdet_class
Dim db As [Link]
Dim rs As [Link]
Public Sub login_verify(regno As String, pwd As String)
Set db = [Link]("D:\OOADLAB\Student\[Link]")
Set rs = [Link]("stud_per")
[Link]
Dim flag As Boolean
flag = False
Do While Not [Link]
If Trim(rs(0).Value) = regno Then
If Trim(rs(1).Value) = pwd Then
flag = True
Exit Do
End If
End If
[Link]
Loop
Call display_avail(flag)
[Link]
[Link]
End Sub

Public Sub ad_per_detail(sname As String, sdate As String, sdept As String, sadd As String)
Set db = [Link]("D:\OOADLAB\Student\[Link]")
Set rs = [Link]("stud_per")
[Link]
Do While Not [Link]
If Trim(rs(0).Value) = Trim([Link]) Then
[Link]
rs(2).Value = sname
rs(3).Value = sdate
rs(4).Value = sdept
rs(5).Value = sadd
[Link]
MsgBox "Detail Added"
Exit Do
End If
[Link]
Loop
[Link]
[Link]
End Sub

Public Sub display_avail(flag As Boolean)


If flag = True Then
MsgBox "valid Student"
[Link]
[Link]
Else
MsgBox "Invalid Login"
End If
End Sub

Public Sub display_per_detail()


Set db = [Link]("D:\OOADLAB\Student\[Link]")
Set rs = [Link]("stud_per")
[Link]
Do While Not [Link]
If Trim(rs(0).Value) = Trim([Link]) Then

[Link] = rs(0).Value
[Link] = rs(2).Value
[Link] = rs(3).Value
[Link] = rs(4).Value
[Link] = rs(5).Value
Exit Do
End If
[Link]
Loop
[Link]
[Link]

End Sub

DATABASE DETAILS
TABLE (1) NAME: admin
Fields:
ad_name-text
ad_pwd-text

TABLE (2) NAME: stud_mark


Fields:
a_regno-Number
s_sem-Number
s_mark1-Number
s_mark2-Number
s_mark3-Number
s_per-Number

TABLE (3) NAME: stud_per


Fields:
s_regno - Number
s_pwd –Text
s_name –Text
s_dob –Date/Time
s_dept –Text
s_address -Text

You might also like