Sie sind auf Seite 1von 31

CODINGS

Option Explicit

Private Sub Frame1_Click()

Unload Me

End Sub

Private Sub lblCompany_Click()

End Sub

Private Sub Timer1_Timer()

ProgressBar1.Value = ProgressBar1.Value + 10

If ProgressBar1.Value = 100 Then

frmLogin.Show

Unload Me

End If

End Sub

Private Sub cmdCancel_Click()

Unload Me

End Sub
Private Sub cmdOK_Click()

If LCase(Trim(txtUserName.Text)) = LCase(Trim("srkg")) And LCase(Trim(txtPassword.Text)) =


LCase(Trim("college")) Then

MDIForm1.Show

Unload Me

Else

MsgBox ("Wrong user name or password .............. plz try again ")

txtUserName.Text = ""

txtPassword.Text = ""

txtUserName.SetFocus

End If

End Sub

Private Sub Form_Load()

End Sub

Private Sub MDIForm_Load()

End Sub

Private Sub mnuant_Click()

Form5.Show

End Sub

Private Sub mnueti_Click()

Form6.Show
End Sub

Private Sub mnulat_Click()

Form8.Show

End Sub

Private Sub mnupf_Click()

Form9.Show

End Sub

Private Sub mnure_Click()

Unload Me

End Sub

Private Sub mnuri_Click()

Form2.Show

End Sub

Private Sub mnurr_Click()

Form1.Show

End Sub

Private Sub mnurs_Click()

Form3.Show
End Sub

Private Sub mnurt_Click()

Form7.Show

End Sub

Private Sub mnusl_Click()

Form4.Show

End Sub

Dim rs As New ADODB.Recordset

Dim con As New ADODB.Connection

Private Sub Command1_Click()

rs.AddNew

rs.Fields(0) = Text1.Text

rs.Fields(1) = Text2.Text

rs.Fields(2) = Combo1.Text

rs.Fields(3) = Text3.Text

rs.Fields(4) = Text4.Text

rs.Fields(5) = Text5.Text

If Option1.Value = True Then

rs.Fields(6) = Option1.Caption

Else

rs.Fields(6) = Option2.Caption

End If
rs.Fields(7) = Text6.Text

rs.Fields(8) = Text8.Text

rs.Fields(9) = Text9.Text

rs.Fields(10) = Text7.Text

rs.Update

con.Close

Unload Me

End Sub

Private Sub Command2_Click()

con.Close

Unload Me

End Sub

Private Sub Form_Load()

con.ConnectionString = "provider=microsoft.ace.oledb.12.0; data source=d:\pk jee\school.accdb"

con.Open

rs.Open "select * from students", con, adOpenStatic, adLockOptimistic

If rs.BOF() = True Then

Text2.Text = "1"

Text1.Text = Date

Else

rs.MoveLast

Text2.Text = rs.Fields(1) + 1

Text1.Text = Date

End If

Combo1.AddItem ("Nurssary")
Combo1.AddItem ("LKG")

Combo1.AddItem ("UKG")

Combo1.AddItem ("1")

Combo1.AddItem ("2")

Combo1.AddItem ("3")

Combo1.AddItem ("4")

Combo1.AddItem ("5")

Combo1.AddItem ("6")

Combo1.AddItem ("7")

Combo1.AddItem ("8")

Combo1.AddItem ("9")

Combo1.AddItem ("10")

Text1.Enabled = False

Text2.Enabled = False

Text7.Enabled = False

Text7.Text = "9500"

End Sub

Dim rs As New ADODB.Recordset

Dim con As New ADODB.Connection

Private Sub Command1_Click()

Dim num As Integer

num = Text1.Text

rs.MoveFirst

Do While Not rs.EOF

If rs.Fields(1) = num Then

Frame1.Visible = True
Text2.Visible = True

Text2.Text = rs.Fields(0)

Text3.Text = rs.Fields(2)

Text4.Text = rs.Fields(3)

Text5.Text = rs.Fields(4)

Text6.Text = rs.Fields(5)

Text7.Text = rs.Fields(7)

Text8.Text = rs.Fields(8)

Text9.Text = rs.Fields(9)

Exit Do

End If

rs.MoveNext

Loop

If rs.EOF Then

MsgBox ("Student does not exist")

End If

