Breaking

Search

Thursday, July 2, 2020

how to create student marksheet in visual basic program example with form design

The create Student Mark sheet in visual basic with form design

how to create student marksheet in visual basic program example with form design

The Create a student mark list and details in Visual Basic.

The Following Step Student Mark sheet procedure:-


  • Step 1: Start
  • Step 2: Go to the sql and create a table.
  • Step 3: Then open the Visual Basic range.
  • Step 4: Create label ,Textbox and Command button etc.
  • Step 5: Write a coding required for student mark list and details.
  • Step 6: Click on Project -> Component -> Microsoft  AND DATA control.
  • Step 7: Click on project -> Reference -> Microsoft of Library.
  • Step 8: Go to control panel -> Administrator tools -> ODBC .
  • Step 9: Table Connected .
  • Step 10: End

Sql Table Database Creation : -

Create table marksheet8015 ( regno numeric , studentname varchar(20) , vb numeric , dcn numeric , python numeric ,

rdbms numeric , ost numeric , total numeric , average numeric , result varchar(10) , grade varchar(10) )

 

Student Mark sheet program in visual basic : -

GENERAL : -

Dim con As New ADODB . Connection

Dim rs As New ADODB . Recordset

FOR INSERT COMMAND : -

Private Sub Command1_Click()

rs . AddNew

rs !regno = Val (Text1.Text)

rs! Studentname = Trim(Text2.Text)

rs!VB = Val(Text3.Text)

rs!dcn = val(Text4.Text)

rs!python = val(Text5.Text)

rs!rdbmslab = val(Text6.Text)

rs!ostlab = val(Text7.Text)

rs!total = val(Text8.Text)

rs!average = val(Text9.Text)

rs!result = val(Text10.Text)

rs!grade = val(Text11.Text)

rs . Update

MsgBox “ one record inserted ”

End Sub

FOR SEARCH COMMAND : -

Private Sub Command2 _ Click()

Dim search As New ADODB . Recordset

Dim qry As String

Dim I As integer

I=INPUTBOX(“ENTERTHEREGISTERNUMBERTOSEARCH“)

QRY=“SELECT*FROMMARKSHEET8015WHEREREGNO=“&I

search. Open qry , con , adOpenStatic , adLockOptimistic

If search.EOF Then

MsgBox “ no such student ”

Else

Text1.Text = search ! regno

Text2.Text = search ! studentname

Text3.Text = search ! VB

Text4.Text = search ! dcn

Text5.Text = search ! python

Text6.Text = search ! rdbmslab

Text7.Text = search ! total

Text8.Text = search ! average

Text9.Text = search ! result

Text10.Text = search ! grade

End If

End Sub

FOR REPORT : -

Private Sub Command3_ Click()

DataReport1.Show

End Sub

FOR CLEAR COMMAND : -

Private sub Command4_ Click()

Text1.Text = “ “

Text2.Text = “ “

Text3.Text = “ “

Text4.Text = “ “

Text5.Text = “ “

Text6.Text = “ “

Text7.Text = “ “

Text8.Text = “ “

Text9.Text = “ “

Text10.Text = “ “

End Sub

FOR EXIT COMMAND : -

Private Sub Command5_ Click()

Unload Me

End Sub

FORM

Private Sub From _ Load()

Con . open “dsn=shame8015; uid=day; pwd=day1”

rs.Open“Select*FromMarksheet8015",Con,AdOpenDynamic,AdLockOptimistic

MsgBox “ database created ”

End Sub

Private Sub Text7_Change ()

Text8 . Text = val ( Text3 . Text )  +  val ( Text4 . Text ) +  val ( Text5 . text )  +  Val ( Text6 . Text ) + Val ( Text7 . Text )

Text9.Text = Val(Text8.Text) / 5

If Val ( Text3 . Text )>39AndVal ( Text4 . Text )>39AndVal ( Text5 . Text )>39AndVal ( Text6 . Text )>39AndVal ( Text7 . Text )>39 Then

Text10.Txt = “ FAIL ”

End If

If Val(Text9.Text) > 75 Then

Text 11. Text = “ DISTINCTION ”

Else ( Text9. Text )  > 60 And Val(Text9. Text) < 75 Then

Text1 1 . Text = “ FIRST CLASS ”

Else ( Text9. Text )  > 50 And Val(Text9. Text) < 60 Then

Text1 1 . Text = “ SECOND CLASS ”

Else ( Text9. Text )  > 45 And Val(Text9. Text) < 50 Then

Text1 1 . Text = “ THIRD CLASS ”

ElseIf Val (Text9. Text) < 45 Then

Text11. Text = “ NIL ”

End IF

End Sub

FORM DESIGN : -

 

how to create student marksheet in visual basic program example with form design

 

REPORT: -

 

regno:                      8015

studentname:          raja

vb:                             80

dcn:                           80

rdmslab:                   80

ostlab:                       80

total:                        400

average:                   80

result:                  PASS

grade:           DISTINCTION

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

No comments:

Post a Comment