Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 9

Program Name: STUDENT RESULT PROCESSING

Private a, b, c, d, e, f As String

Private Sub Command1_Click()

Text7 = Val(Text3) + Val(Text4) + Val(Text5) + Val(Text6)

Text8 = Text7 / 4

Select Case Text8.Text

Case 50 To 59

Text9.Text = "SECOND CLASS"

Case Is >= 60

Text9.Text = "FIRST CLASS"

Case Is = 100

Text9.Text = "DISTINCTION"

End Select

If Text3.Text < 50 Or Text4.Text < 50 Or Text5.Text < 50 Or Text6.Text < 50 Then

Text9.Text = "FAIL"

End If

End Sub

Private Sub Command2_Click()

If Check1.Value = 1 Then

a = "Playing cricket"

End If

If Check2.Value = 1 Then

b = "Reading books"

End If

If Check3.Value = 1 Then
c = "Singing"

End If

If Check4.Value = 1 Then

d = "Dancing"

End If

If Check5.Value = 1 Then

e = "Gardening"

End If

If Check6.Value = 1 Then

f = "Browsing"

End If

Text10.Text = "Enter ECA: " & a & "," & b & "," & c & "," & d & "," & e & "," & f & ","

End Sub

Private Sub Command3_Click()

End

End Sub
Program Name: CALCULATOR DESIGN

Dim op1, op2, op, res

Private Sub add_Click()

op1 = Val(Text1.Text)

Text1.Text = ""

op = add.Caption

End Sub

Private Sub Command1_Click()

End

End Sub

Private Sub Command12_Click()

If op <> "" Then

op2 = Val(Text1.Text)

End If

Select Case (op)

Case "+"

res = op1 + op2

Case "-"

res = op1 - op2

Case "*"

res = op1 * op2

Case "/"

res = op1 / op2

End Select
Text1.Text = res

End Sub

Private Sub Command17_Click()

Text1.Visible = True

End Sub

Private Sub Command18_Click()

Text1.Text = ""

Text1.Visible = False

End Sub

Private Sub Command19_Click()

Text1.Text = ""

op = ""

op1 = ""

op2 = ""

res = ""

End Sub

Private Sub div_Click()

op1 = Val(Text1.Text)

Text1.Text = ""

op = div.Caption

End Sub

Private Sub dot_Click()


Text1.Text = Text1.Text + dot.Caption

End Sub

Private Sub eight_Click()

Text1.Text = Text1.Text + eight.Caption

End Sub

Private Sub five_Click()

Text1.Text = Text1.Text + five.Caption

End Sub

Private Sub four_Click()

Text1.Text = Text1.Text + four.Caption

End Sub

Private Sub mul_Click()

op1 = Val(Text1.Text)

Text1.Text = ""

op = mul.Caption

End Sub

Private Sub nine_Click()

Text1.Text = Text1.Text + nine.Caption

End Sub

Private Sub one_Click()


Text1.Text = Text1.Text + one.Caption

End Sub

Private Sub seven_Click()

Text1.Text = Text1.Text + seven.Caption

End Sub

Private Sub six_Click()

Text1.Text = Text1.Text + six.Caption

End Sub

Private Sub subt_Click()

op1 = Val(Text1.Text)

Text1.Text = ""

op = subt.Caption

End Sub

Private Sub three_Click()

Text1.Text = Text1.Text + three.Caption

End Sub

Private Sub two_Click()

Text1.Text = Text1.Text + two.Caption

End Sub

Private Sub zero_Click()

Text1.Text = Text1.Text + zero.Caption

End Sub
Program Name: INTEGRATION – VB WITH MSACCESS

Private Sub cmdadd_Click()

Adodc1.Recordset.AddNew

End Sub

Private Sub cmddel_Click()

confirm = MsgBox("want to delete", vbYesNo, "delete confirmation")

If confirm = vbYes Then

Adodc1.Recordset.Delete

End If

End Sub

Private Sub cmdfirst_Click()

If Adodc1.Recordset.EOF = False And Adodc1.Recordset.BOF = False Then

Adodc1.Recordset.MoveFirst

End If

End Sub

Private Sub cmdlast_Click()

If Adodc1.Recordset.EOF = False And Adodc1.Recordset.BOF = False Then

Adodc1.Recordset.MoveLast

End If

End Sub

Private Sub cmdnxt_Click()

If Adodc1.Recordset.EOF = False Then


Adodc1.Recordset.MoveNext

Else

Adodc1.Recordset.MoveFirst

End If

End Sub

Private Sub cmdprev_Click()

If Adodc1.Recordset.BOF = False Then

Adodc1.Recordset.MovePrevious

Else

Adodc1.Recordset.MoveLast

End If

End Sub

Private Sub cmdsav_Click()

Adodc1.Recordset.Fields("Roll No") = Text1.Text

Adodc1.Recordset.Fields("Name") = Text2.Text

Adodc1.Recordset.Fields("Address") = Text3.Text

Adodc1.Recordset.Save

MsgBox ("saved")

End Sub

Private Sub cmdupd_Click()

Adodc1.Recordset.Fields("Roll No") = Text1.Text

Adodc1.Recordset.Fields("Name") = Text2.Text

Adodc1.Recordset.Fields("Address") = Text3.Text

Adodc1.Recordset.Update

MsgBox ("Records Updated")


End Sub

You might also like