End Sub

Private Sub Command2_Click()

rs.Fields(0) = Text2.Text

rs.Fields(2) = Text3.Text

rs.Fields(3) = Text4.Text

rs.Fields(4) = Text5.Text

rs.Fields(5) = Text6.Text

rs.Fields(7) = Text7.Text

rs.Fields(8) = Text8.Text

rs.Fields(9) = Text9.Text
rs.Update

con.Close

Unload Me

End Sub

Private Sub Command3_Click()

con.Close

Unload Me

End Sub

Private Sub Form_Load()

con.ConnectionString = "provider=microsoft.ace.oledb.12.0; data source=d:\pk jee\school.accdb"

con.Open

rs.Open "select * from students", con, adOpenStatic, adLockOptimistic

Text2.Enabled = False

Frame1.Visible = False

Text2.Visible = False

End Sub

Dim rs As New ADODB.Recordset

Dim con As New ADODB.Connection

Private Sub Command1_Click()

Dim num As Integer

num = Text1.Text

rs.MoveFirst

Do While Not rs.EOF

If rs.Fields(1) = num Then


Frame1.Visible = True

Text2.Visible = True

Text2.Text = rs.Fields(0)

Text3.Text = rs.Fields(1)

Text4.Text = rs.Fields(2)

Text5.Text = rs.Fields(3)

Text6.Text = rs.Fields(4)

Text7.Text = rs.Fields(5)

Text8.Text = rs.Fields(6)

Text9.Text = rs.Fields(7)

Text10.Text = rs.Fields(8)

Text11.Text = rs.Fields(9)

Exit Do

End If

rs.MoveNext

Loop

If rs.EOF Then

MsgBox ("Student does not exist")

End If

End Sub

Private Sub Command2_Click()

CommonDialog1.ShowPrinter

rs.Delete

con.Close

Unload Me
End Sub

Private Sub Command3_Click()

Unload Me

End Sub

Private Sub Form_Load()

con.ConnectionString = "provider=microsoft.ace.oledb.12.0; data source=d:\pk jee\school.accdb"

con.Open

rs.Open "select * from students", con, adOpenStatic, adLockOptimistic

Text2.Enabled = False

Frame1.Visible = False

Text2.Visible = False

End Sub

Private Sub Dir1_Change()

End Sub

Private Sub DataGrid1_Click()

End Sub

Dim rs As New ADODB.Recordset

Dim con As New ADODB.Connection

Private Sub Command1_Click()

rs.AddNew
rs.Fields(0) = Text1.Text

rs.Fields(1) = Combo1.Text

rs.Fields(2) = Text2.Text

rs.Fields(3) = Text3.Text

rs.Fields(4) = Text4.Text

If Option1.Value = True Then

rs.Fields(5) = Option1.Caption

Else

rs.Fields(5) = Option2.Caption

End If

rs.Fields(6) = Text5.Text

rs.Fields(7) = Text6.Text

rs.Fields(8) = Text7.Text

rs.Fields(9) = Text8.Text

rs.Fields(10) = Text9.Text

rs.Update

con.Close

Unload Me

End Sub

Private Sub Command2_Click()

con.Close

Unload Me

End Sub

Private Sub Form_Load()

con.ConnectionString = "provider=microsoft.ace.oledb.12.0; data source=d:\pk jee\school.accdb"


con.Open

rs.Open "select * from teacher", con, adOpenStatic, adLockOptimistic

If rs.BOF() = True Then

Text9.Text = "1001"

Text1.Text = Date

Else

rs.MoveLast

Text9.Text = rs.Fields(10) + 1

Text1.Text = Date

End If

Combo1.AddItem ("Science")

Combo1.AddItem ("SST")

Combo1.AddItem ("Maths")

Combo1.AddItem ("Hindi")

Combo1.AddItem ("English")

Text9.Enabled = False

Text1.Enabled = False

End Sub

Dim rs As New ADODB.Recordset

Dim con As New ADODB.Connection

Private Sub Command1_Click()

Dim num As Integer

num = Text1.Text

rs.MoveFirst

Do While Not rs.EOF


If rs.Fields(10) = num Then

Frame1.Visible = True

Text2.Visible = True

Text2.Text = rs.Fields(1)

Text3.Text = rs.Fields(2)

