+ All Categories
Home > Documents > Codes Kapatid

Codes Kapatid

Date post: 09-Jan-2016
Category:
Upload: peejay-antolino
View: 14 times
Download: 0 times
Share this document with a friend
Description:
asdf

of 31

Transcript

Dim conn As New ADODB.ConnectionDim rec As New ADODB.RecordsetPrivate Sub cmdadd_Click()Me.cmdadd.Enabled = FalseMe.cmdok.Enabled = TrueMe.txtlrn.Enabled = TrueMe.txtfname.Enabled = TrueMe.txtlname.Enabled = TrueMe.txtmname.Enabled = TrueMe.cmbbmonth.Enabled = TrueMe.cmbbday.Enabled = TrueMe.cmbbyear.Enabled = TrueMe.cmbsex.Enabled = TrueMe.txtbbarangay.Enabled = TrueMe.txtmunicipality.Enabled = TrueMe.txtguardian.Enabled = TrueMe.txtgaddress.Enabled = TrueMe.txtgoccupation.Enabled = TrueMe.txticc.Enabled = TrueMe.txticcyear.Enabled = TrueMe.txtgenav.Enabled = TrueMe.txtyie.Enabled = TrueMe.txtlrn.Text = ""Me.txtfname.Text = ""Me.txtlname.Text = ""Me.txtmname.Text = ""Me.cmbbmonth.Text = ""Me.cmbbday.Text = ""Me.cmbbyear.Text = ""Me.cmbsex.Text = ""Me.txtbbarangay.Text = ""Me.txtguardian.Text = ""Me.txtmunicipality.Text = ""Me.txtgaddress.Text = ""Me.txticc.Text = ""Me.txticcyear.Text = ""Me.txtgenav.Text = ""Me.txtyie.Text = ""Me.txtgoccupation = ""End SubPrivate Sub cmdcancel_Click()Unload MeEnd SubPrivate Sub cmdok_Click()If Me.txtlrn.Text = "" ThenCall MsgBox("Please enter the Learner's Reference Number of the Student.")Me.txtlrn.SetFocusExit SubEnd IfIf Me.txtfname.Text = "" ThenCall MsgBox("Please enter the First Name of the Student.")Me.txtfname.SetFocusExit SubEnd IfIf Me.txtlname.Text = "" ThenCall MsgBox("Please enter the Last Name of the Student.")Me.txtlname.SetFocusExit SubEnd IfIf Me.txtmname.Text = "" ThenCall MsgBox("Please enter the Middle Initial of the Student.")Me.txtmname.SetFocusExit SubEnd IfIf Me.cmbbmonth.Text = "" Or Me.cmbbmonth = "Month:" ThenCall MsgBox("Please enter the Bday(Month) of the Student.")Me.cmbbmonth.SetFocusExit SubEnd IfIf Me.cmbbday.Text = "" Or Me.cmbbday = "Day:" ThenCall MsgBox("Please enter the Bday(Day) of the Student.")Me.cmbbday.SetFocusExit SubEnd IfIf Me.cmbbyear.Text = "" Or Me.cmbbyear = "Year:" ThenMsgBox ("Please enter the Bday(Year) of the Student.")Me.cmbbyear.SetFocusExit SubEnd IfIf Me.cmbsex.Text = "" ThenCall MsgBox("Please enter the Sex of the Student.")Me.cmbsex.SetFocusExit SubEnd IfIf Me.txtbbarangay.Text = "" ThenMsgBox ("Please enter the BirthPlace(Barangay) of the student.")Me.txtbbarangay.SetFocusExit SubEnd IfIf Me.txtmunicipality.Text = "" ThenMsgBox ("Please enter the Municipality of the student.")Me.txtmunicipality.SetFocusExit SubEnd IfIf Me.txtguardian.Text = "" ThenMsgBox ("Please enter the Guardian of the student.")Me.txtguardian.SetFocusExit SubEnd IfIf Me.txtgaddress.Text = "" ThenMsgBox ("Please enter the Guardian's Address of the student.")Me.txtgaddress.SetFocusExit SubEnd IfIf Me.txtgoccupation.Text = "" ThenMsgBox ("Please enter the Guardian's Occupation of the student.")Me.txtgoccupation.SetFocusExit SubEnd IfIf Me.txticc.Text = "" ThenMsgBox ("Please enter the Intermidiate Course Completed of the student.")Me.txticc.SetFocusExit SubEnd IfIf Me.txticcyear.Text = "" ThenMsgBox ("Please enter the Intermidiate Course Completed(Year) of the student.")Me.txticcyear.SetFocusExit SubEnd IfIf Me.txtgenav.Text = "" ThenMsgBox ("Please enter the Intermidiate Course Completed(Gen.Average) of the student.")Me.txtgenav.SetFocusExit SubEnd IfIf Me.txtyie.Text = "" ThenMsgBox ("Please enter the *Total number of years in school to complete Elementary course of the student.")Me.txtyie.SetFocusExit SubEnd Ifrec.UpdateMsgBox "Record Saved!", vbOKOnly, "Success"Me.cmdadd.Enabled = TrueMe.cmdok.Enabled = FalseMe.txtlrn.Enabled = FalseMe.txtfname.Enabled = FalseMe.txtlname.Enabled = FalseMe.txtmname.Enabled = FalseMe.cmbbmonth.Enabled = FalseMe.cmbbday.Enabled = FalseMe.cmbbyear.Enabled = FalseMe.cmbsex.Enabled = FalseMe.txtbbarangay.Enabled = FalseMe.txtmunicipality.Enabled = FalseMe.txtguardian.Enabled = FalseMe.txtgaddress.Enabled = FalseMe.txtgoccupation.Enabled = FalseMe.txticc.Enabled = FalseMe.txticcyear.Enabled = FalseMe.txtgenav.Enabled = FalseMe.txtyie.Enabled = FalseMe.txtgoccupation = ""Me.txtlrn.Text = ""Me.txtfname.Text = ""Me.txtlname.Text = ""Me.txtmname.Text = ""Me.cmbbmonth.Text = ""Me.cmbbday.Text = ""Me.cmbbyear.Text = ""Me.cmbsex.Text = ""Me.txtbbarangay.Text = ""Me.txtguardian.Text = ""Me.txtmunicipality.Text = ""Me.txtgaddress.Text = ""Me.txticc.Text = ""Me.txticcyear.Text = ""Me.txtgenav.Text = ""Me.txtyie.Text = ""End SubPrivate Sub Command1_Click()Me.cmdadd.Enabled = FalseMe.cmdok.Enabled = TrueMe.DataGrid1.AllowUpdate = TrueMe.txtlrn.Enabled = TrueMe.txtfname.Enabled = TrueMe.txtlname.Enabled = TrueMe.txtmname.Enabled = TrueMe.cmbbmonth.Enabled = TrueMe.cmbbday.Enabled = TrueMe.cmbbyear.Enabled = TrueMe.cmbsex.Enabled = TrueMe.txtbbarangay.Enabled = TrueMe.txtmunicipality.Enabled = TrueMe.txtguardian.Enabled = TrueMe.txtgaddress.Enabled = TrueMe.txtgoccupation.Enabled = TrueMe.txticc.Enabled = TrueMe.txticcyear.Enabled = TrueMe.txtgenav.Enabled = TrueMe.txtyie.Enabled = TrueDataGrid1.Visible = Truecmdback.Visible = TrueMe.cmdadd.Visible = FalseEnd SubPrivate Sub Form_Load()conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source =" & App.Path & "\dbase.mdb"rec.CursorLocation = adUseClientrec.Open " SELECT * from tblstudinfo", conn, adOpenDynamic, adLockOptimisticMe.txtlrn.Enabled = FalseMe.txtfname.Enabled = FalseMe.txtlname.Enabled = FalseMe.txtmname.Enabled = FalseMe.cmbbmonth.Enabled = FalseMe.cmbbday.Enabled = FalseMe.cmbbyear.Enabled = FalseMe.cmbsex.Enabled = FalseMe.txtbbarangay.Enabled = FalseMe.txtmunicipality.Enabled = FalseMe.txtguardian.Enabled = FalseMe.txtgaddress.Enabled = FalseMe.txtgoccupation.Enabled = FalseMe.txticc.Enabled = FalseMe.txticcyear.Enabled = FalseMe.txtgenav.Enabled = FalseMe.txtyie.Enabled = FalseMe.cmbsex.AddItem "M" Me.cmbsex.AddItem "F" For j = 1 To 12cmbbmonth.AddItem MonthName(j) Next jFor j = 1930 To Year(Date) cmbbyear.AddItem j Next jIf cmbbmonth.Text = "January" Or cmbbmonth.Text = "March" Or cmbbmonth.Text = "May" Or cmbbmonth.Text = "July" Or cmbbmonth.Text = "August" Or cmbbmonth.Text = "Octover" Or cmbbmonth.Text = "December " Then For i = 1 To 31 cmbbday.AddItem i Next i ElseIf cmbbmonth.Text = "June" Or cmbbmonth.Text = "April" Or cmbbmonth.Text = "September" Or cmbbmonth.Text = "November" Then For i = 1 To 30 cmbbday.AddItem i Next i ElseIf cmbbmonth.Text = "February" Then For i = 1 To 28 cmbbday.AddItem i Next i End If Set Me.txtlrn.DataSource = rec Me.txtlrn.DataField = "LRN"Set Me.txtfname.DataSource = rec Me.txtfname.DataField = "Firstname" Set Me.txtmname.DataSource = rec Me.txtmname.DataField = "middlename" Set Me.txtlname.DataSource = rec Me.txtlname.DataField = "Lastname" Set Me.cmbbmonth.DataSource = rec Me.cmbbmonth.DataField = "BdayMonth" Set Me.cmbbyear.DataSource = rec Me.cmbbyear.DataField = "BdayYear" Set Me.cmbbday.DataSource = rec Me.cmbbday.DataField = "Bdayday" Set Me.cmbsex.DataSource = rec Me.cmbsex.DataField = "Sex" Set Me.txtbbarangay.DataSource = rec Me.txtbbarangay.DataField = "BPBarangay" Set Me.txtgaddress.DataSource = rec Me.txtgaddress.DataField = "GAddress" Set Me.txtmunicipality.DataSource = rec Me.txtmunicipality.DataField = "Municipal" Set Me.txtguardian.DataSource = rec Me.txtguardian.DataField = "Guardian" Set Me.txtgoccupation.DataSource = rec Me.txtgoccupation.DataField = "GOccupation" Set Me.txticc.DataSource = rec Me.txticc.DataField = "Icc" Set Me.txticcyear.DataSource = rec Me.txticcyear.DataField = "Iccyear" Set Me.txtgenav.DataSource = rec Me.txtgenav.DataField = "GenAv" Set Me.txtyie.DataSource = rec Me.txtyie.DataField = "yie" Me.txtgoccupation = ""Me.txtlrn.Text = ""Me.txtfname.Text = ""Me.txtlname.Text = ""Me.txtmname.Text = ""Me.cmbbmonth.Text = ""Me.cmbbday.Text = ""Me.cmbbyear.Text = ""Me.cmbsex.Text = ""Me.txtbbarangay.Text = ""Me.txtguardian.Text = ""Me.txtmunicipality.Text = ""Me.txtgaddress.Text = ""Me.txticc.Text = ""Me.txticcyear.Text = ""Me.txtgenav.Text = ""Me.txtyie.Text = "" End SubPrivate Sub addpyments_Click()frmaddpayments.ShowEnd SubPrivate Sub admin_Click()frmadminsecurity.ShowEnd SubPrivate Sub allstud_Click()frmViewForm137.ShowEnd SubPrivate Sub cal_Click()frmUpdateGrades.ShowEnd SubPrivate Sub pay_Click()frmsearch.ShowEnd SubPrivate Sub paymnt_Click()frmpayment.ShowEnd SubPrivate Sub Image1_Click()End SubPrivate Sub stud_Click()frmaddstud.ShowEnd SubPrivate Sub studinfo_Click()frmedit.ShowEnd SubPrivate Sub studinfos_Click()frmsearch.ShowEnd SubPrivate Sub tbCommands_ButtonClick(ByVal Button As MSComctlLib.Button)Select Case Button.Index Case 1 frmUpdateGrades.Show Case 2 frmViewForm137.Visible = True Case 3 Case 4 ext = MsgBox("Are you sure you want to log off now?", 32 + 4, "FLS- Log off") If ext = 6 Then Call MsgBox(frmmain.StatusBar1.Panels(2).Text & " has been log-out in the system." & vbNewLine & "Time of log-out " & Time, 64, "SPS - Log-out") Call logoff Else Exit Sub End If Case 5 frmsecurity.Show Case 6 ext = MsgBox("This will close the application.Do you want to proceed?", 32 + 4, "Exit") If ext = 6 Then Call MsgBox("Thank you for using this system.", 64, "Exit") End Else Cancel = 1 End IfEnd SelectEnd SubPrivate Sub logoff()Unload frmaddstudUnload frmsearchUnload frmsecurityfrmmain.tbCommands.Buttons(1).Enabled = Falsefrmmain.tbCommands.Buttons(2).Enabled = Falsefrmmain.tbCommands.Buttons(3).Enabled = Falsefrmmain.tbCommands.Buttons(4).Enabled = Falsefrmmain.tbCommands.Buttons(6).Enabled = Falsefrmmain.tbCommands.Buttons(5).Enabled = Truefrmmain.StatusBar1.Panels(2).Text = ""frmmain.StatusBar1.Panels(4).Text = ""frmmain.StatusBar1.Panels(6).Text = ""frmmain.fle.Enabled = Falsefrmmain.vw.Enabled = FalseEnd SubPrivate Sub Timer1_Timer()frmmain.StatusBar1.Panels(8).Text = TimeEnd SubPrivate Sub Text1_Change()If conn.State = 1 Then conn.Close conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source =" & App.Path & "\dbase.mdb" rec.CursorLocation = adUseClient rec.Open "SELECT * from tblstudinfo where " & Combo11.Text & " like '%" & Text11.Text & "%' ", conn, adOpenDynamic, adLockOptimistic Set DataGrid11.DataSource = recEnd SubPrivate Sub cmbusername_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenMe.txtpassword.SetFocusEnd IfEnd SubPrivate Sub cmdok_Click()Dim userId As StringDim username As String, password As String username = Me.cmbusername.Text password = txtpassword.Text Adodc1.CommandType = adCmdText Adodc1.RecordSource = "select * from tblusers where username = '" & username & "' and password = '" & password & "'" Adodc1.Refresh If Adodc1.Recordset.EOF = True Then MsgBox "Invalid Username or Password" cmbusername.SetFocus cmbusername.SelStart = 0 cmbusername.SelLength = Len(cmbusername.Text) txtpassword.SelStart = 0 txtpassword.SelLength = Len(txtpassword.Text) Exit Sub Else If Adodc1.Recordset!username = username And Adodc1.Recordset!password = password Then Me.Hide Call MsgBox("You are registered user, access granted.", 64, " Log in - Loan System") user = Me.cmbusername.Text Me.cmbusername.Text = "" txtpassword.Text = "" frmmain.StatusBar1.Panels(2).Text = user frmmain.StatusBar1.Panels(4).Text = FormatDateTime(Now, vbLongDate) frmmain.StatusBar1.Panels(6).Text = Time frmmain.tbCommands.Buttons(1).Enabled = True frmmain.tbCommands.Buttons(2).Enabled = True frmmain.tbCommands.Buttons(3).Enabled = True frmmain.tbCommands.Buttons(4).Enabled = True frmmain.tbCommands.Buttons(6).Enabled = True frmmain.tbCommands.Buttons(5).Enabled = False frmmain.fle.Enabled = True frmmain.vw.Enabled = True Else MsgBox "Invalid Username or Password", vbInformation cmbusername.SetFocus cmbusername.SelStart = 0 cmbusername.SelLength = Len(cmbusername.Text) txtpassword.SelStart = 0 txtpassword.SelLength = Len(txtpassword.Text) Exit Sub End If End IfEnd SubPrivate Sub Command2_Click()Unload MeEnd SubPrivate Sub Form_Load()Me.Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\dbase.mdb;Persist Security Info=False"Me.Adodc1.CommandType = adCmdTextMe.Adodc1.RecordSource = "Select * FROM tbluserS "Me.Adodc1.RefreshFor i = 0 To Me.Adodc1.Recordset.RecordCount - 1If Me.Adodc1.Recordset.EOF = False ThenMe.cmbusername.AddItem Me.Adodc1.Recordset!usernameEnd IfMe.Adodc1.Recordset.MoveNextNext iMe.Adodc1.RefreshEnd SubPrivate Sub txtpassword_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenMe.cmdok.SetFocusEnd IfEnd SubDim conn As New ADODB.ConnectionDim rec As New ADODB.RecordsetDim j, k As StringPrivate Sub cdexitgrade_Click()Unload MeEnd SubPrivate Sub cmbYearlevel_Click()Me.cmbsection.ClearIf Me.cmbYearlevel.Text = "First Year" ThenMe.cmbsection.AddItem "DALTON"Me.cmbsection.AddItem "EDISON"Me.cmbsection.AddItem "EINSTEIN"Me.cmbsection.AddItem "GALILIE"Me.cmbsection.AddItem "MENDELEEV"Me.cmbsection.AddItem "NEWTON"Me.cmbsection.AddItem "THOMSON"Me.txtfil(5).Text = "1.2"Me.txteng(5).Text = "1.5"Me.txtmath(5).Text = "1.5"Me.txtsci(5).Text = "1.8"Me.txtmakabayanue.Text = "4.2"Me.txttotalue.Text = "10.2"Me.txtsubject(0).Text = "Filipino I"Me.txtsubject(1).Text = "English I"Me.txtsubject(2).Text = "Math I"Me.txtsubject(3).Text = "Science I"Me.txtsubject(4).Text = "Makabayan I"Me.txtsubject(5).Text = "A.PAN I"Me.txtsubject(6).Text = "TLE I"Me.txtsubject(7).Text = "MAPEH I"Me.txtsubject(8).Text = "ESP I"Me.txtCATSubject.Visible = FalseMe.txtCAT.Visible = FalseMe.txtUECAT.Visible = FalseMe.txttobeclassifiedas.Text = "Second Year"Me.txttotalnumberofyearsinschooltodate.Text = "7"ElseIf Me.cmbYearlevel.Text = "Second Year" ThenMe.cmbsection.AddItem "CRIMSOM"Me.cmbsection.AddItem "CYAN"Me.cmbsection.AddItem "FUCHSIA"Me.cmbsection.AddItem "INDIGO"Me.cmbsection.AddItem "LAVENDER"Me.cmbsection.AddItem "SIENNA"Me.txtfil(5).Text = "1.2"Me.txteng(5).Text = "1.5"Me.txtmath(5).Text = "1.5"Me.txtsci(5).Text = "1.8"Me.txtmakabayanue.Text = "3.6"Me.txtep(5).Text = "0.6"Me.txttotalue.Text = "10.2"Me.txtsubject(0).Text = "Filipino II"Me.txtsubject(1).Text = "English II"Me.txtsubject(2).Text = "Math II"Me.txtsubject(3).Text = "Science II"Me.txtsubject(4).Text = "Makabayan II"Me.txtsubject(5).Text = "A.PAN II"Me.txtsubject(6).Text = "TLE II"Me.txtsubject(7).Text = "MAPEH II"Me.txtsubject(8).Text = "ESP II"Me.txtCATSubject.Visible = FalseMe.txtCAT.Visible = FalseMe.txtUECAT.Visible = FalseMe.txttobeclassifiedas.Text = "Third Year"Me.txttotalnumberofyearsinschooltodate.Text = "8"Me.txtep(5).Text = ".6"ElseIf Me.cmbYearlevel.Text = "Third Year" ThenMe.cmbsection.AddItem "DIAMOND"Me.cmbsection.AddItem "GARNET"Me.cmbsection.AddItem "JADE"Me.cmbsection.AddItem "OPAL"Me.cmbsection.AddItem "RUBY"Me.cmbsection.AddItem "TOPAZ"Me.txtfil(5).Text = "1.2"Me.txteng(5).Text = "1.5"Me.txtmath(5).Text = "1.5"Me.txtsci(5).Text = "1.8"Me.txtmakabayanue.Text = "3.6"Me.txtep(5).Text = "0.9"Me.txttotalue.Text = "10.5"Me.txtsubject(0).Text = "Filipino III"Me.txtsubject(1).Text = "English III"Me.txtsubject(2).Text = "Math III"Me.txtsubject(3).Text = "Science III"Me.txtsubject(4).Text = "Makabayan III"Me.txtsubject(5).Text = "A.PAN III"Me.txtsubject(6).Text = "TLE III"Me.txtsubject(7).Text = "MAPEH III"Me.txtsubject(8).Text = "ESP III"Me.txtCATSubject.Visible = FalseMe.txtCAT.Visible = FalseMe.txtUECAT.Visible = FalseMe.txttobeclassifiedas.Text = "Fourth Year"Me.txttotalnumberofyearsinschooltodate.Text = "9"ElseIf Me.cmbYearlevel.Text = "Fourth Year" ThenMe.cmbsection.AddItem "AGUINALDO"Me.cmbsection.AddItem "AQUINO"Me.cmbsection.AddItem "MABINI"Me.cmbsection.AddItem "MAGSAYSAY"Me.cmbsection.AddItem "RIZAL"Me.txtfil(5).Text = "1.2"Me.txteng(5).Text = "1.5"Me.txtmath(5).Text = "1.5"Me.txtsci(5).Text = "1.8"Me.txtmakabayanue.Text = "3.6"Me.txtep(5).Text = "0.9"Me.txttotalue.Text = "10.5"Me.txtUECAT.Text = "0.6"Me.txtsubject(0).Text = "Filipino IV"Me.txtsubject(1).Text = "English IV"Me.txtsubject(2).Text = "Math IV"Me.txtsubject(3).Text = "Science IV"Me.txtsubject(4).Text = "Makabayan IV"Me.txtsubject(5).Text = "A.PAN IV"Me.txtsubject(6).Text = "TLE IV"Me.txtsubject(7).Text = "MAPEH IV"Me.txtsubject(8).Text = "ESP IV"Me.txtCATSubject.Visible = TrueMe.txtCAT.Visible = TrueMe.txtUECAT.Visible = TrueMe.txttobeclassifiedas.Text = "First Year College"Me.txttotalnumberofyearsinschooltodate.Text = "10"Me.txtep(5).Text = ".9"End IfEnd SubPrivate Sub cmdclear_Click()Me.txtfil(4).Text = ""Me.txteng(4).Text = ""Me.txtmath(4).Text = ""Me.txtsci(4).Text = ""Me.txtmakabayan(4).Text = ""Me.txtapan(4).Text = ""Me.txttle(4).Text = ""Me.txtmapeh(4).Text = ""Me.txtep(4).Text = ""Me.txtCAT.Text = ""End SubPrivate Sub cmdOKgrade_Click() Me.Adodc1.CommandType = adCmdTextIf Me.cmbYearlevel.Text = "First Year" ThenMe.Adodc1.CommandType = adCmdTextMe.Adodc1.RecordSource = "Select * from Firstyear where lrn like '" & Trim(Me.txtlrnn.Text) & "%' " Me.Adodc1.RefreshIf Me.Adodc1.Recordset.EOF = True ThenMe.Adodc1.Recordset.AddNewWith Me.Adodc1.Recordset !Yearlevel = Me.cmbYearlevel.Text !schoolyear = Me.cmbSY.Text !school = Me.txtSchool.Text !Lrn = Me.txtlrnn.Text !Filipino = Me.txtsubject(0).Text !Filipinofinal = Me.txtfil(4).Text !filipinoue = Me.txtfil(5).Text !english = Me.txtsubject(1).Text !Englishfinal = Me.txteng(4).Text !englishue = Me.txteng(5).Text !Mathematics = Me.txtsubject(2).Text !Mathematicsfinal = Me.txtmath(4).Text !Mathematicsue = Me.txtmath(5).Text !Science = Me.txtsubject(3).Text !Sciencefinal = Me.txtsci(4).Text !Scienceue = Me.txtsci(5).Text !Makabayan = Me.txtsubject(4).Text !makabayanfinal = Me.txtmakabayan(4).Text !AralingPanlipunan = Me.txtsubject(5).Text !AralingPanlipunanfinal = Me.txtapan(4).Text !aralingPanlipunanue = Me.txtapan(5).Text !TLE = Me.txtsubject(6).Text !TLEfinal = Me.txttle(4).Text !tleue = Me.txttle(5).Text' !TLEat = Me.txttle(6).Text !Mapeh = Me.txtsubject(7).Text !Mapehfinal = Me.txtmapeh(4).Text !Mapehue = Me.txtmapeh(5).Text !Esp = Me.txtsubject(8).Text !ESPfinal = Me.txtep(4).Text !Espue = Me.txtep(5).Text ' !ESPat = Me.txtep(6).Text !totaldos = Me.txttotaldos.Text !totaldop = Me.txttotaldop.Text !Tobeclassifiedas = Me.txttobeclassifiedas.Text !lackunitsin = Me.txtlackunitsin.Text !advanceunitin = Me.txtadvanceunit.Text !totalnumberofyearsinschooltodate = Me.txttotalnumberofyearsinschooltodate.Text .Update MsgBox Me.txtname.Text + "Successsfuly Added in the Record", 48 Me.Adodc1.RefreshEnd WithMe.Adodc1.RefreshMe.Adodc1.CommandType = adCmdTextMe.Adodc1.RecordSource = "select * from FirstYear order by lrn and schoolyear "Me.Adodc1.RefreshElseMsgBox "Student has already grade in the same grading and same School Year.", 48Me.txtlrnn.SetFocusExit SubEnd IfElseIf Me.cmbYearlevel.Text = "Second Year" ThenMe.Adodc1.CommandType = adCmdTextMe.Adodc1.RecordSource = "Select * from Secondyear where lrn like '" & Trim(Me.txtlrnn.Text) & "' "Me.Adodc1.RefreshIf Me.Adodc1.Recordset.EOF = True ThenMe.Adodc1.Recordset.AddNewWith Me.Adodc1.Recordset !Yearlevel = Me.cmbYearlevel.Text !schoolyear = Me.cmbSY.Text !school = Me.txtSchool.Text !Lrn = Me.txtlrnn.Text !Filipino = Me.txtsubject(0).Text !Filipinofinal = Me.txtfil(4).Text !filipinoue = Me.txtfil(5).Text !english = Me.txtsubject(1).Text !Englishfinal = Me.txteng(4).Text !englishue = Me.txteng(5).Text' !Englishat = Me.txteng(6).Text !Mathematics = Me.txtsubject(2).Text !Mathematicsfinal = Me.txtmath(4).Text !Mathematicsue = Me.txtmath(5).Text' !Mathematicsat = Me.txtmath(6).Text !Science = Me.txtsubject(3).Text !Sciencefinal = Me.txtsci(4).Text !Scienceue = Me.txtsci(5).Text' !Scienceat = Me.txtsci(6).Text !Makabayan = Me.txtsubject(4).Text !makabayanfinal = Me.txtmakabayan(4).Text' !makabayanue = Me.txtmakabayan(5).Text' !makabayanat = Me.txtmakabayan(6).Text !AralingPanlipunan = Me.txtsubject(5).Text !AralingPanlipunanfinal = Me.txtapan(4).Text !aralingPanlipunanue = Me.txtapan(5).Text' !AralingPanlipunanat = Me.txtapan(6).Text !TLE = Me.txtsubject(6).Text !TLEfinal = Me.txttle(4).Text !tleue = Me.txttle(5).Text' !TLEat = Me.txttle(6).Text !Mapeh = Me.txtsubject(7).Text !Mapehfinal = Me.txtmapeh(4).Text !Mapehue = Me.txtmapeh(5).Text' !Mapehat = Me.txtmapeh(6).Text !Esp = Me.txtsubject(8).Text !ESPfinal = Me.txtep(4).Text !Espue = Me.txtep(5).Text' !ESPat = Me.txtep(6).Text !totaldos = Me.txttotaldos.Text !totaldop = Me.txttotaldop.Text !Tobeclassifiedas = Me.txttobeclassifiedas.Text !lackunitsin = Me.txtlackunitsin.Text !advanceunitin = Me.txtadvanceunit.Text !totalnumberofyearsinschooltodate = Me.txttotalnumberofyearsinschooltodate.Text .Update MsgBox Me.txtname.Text + "Successsfuly Added in the Record", 48 Me.Adodc1.RefreshEnd WithMe.Adodc1.RefreshMe.Adodc1.CommandType = adCmdTextMe.Adodc1.RecordSource = "select * from Secondyear order by lrn and schoolyear "Me.Adodc1.RefreshElseMsgBox "Student has already grade in the same grading and same School Year.", 48Exit SubEnd IfElseIf Me.cmbYearlevel.Text = "Third Year" ThenMe.Adodc1.CommandType = adCmdTextMe.Adodc1.RecordSource = "Select * from Thirdyear where lrn like '" & Trim(Me.txtlrnn.Text) & "' "Me.Adodc1.RefreshIf Me.Adodc1.Recordset.EOF = True ThenMe.Adodc1.Recordset.AddNewWith Me.Adodc1.Recordset !Yearlevel = Me.cmbYearlevel.Text !schoolyear = Me.cmbSY.Text !school = Me.txtSchool.Text !Lrn = Me.txtlrnn.Text !Filipino = Me.txtsubject(0).Text !Filipinofinal = Me.txtfil(4).Text !filipinoue = Me.txtfil(5).Text ' !Filipinoat = Me.txtfil(6).Text !english = Me.txtsubject(1).Text !Englishfinal = Me.txteng(4).Text !englishue = Me.txteng(5).Text' !Englishat = Me.txteng(6).Text !Mathematics = Me.txtsubject(2).Text !Mathematicsfinal = Me.txtmath(4).Text !Mathematicsue = Me.txtmath(5).Text' !Mathematicsat = Me.txtmath(6).Text !Science = Me.txtsubject(3).Text !Sciencefinal = Me.txtsci(4).Text !Scienceue = Me.txtsci(5).Text' !Scienceat = Me.txtsci(6).Text !Makabayan = Me.txtsubject(4).Text !makabayanfinal = Me.txtmakabayan(4).Text' !makabayanue = Me.txtmakabayan(5).Text' !makabayanat = Me.txtmakabayan(6).Text !AralingPanlipunan = Me.txtsubject(5).Text !AralingPanlipunanfinal = Me.txtapan(4).Text !aralingPanlipunanue = Me.txtapan(5).Text' !AralingPanlipunanat = Me.txtapan(6).Text !TLE = Me.txtsubject(6).Text !TLEfinal = Me.txttle(4).Text !tleue = Me.txttle(5).Text' !TLEat = Me.txttle(6).Text !Mapeh = Me.txtsubject(7).Text !Mapehfinal = Me.txtmapeh(4).Text !Mapehue = Me.txtmapeh(5).Text' !Mapehat = Me.txtmapeh(6).Text !Esp = Me.txtsubject(8).Text !ESPfinal = Me.txtep(4).Text !Espue = Me.txtep(5).Text' !ESPat = Me.txtep(6).Text !totaldos = Me.txttotaldos.Text !totaldop = Me.txttotaldop.Text !Tobeclassifiedas = Me.txttobeclassifiedas.Text !lackunitsin = Me.txtlackunitsin.Text !advanceunitin = Me.txtadvanceunit.Text !totalnumberofyearsinschooltodate = Me.txttotalnumberofyearsinschooltodate.Text .Update MsgBox Me.txtname.Text + "Successsfuly Added in the Record", 48 Me.Adodc1.RefreshEnd WithMe.Adodc1.RefreshMe.Adodc1.CommandType = adCmdTextMe.Adodc1.RecordSource = "select * from Thirdyear order by lrn and schoolyear "Me.Adodc1.RefreshElseMsgBox "Student has already grade in the same grading and same School Year.", 48Exit SubEnd IfElseIf Me.cmbYearlevel.Text = "Fourth Year" ThenMe.Adodc1.CommandType = adCmdTextMe.Adodc1.RecordSource = "Select * from Fourthyear where lrn like '" & Trim(Me.txtlrnn.Text) & "' "Me.Adodc1.RefreshIf Me.Adodc1.Recordset.EOF = True ThenMe.Adodc1.Recordset.AddNewWith Me.Adodc1.Recordset !Yearlevel = Me.cmbYearlevel.Text !schoolyear = Me.cmbSY.Text !school = Me.txtSchool.Text !Lrn = Me.txtlrnn.Text !Filipino = Me.txtsubject(0).Text !Filipinofinal = Me.txtfil(4).Text !filipinoue = Me.txtfil(5).Text' !Filipinoat = Me.txtfil(6).Text !english = Me.txtsubject(1).Text !Englishfinal = Me.txteng(4).Text !englishue = Me.txteng(5).Text' !Englishat = Me.txteng(6).Text !Mathematics = Me.txtsubject(2).Text !Mathematicsfinal = Me.txtmath(4).Text !Mathematicsue = Me.txtmath(5).Text' !Mathematicsat = Me.txtmath(6).Text !Science = Me.txtsubject(3).Text !Sciencefinal = Me.txtsci(4).Text !Scienceue = Me.txtsci(5).Text' !Scienceat = Me.txtsci(6).Text !Makabayan = Me.txtsubject(4).Text !makabayanfinal = Me.txtmakabayan(4).Text' !makabayanue = Me.txtmakabayan(5).Text' !makabayanat = Me.txtmakabayan(6).Text !AralingPanlipunan = Me.txtsubject(5).Text !AralingPanlipunanfinal = Me.txtapan(4).Text !aralingPanlipunanue = Me.txtapan(5).Text ' !AralingPanlipunanat = Me.txtapan(6).Text !TLE = Me.txtsubject(6).Text !TLEfinal = Me.txttle(4).Text !tleue = Me.txttle(5).Text' !TLEat = Me.txttle(6).Text !Mapeh = Me.txtsubject(7).Text !Mapehfinal = Me.txtmapeh(4).Text !Mapehue = Me.txtmapeh(5).Text' !Mapehat = Me.txtmapeh(6).Text !Esp = Me.txtsubject(8).Text !ESPfinal = Me.txtep(4).Text !Espue = Me.txtep(5).Text' !ESPat = Me.txtep(6).Text !CAT = Me.txtCATSubject.Text !CATfinal = Me.txtCAT.Text !CATUE = Me.txtUECAT.Text !totaldos = Me.txttotaldos.Text !totaldop = Me.txttotaldop.Text !Tobeclassifiedas = Me.txttobeclassifiedas.Text !lackunitsin = Me.txtlackunitsin.Text !advanceunitin = Me.txtadvanceunit.Text !totalnumberofyearsinschooltodate = Me.txttotalnumberofyearsinschooltodate.Text .Update MsgBox Me.txtname.Text + "Successsfuly Added in the Record", 48 Me.Adodc1.RefreshEnd WithMe.Adodc1.RefreshMe.Adodc1.CommandType = adCmdTextMe.Adodc1.RecordSource = "select * from fourthyear order by lrn and schoolyear "Me.Adodc1.RefreshElseMsgBox "Student has already grade in the same grading and same School Year.", 48Me.txtlrnn.SetFocusExit SubEnd IfEnd IfEnd SubPrivate Sub Form_Load()Me.Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\dbase.mdb;Persist Security Info=False"Me.cmbYearlevel.AddItem "First Year"Me.cmbYearlevel.AddItem "Second Year"Me.cmbYearlevel.AddItem "Third Year"Me.cmbYearlevel.AddItem "Fourth Year"Me.txtCATSubject.Visible = FalseMe.txtCAT.Visible = FalseMe.txtUECAT.Visible = FalseEnd SubPrivate Sub optfinalrating_Click() Me.txtfil.Text = "" Me.txteng.Text = "" Me.txtmath.Text = "" Me.txtsci.Text = "" Me.txtmakabayan.Text = "" Me.txtapan.Text = "" Me.txtmapeh.Text = "" Me.txttle.Text = "" Me.txtep.Text = "" Me.optsecondgrading.Enabled = False Me.optthirdgrading.Enabled = False Me.optfourthgrading.Enabled = False Me.optsecondgrading.Enabled = FalseEnd SubPrivate Sub optfirstgrading_Click() Me.txtfil.Text = "" Me.txteng.Text = "" Me.txtmath.Text = "" Me.txtsci.Text = "" Me.txtmakabayan.Text = "" Me.txtapan.Text = "" Me.txtmapeh.Text = "" Me.txttle.Text = "" Me.txtep.Text = "" Me.optsecondgrading.Enabled = False Me.optthirdgrading.Enabled = False Me.optfourthgrading.Enabled = False Me.optfinalrating.Enabled = FalseEnd SubPrivate Sub optfourthgrading_Click() Me.txtfil.Text = "" Me.txteng.Text = "" Me.txtmath.Text = "" Me.txtsci.Text = "" Me.txtmakabayan.Text = "" Me.txtapan.Text = "" Me.txtmapeh.Text = "" Me.txttle.Text = "" Me.txtep.Text = "" Me.optsecondgrading.Enabled = False Me.optthirdgrading.Enabled = False Me.optfirstgrading.Enabled = False Me.optfinalrating.Enabled = FalseEnd SubPrivate Sub optsecondgrading_Click() Me.txtfil.Text = "" Me.txteng.Text = "" Me.txtmath.Text = "" Me.txtsci.Text = "" Me.txtmakabayan.Text = "" Me.txtapan.Text = "" Me.txtmapeh.Text = "" Me.txttle.Text = "" Me.txtep.Text = "" Me.optfirstgrading.Enabled = False Me.optthirdgrading.Enabled = False Me.optfourthgrading.Enabled = False Me.optfinalrating.Enabled = FalseEnd SubPrivate Sub optthirdgrading_Click() Me.txtfil.Text = "" Me.txteng.Text = "" Me.txtmath.Text = "" Me.txtsci.Text = "" Me.txtmakabayan.Text = "" Me.txtapan.Text = "" Me.txtmapeh.Text = "" Me.txttle.Text = "" Me.txtep.Text = "" Me.optfirstgrading.Enabled = False Me.optsecondgrading.Enabled = False Me.optfourthgrading.Enabled = False Me.optfinalrating.Enabled = FalseEnd SubPrivate Sub txtadvanceunit_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenMe.txttotalnumberofyearsinschooltodate.SetFocusEnd IfEnd SubPrivate Sub txtapan_KeyPress(Index As Integer, KeyAscii As Integer)If KeyAscii = 13 ThenIf Me.txtapan(4).Text = "" Then MsgBox "Please input grade!!!", vbInformation Me.txtapan(4).SetFocusElseIf Me.txtapan(4).Text >= 100 ThenMsgBox "Invalid Grade", vbOKOnlyEnd IfEnd IfEnd SubPrivate Sub txteng_KeyPress(Index As Integer, KeyAscii As Integer)If KeyAscii = 13 ThenIf Me.txteng(4).Text = "" Then MsgBox "Please input grade!!!", vbInformation Me.txteng(4).SetFocusElseIf Me.txteng(4).Text >= 100 ThenMsgBox "Invalid Grade", vbOKOnlyEnd IfEnd IfEnd SubPrivate Sub txtep_KeyPress(Index As Integer, KeyAscii As Integer)If KeyAscii = 13 ThenIf Me.txtep(4).Text = "" Then MsgBox "Please input grade!!!", vbInformation Me.txtep(4).SetFocusElseIf Me.txtep(4).Text >= 100 ThenMsgBox "Invalid Grade", vbOKOnlyEnd IfEnd IfEnd SubPrivate Sub txtfil_KeyPress(Index As Integer, KeyAscii As Integer)If KeyAscii = 13 Then If Me.txtfil(4).Text = "" Then MsgBox "Please input grade!!!", vbInformation Me.txtfil(4).SetFocus ElseIf Me.txtfil(4).Text >= 100 Then MsgBox "Invalid Grade", vbOKOnly End IfEnd IfEnd SubPrivate Sub txtlackunitsin_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenMe.txtadvanceunit.SetFocusEnd IfEnd SubPrivate Sub txtmakabayan_KeyPress(Index As Integer, KeyAscii As Integer)If KeyAscii = 13 ThenIf Me.txtmakabayan(4).Text = "" Then MsgBox "Please input grade!!!", vbInformation Me.txtmakabayan(4).SetFocusElseIf Me.txtmakabayan(4).Text >= 100 ThenMsgBox "Invalid Grade", vbOKOnlyEnd IfEnd IfEnd SubPrivate Sub txtmapeh_KeyPress(Index As Integer, KeyAscii As Integer)If KeyAscii = 13 ThenIf Me.txtmapeh(4).Text >= 100 ThenMsgBox "Invalid Grade", vbOKOnlyEnd IfEnd IfEnd SubPrivate Sub txtmath_KeyPress(Index As Integer, KeyAscii As Integer)If KeyAscii = 13 ThenIf Me.txtmath(4).Text = "" Then MsgBox "Please input grade!!!", vbInformation Me.txtmath(4).SetFocusElseIf Me.txtmath(4).Text >= 100 ThenMsgBox "Invalid Grade", vbOKOnlyEnd IfEnd IfEnd SubPrivate Sub txtname_Change()Me.Adodc1.CommandType = adCmdTextMe.Adodc1.RecordSource = "Select * from tblstudinfo where " & Combo1.Text & " like '" & Trim(Me.txtname.Text) & Trim("%") & "' "'"SELECT * from STUDENTS where " & Combo1.Text & " like '" & Text1.Text & "%' "'Me.Adodc1.RefreshIf Me.Adodc1.Recordset.EOF = False ThenMe.ListView1.ListItems.ClearWhile Me.Adodc1.Recordset.EOF = FalseMe.txtlrnn.Text = "" With Me.Adodc1.Recordset Me.ListView1.ColumnHeaders(1).Text = "Student Name" ListView1.ListItems.Add , , !Lastname & " ," & !firstname k = !Lastname & " ," & !firstname & " " & Mid(!middlename, 1, 1) j = !Lrn Me.txtlrnn.Text = j .MoveNext End With WendEnd IfIf Me.Adodc1.Recordset.EOF = True ThenIf KeyAscii = 13 ThenMsgBox "Invalid, Student does not exist in the records!", vbAbortRetryIgnoreEnd IfEnd IfEnd SubPrivate Sub txtname_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenMe.txtlrnn.Text = jMe.txtname.Text = kEnd IfEnd SubPrivate Sub txtsci_KeyPress(Index As Integer, KeyAscii As Integer)If KeyAscii = 13 ThenIf Me.txtsci(4).Text = "" Then MsgBox "Please input grade!!!", vbInformation Me.txtsci(4).SetFocusElseIf Me.txtsci(4).Text = 75 ThenMe.txtsci(6).Text = "Passed"Me.txtmakabayan(4).SetFocusElseIf Me.txtsci(4).Text >= 100 ThenMsgBox "Invalid Grade", vbOKOnlyEnd IfEnd IfEnd SubPrivate Sub txttle_KeyPress(Index As Integer, KeyAscii As Integer)If KeyAscii = 13 ThenIf Me.txttle(4).Text = "" Then MsgBox "Please input grade!!!", vbInformation Me.txttle(4).SetFocusElseIf Me.txttle(4).Text = 75 ThenMe.txttle(6).Text = "Passed"Me.txtmapeh(4).SetFocusElseIf Me.txttle(4).Text >= 100 ThenMsgBox "Invalid Grade", vbOKOnlyEnd IfEnd IfEnd SubPrivate Sub txttobeclassifiedas_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenMe.txtlackunitsin.SetFocusEnd IfEnd SubPrivate Sub txttotaldop_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenMe.txttobeclassifiedas.SetFocusEnd IfEnd SubPrivate Sub txttotaldos_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenMe.txttotaldop.SetFocusEnd IfEnd SubPrivate Sub txttotalnumberofyearsinschooltodate_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenMe.cmdokgrade.SetFocusEnd IfEnd SubDim k, j, compname, full As StringDim totalcredits, totalcredits2, totalcredits3, totalcredits4 As DoublePrivate Sub cmdok_Click()Me.Adodc1.CommandType = adCmdTextMe.Adodc1.RecordSource = "SELECT * from tblstudinfo where tblstudinfo.lrn like '" & Trim(Me.txtlrnn.Text) & "' "Me.Adodc1.RefreshIf Me.Adodc1.Recordset.EOF = False ThenWith Me.Adodc1.Recordset compname = !Lastname + ", " + !firstname + " " + Left(!middlename, 1) full = compname printing.nameCompleteLabel.Caption = UCase(compname) printing.OccuLabel.Caption = !GOccupation printing.parentAddressLabel.Caption = !GAddress printing.parentLabel.Caption = UCase(!Guardian) printing.yearLabel.Caption = !BdayYear printing.monthLabel.Caption = !BdayMonth printing.dayLabel.Caption = !Bdayday printing.citylabel.Caption = !Municipal printing.brgyLabel.Caption = !BPBarangay printing.InterLabel.Caption = !Icc printing.yearGradLabel.Caption = !Iccyear printing.genAveLabel.Caption = !GenAv printing.yearGradLabel.Caption = !yie End WithEnd IfMe.Adodc1.CommandType = adCmdTextMe.Adodc1.RecordSource = "SELECT * from firstyear where firstyear.lrn like '" & Trim(Me.txtlrnn.Text) & "' "Me.Adodc1.RefreshIf Me.Adodc1.Recordset.EOF = False ThenWith Me.Adodc1.Recordset printing.gradeLabel(0).Caption = !Filipinofinal printing.gradeLabel(1).Caption = !Englishfinal printing.gradeLabel(2).Caption = !Mathematicsfinal printing.gradeLabel(3).Caption = !Sciencefinal printing.gradeLabel(4).Caption = !makabayanfinal printing.gradeLabel(5).Caption = !AralingPanlipunanfinal printing.gradeLabel(6).Caption = !TLEfinal printing.gradeLabel(7).Caption = !Mapehfinal printing.gradeLabel(8).Caption = !ESPfinal printing.schoolLabel.Caption = !school printing.syLabel.Caption = !schoolyear printing.Curlabel.Caption = !Yearlevel printing.numberOfdaysLabel.Caption = !totaldos printing.presentLabel.Caption = !totaldop ' printing.actionlabel(0).Caption = !Filipinoat 'printing.actionlabel(1).Caption = !Englishat ' printing.actionlabel(2).Caption = !Mathematicsat ' printing.actionlabel(3).Caption = !Scienceat ' printing.actionlabel(4).Caption = !makabayanat ' printing.actionlabel(5).Caption = !AralingPanlipunanat ' printing.actionlabel(6).Caption = !TLEat ' printing.actionlabel(7).Caption = !Mapehat ' printing.actionlabel(8).Caption = !ESPat printing.creditLabel(0).Caption = !filipinoue printing.creditLabel(1).Caption = !englishue printing.creditLabel(2).Caption = !Mathematicsue printing.creditLabel(3).Caption = !Scienceue 'printing.creditLabel(4).Caption = !makabayanue printing.creditLabel(5).Caption = !aralingPanlipunanue printing.creditLabel(6).Caption = !tleue printing.creditLabel(7).Caption = !Mapehue printing.creditLabel(8).Caption = !Espue printing.numberOfdaysLabel.Caption = !totaldos printing.presentLabel.Caption = !totaldop 'totalcredits = Val(!filipinoue) + Val(!englishue) + Val(!Mathematicsue) + Val(!Scienceue) + Val(!makabayanue) + Val(!aralingPanlipunanue) + Val(!tleue) + Val(!Mapehue) + Val(!Espue) printing.totalLabel.Caption = totalcredits printing.LackUnitLabel.Caption = !lackunitsin printing.advUnitLabel.Caption = !advanceunitin printing.classAsLabel.Caption = !Tobeclassifiedas printing.subjectLabel(0).Caption = !Filipino printing.subjectLabel(1).Caption = !english printing.subjectLabel(2).Caption = !Mathematics printing.subjectLabel(3).Caption = !Science printing.subjectLabel(4).Caption = !Makabayan printing.subjectLabel(5).Caption = !AralingPanlipunan printing.subjectLabel(6).Caption = !TLE printing.subjectLabel(7).Caption = !Mapeh printing.subjectLabel(8).Caption = !Esp End WithElseprinting.lblnoentries1.Visible = TrueEnd IfMe.Adodc1.CommandType = adCmdTextMe.Adodc1.RecordSource = "SELECT * from secondyear where secondyear.lrn like '" & Trim(Me.txtlrnn.Text) & "' "Me.Adodc1.RefreshIf Me.Adodc1.Recordset.EOF = False ThenWith Me.Adodc1.Recordset printing.rating2Label(0).Caption = !Filipinofinal printing.rating2Label(1).Caption = !Englishfinal printing.rating2Label(2).Caption = !Mathematicsfinal printing.rating2Label(3).Caption = !Sciencefinal printing.rating2Label(4).Caption = !makabayanfinal printing.rating2Label(5).Caption = !AralingPanlipunanfinal printing.rating2Label(6).Caption = !TLEfinal printing.rating2Label(7).Caption = !Mapehfinal printing.rating2Label(8).Caption = !ESPfinal printing.school2Label.Caption = !school printing.sy2Label.Caption = !schoolyear printing.curYear2Label.Caption = !Yearlevel printing.day4Label.Caption = !totaldos printing.present3Label.Caption = !totaldop ' printing.actionTakenLabel(0).Caption = !Filipinoat 'printing.actionTakenLabel(1).Caption = !Englishat ' printing.actionTakenLabel(2).Caption = !Mathematicsat ' printing.actionTakenLabel(3).Caption = !Scienceat ' printing.actionTakenLabel(4).Caption = !makabayanat 'printing.actionTakenLabel(5).Caption = !AralingPanlipunanat 'printing.actionTakenLabel(6).Caption = !TLEat 'printing.actionTakenLabel(7).Caption = !Mapehat ' printing.actionTakenLabel(8).Caption = !ESPat printing.credit1Label(0).Caption = !filipinoue printing.credit1Label(1).Caption = !englishue printing.credit1Label(2).Caption = !Mathematicsue printing.credit1Label(3).Caption = !Scienceue 'printing.credit1Label(4).Caption = !makabayanue printing.credit1Label(5).Caption = !aralingPanlipunanue printing.credit1Label(6).Caption = !tleue printing.credit1Label(7).Caption = !Mapehue printing.credit1Label(8).Caption = !Espue printing.numberOfDays2Label.Caption = !totaldos printing.present2Label.Caption = !totaldop 'totalcredits2 = Val(!filipinoue) + Val(!englishue) + Val(!Mathematicsue) + Val(!Scienceue) + Val(!makabayanue) + Val(!aralingPanlipunanue) + Val(!tleue) + Val(!Mapehue) + Val(!Espue) printing.total2Label.Caption = totalcredits2 printing.lackOfUnit2Label.Caption = !lackunitsin printing.advUnit2Label.Caption = !advanceunitin printing.classAs2Label.Caption = !Tobeclassifiedas printing.subject2Label(0).Caption = !Filipino printing.subject2Label(1).Caption = !english printing.subject2Label(2).Caption = !Mathematics printing.subject2Label(3).Caption = !Science printing.subject2Label(4).Caption = !Makabayan printing.subject2Label(5).Caption = !AralingPanlipunan printing.subject2Label(6).Caption = !TLE printing.subject2Label(7).Caption = !Mapeh printing.subject2Label(8).Caption = !Esp End WithElseprinting.lblnoentries2.Visible = TrueEnd IfMe.Adodc1.CommandType = adCmdTextMe.Adodc1.RecordSource = "SELECT * from Thirdyear where Thirdyear.lrn like '" & Trim(Me.txtlrnn.Text) & "' "Me.Adodc1.RefreshIf Me.Adodc1.Recordset.EOF = False ThenWith Me.Adodc1.Recordset printing.rating3Label(0).Caption = !Filipinofinal printing.rating3Label(1).Caption = !Englishfinal printing.rating3Label(2).Caption = !Mathematicsfinal printing.rating3Label(3).Caption = !Sciencefinal printing.rating3Label(4).Caption = !makabayanfinal printing.rating3Label(5).Caption = !AralingPanlipunanfinal printing.rating3Label(6).Caption = !TLEfinal printing.rating3Label(7).Caption = !Mapehfinal printing.rating3Label(8).Caption = !ESPfinal printing.school3Label.Caption = !school printing.sy3Label.Caption = !schoolyear printing.curYear3Label.Caption = !Yearlevel ' printing.action3Label(0).Caption = !Filipinoat' printing.action3Label(1).Caption = !Englishat' printing.action3Label(2).Caption = !Mathematicsat' printing.action3Label(3).Caption = !Scienceat' printing.action3Label(4).Caption = !makabayanat' printing.action3Label(5).Caption = !AralingPanlipunanat' printing.action3Label(6).Caption = !TLEat' printing.action3Label(7).Caption = !Mapehat' printing.action3Label(8).Caption = !ESPat printing.credit4Label(0).Caption = !filipinoue printing.credit4Label(1).Caption = !englishue printing.credit4Label(2).Caption = !Mathematicsue printing.credit4Label(3).Caption = !Scienceue 'printing.credit4Label(4).Caption = !makabayanue printing.credit4Label(5).Caption = !aralingPanlipunanue printing.credit4Label(6).Caption = !tleue printing.credit4Label(7).Caption = !Mapehue printing.credit4Label(8).Caption = !Espue printing.day4Label.Caption = !totaldos printing.present3Label.Caption = !totaldop ' totalcredits3 = Val(!filipinoue) + Val(!englishue) + Val(!Mathematicsue) + Val(!Scienceue) + Val(!makabayanue) + Val(!aralingPanlipunanue) + Val(!tleue) + Val(!Mapehue) + Val(!Espue) printing.total3Label.Caption = totalcredits3 printing.lackUnit3Label.Caption = !lackunitsin printing.advUnit3Label.Caption = !advanceunitin printing.classAs3Label.Caption = !Tobeclassifiedas printing.subject3label(0).Caption = !Filipino printing.subject3label(1).Caption = !english printing.subject3label(2).Caption = !Mathematics printing.subject3label(3).Caption = !Science printing.subject3label(4).Caption = !Makabayan printing.subject3label(5).Caption = !AralingPanlipunan printing.subject3label(6).Caption = !TLE printing.subject3label(7).Caption = !Mapeh printing.subject3label(8).Caption = !Esp End WithElseprinting.lblnoentries3.Visible = TrueEnd IfMe.Adodc1.CommandType = adCmdTextMe.Adodc1.RecordSource = "SELECT * from fourthyear where fourthyear.lrn like '" & Trim(Me.txtlrnn.Text) & "' "Me.Adodc1.RefreshIf Me.Adodc1.Recordset.EOF = False ThenWith Me.Adodc1.Recordset printing.rate4Label(0).Caption = !Filipinofinal printing.rate4Label(1).Caption = !Englishfinal printing.rate4Label(2).Caption = !Mathematicsfinal printing.rate4Label(3).Caption = !Sciencefinal printing.rate4Label(4).Caption = !makabayanfinal printing.rate4Label(5).Caption = !AralingPanlipunanfinal printing.rate4Label(6).Caption = !TLEfinal printing.rate4Label(7).Caption = !Mapehfinal printing.rate4Label(8).Caption = !ESPfinal printing.rate4Label(9).Caption = !CATfinal printing.school4Label.Caption = !school printing.sy4Label.Caption = !schoolyear printing.cur4Label.Caption = !Yearlevel printing.day4Label.Caption = !totaldos printing.present4Label.Caption = !totaldop' printing.action4Label(0).Caption = !Filipinoat' printing.action4Label(1).Caption = !Englishat' printing.action4Label(2).Caption = !Mathematicsat' printing.action4Label(3).Caption = !Scienceat' printing.action4Label(4).Caption = !makabayanat' printing.action4Label(5).Caption = !AralingPanlipunanat' printing.action4Label(6).Caption = !TLEat' printing.action4Label(7).Caption = !Mapehat' printing.action4Label(8).Caption = !ESPat' printing.action4Label(9).Caption = !CATAT printing.cred4Label(0).Caption = !filipinoue printing.cred4Label(1).Caption = !englishue printing.cred4Label(2).Caption = !Mathematicsue printing.cred4Label(3).Caption = !Scienceue' printing.cred4Label(4).Caption = !makabayanue printing.cred4Label(5).Caption = !aralingPanlipunanue printing.cred4Label(6).Caption = !tleue printing.cred4Label(7).Caption = !Mapehue printing.cred4Label(8).Caption = !Espue printing.cred4Label(9).Caption = !CATUE printing.days4Label.Caption = !totaldos printing.present3Label.Caption = !totaldop' totalcredits4 = Val(!filipinoue) + Val(!englishue) + Val(!Mathematicsue) + Val(!Scienceue) + Val(!makabayanue) + Val(!aralingPanlipunanue) + Val(!tleue) + Val(!Mapehue) + Val(!Espue) printing.total4Label.Caption = totalcredits4 printing.lackUnit4Label.Caption = !lackunitsin printing.advUnit4Label.Caption = !advanceunitin printing.classAs4Label.Caption = !Tobeclassifiedas printing.subject4Label(0).Caption = !Filipino printing.subject4Label(1).Caption = !english printing.subject4Label(2).Caption = !Mathematics printing.subject4Label(3).Caption = !Science printing.subject4Label(4).Caption = !Makabayan printing.subject4Label(5).Caption = !AralingPanlipunan printing.subject4Label(6).Caption = !TLE printing.subject4Label(7).Caption = !Mapeh printing.subject4Label(8).Caption = !Esp End WithElseprinting.lblnoentries4.Visible = TrueEnd Ifprinting.ShowEnd SubPrivate Sub Form_Load()Me.Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\dbase.mdb;Persist Security Info=False"End SubPrivate Sub txtname_Change()Me.Adodc1.CommandType = adCmdTextMe.Adodc1.RecordSource = "Select * from tblstudinfo where Lastname like '" & Trim(Me.txtname.Text) & Trim("%") & "' " '"SELECT * from STUDENTS where " & Combo1.Text & " like '%" & Text1.Text & "%' " Me.Adodc1.RefreshIf Me.Adodc1.Recordset.EOF = False ThenMe.ListView1.ListItems.ClearWhile Me.Adodc1.Recordset.EOF = FalseMe.txtlrnn.Text = "" With Me.Adodc1.Recordset Me.ListView1.ColumnHeaders(1).Text = "Student Name" ListView1.ListItems.Add , , !Lastname & " ," & !firstname k = !Lastname & " ," & !firstname & " " & Mid(!middlename, 1, 1) j = !Lrn Me.txtlrnn.Text = j .MoveNext End With WendEnd IfEnd SubPrivate Sub txtname_KeyPress(KeyAscii As Integer)If KeyAscii = 13 ThenMe.txtlrnn.Text = jMe.txtname.Text = kEnd IfEnd SubPrivate Sub MDIForm_Load() mnuClosePreview.Visible = True mnuprint.Visible = True' mainLogo.ShowEnd SubPrivate Sub mnuAbout_Click() frmAbout.Show 1, MeEnd SubPrivate Sub mnuClosePreview_Click() Unload printing End SubPrivate Sub mnuExit_Click() EndEnd SubPrivate Sub mnuForm1137_Click() flag = 5 ViewFrom.ShowEnd SubPrivate Sub mnuGrade_Click() flag = 4 MainFom.StatusBar1.Panels(6).Text = "Updating Grades" ViewFrom.ShowEnd SubPrivate Sub mnuInfo_Click() flag = 3 ViewFrom.ShowEnd SubPrivate Sub mnuNewStudent_Click() flag = 4 StatusBar1.Panels(6).Text = "Add New Student" NewStudentForm.Show 1, MainFom End SubPrivate Sub mnuprint_Click() On Error GoTo ERROR1 printing.PrintForm Unload printing ENDING: Exit Sub MsgBox "No Printer Installed", vbExclamation, "Printer Error" ERROR1: GoTo ENDING End SubPrivate Sub mnuView_Click() flag = 0 StatusBar1.Panels(6).Text = "View Student Records" ViewFrom.Show End SubDim cr As DoubleDim a As StringPrivate Sub Form_Load() total4Label.Top = 4550 Me.Height = 18500 Dim cert As String a = UCase(full) a = frmViewForm137.txtname.Text cert = " I certify that this is a true record of " + a + ". This student is eligible on this day of " + _ Format(Date, "dd mmmm yyyy") + " " + " for admission to" + _ " to First Year College as a regular student and has no property responsibilty in this school." certLabel.Caption = certMe.lblnoentries1.Visible = FalseMe.lblnoentries2.Visible = FalseMe.lblnoentries3.Visible = FalseMe.lblnoentries4.Visible = FalseEnd SubPrivate Sub mnuExit_Click() Me.Hide MainFom.ShowEnd SubPrivate Sub mnuprint_Click() On Error Resume Next Me.PrintForm Unload Me End SubPrivate Sub printButon_Click() Me.Hide ViewFrom.ShowEnd SubPrivate Sub Form_Unload(Cancel As Integer) MainFom.mnuprint.Visible = False MainFom.mnuClosePreview.Visible = FalseEnd Sub


Recommended