Text4.Text = rs.Fields(3)

Text5.Text = rs.Fields(4)

Text6.Text = rs.Fields(5)

Text7.Text = rs.Fields(6)

Text8.Text = rs.Fields(7)

Text9.Text = rs.Fields(8)

Text10.Text = rs.Fields(9)

Exit Do

End If

rs.MoveNext

Loop

If rs.EOF Then

MsgBox ("Teacher does not exist")

End If

End Sub

Private Sub Command2_Click()

rs.Fields(1) = Text2.Text

rs.Fields(2) = Text3.Text

rs.Fields(3) = Text4.Text

rs.Fields(4) = Text5.Text

rs.Fields(5) = Text6.Text
rs.Fields(6) = Text7.Text

rs.Fields(7) = Text8.Text

rs.Fields(8) = Text9.Text

rs.Fields(9) = Text10.Text

rs.Update

con.Close

Unload Me

End Sub

Private Sub Command3_Click()

con.Close

Unload Me

End Sub

Private Sub Form_Load()

con.ConnectionString = "provider=microsoft.ace.oledb.12.0; data source=d:\pk jee\school.accdb"

con.Open

rs.Open "select * from teacher", con, adOpenStatic, adLockOptimistic

Text2.Enabled = False

Frame1.Visible = False

Text2.Visible = False

End Sub

Dim rs As New ADODB.Recordset

Dim con As New ADODB.Connection

Private Sub Command1_Click()

Dim num As Integer


num = Text1.Text

rs.MoveFirst

Do While Not rs.EOF

If rs.Fields(10) = num Then

Frame1.Visible = True

Text2.Visible = True

Text2.Text = rs.Fields(0)

Text3.Text = rs.Fields(1)

Text4.Text = rs.Fields(2)

Text5.Text = rs.Fields(3)

Text6.Text = rs.Fields(4)

Text7.Text = rs.Fields(5)

Text8.Text = rs.Fields(6)

Text9.Text = rs.Fields(7)

Text10.Text = rs.Fields(8)

Text11.Text = rs.Fields(9)

Text12.Text = Date

Text12.Enabled = False

Exit Do

End If

rs.MoveNext

Loop

If rs.EOF Then

MsgBox ("Teacher does not exist")

End If

End Sub
Private Sub Command2_Click()

MsgBox ("Teacher Retired")

cmdb.ShowPrinter

rs.Delete

con.Close

Unload Me

End Sub

Private Sub Command3_Click()

con.Close

Unload Me

End Sub

Private Sub Form_Load()

con.ConnectionString = "provider=microsoft.ace.oledb.12.0; data source=d:\pk jee\school.accdb"

con.Open

rs.Open "select * from teacher", con, adOpenStatic, adLockOptimistic

Text2.Enabled = False

Frame1.Visible = False

Text2.Visible = False

End Sub

Private Sub Form_Load()

End Sub
Dim rs As New ADODB.Recordset

Dim con As New ADODB.Connection

Private Sub Command1_Click()

Dim num As Integer

num = Text1.Text

rs.MoveFirst

Do While Not rs.EOF

If rs.Fields(1) = num Then

Frame1.Visible = True

Text2.Visible = True

Text2.Text = rs.Fields(2)

Text3.Enabled = False

Text3.Text = "700"

Exit Do

End If

rs.MoveNext

Loop

If rs.EOF Then

MsgBox ("Student does not exist")

End If

End Sub

Private Sub Command2_Click()

MsgBox ("Fees Deposited")

CommonDialog1.ShowPrinter

con.Close
Unload Me

End Sub

Private Sub Form_Load()

con.ConnectionString = "provider=microsoft.ace.oledb.12.0; data source=d:\pk jee\school.accdb"

con.Open

rs.Open "select * from students", con, adOpenStatic, adLockOptimistic

Text2.Enabled = False

Frame1.Visible = False

Combo1.AddItem ("January")

Combo1.AddItem ("February")

Combo1.AddItem ("March")

Combo1.AddItem ("April")

Combo1.AddItem ("May")

Combo1.AddItem ("June")

Combo1.AddItem ("July")

Combo1.AddItem ("August")

Combo1.AddItem ("September")

Combo1.AddItem ("October")

Combo1.AddItem ("November")

Combo1.AddItem ("December")

End Sub