Computerized Elementary Enrollment System

Submitted To: Mr. Jojo A. Lacanlale THEODBS Instructor

Submitted By: Earl Jomel Vitor Joshua Fontabla Ghescel Ungriano Jeffrey Olivo

Table of Contents
ACKNOWLEDGEMENT EXCLUSIVE SUMMARY Phase 1: 1.1 1.2 Phase 2: 2.1 2.2 2.3 Phase 3: 3.1 Database Model Database Name Entity-Relationship Diagram Database Design Database Normalization Process Database Schema MySQL Code Database Population Database Structure 3.1.1 Navicat 3.1.2 MS Access 3.2 3.3 Phase 4: 4.1 4.2 4.3 Populated Tables Queries & Resulting Tables Final Project Project Modules & Functionalities Screen Design/Snapshot Source Code

APPENDIXES REFERENCES

ACKNOWLEDGEMENT

I want to thank to myself first because of hard-work and because of my computer is destroyed by a virus, I decide first to set my schedule for computer laboratory but unfortunately, the computer laboratory is closed because of pre-final examination, so I decide to rent the computer shop to my handsome friend and I install MySQL temporary in that same computer shop, but I have only one problem in that time, I don’t have Navicat in my USB Flash Drive so I decide to finish the Phase 1, Phase 2, and some Phase 3 first and after that, I will go to computer laboratory in 303 to finish all before the submission, and for now on, I have Phase 1 to Phase 3 at the time that I passed it my instructor but my only problem is the financial because I have many expenses not only in this baby-thesis also that time I don’t have money but thanks to my new 3 cooperative members. They are Joshua Fontabla, Ghescel Ungriano and Jeffrey Olivo for helping me for financial aid and I whispered “EJ Vitor can’t stand alone but can’t never alone anymore, I have new 3 member so that they can help me not only in financial aid but also they can help me to give me some tips and ideas about documentation and were do they best to finish all before the final defense.”. During the time of Typhoon Ondoy, I don’t have a time to do this, because of brownout, my family is under cleaning operation and me too and actually my computer is still under repairing. Then after the Typhoon Pepeng is leaving from the country, I concentrate on encoding of Microsoft Visual Basic 6.0 to finish all and before Sportsfest, I finished all of encoding including connecting to database in MYSQL thanks to one of my classmate in BS301A that some of my classmates codes are I really interested that I see of his codes and I put it to my system and thanks to my little brother whom he finished repairing the computer and Yes, my computer is already repaired and I want to use again “Yehey!” . During the time of Sportsfest, I can’t see my friends during that time, I decide to not go on Sportsfest anymore instead I call my 3 cooperative to finished and helping me to finish at the rest of documentation. Also, I want to thank also to my friend in my renting shop, my mom that she give a allowance to rent a shop, my future brother-in-law fellow programmer that he teach me how to connect the database in ADODB in other way and also my instructor, sir JAL who I learn about database, connect into database and programming language especially in MySQL and Navicat.

EXCLUSIVE SUMMARY .

as for a course or in a school. enrolling.Phase 1: Database Mode 1. enrolled. What is the purpose of Enrollment System? Answer: The Enrollment System is a system that you can enroll the student not once. not twice. 3 or more times that you can enroll the student to the school but it depend how student can affordable. colleges and other establishments.1 Database Name (Enrollment System) What is Enrollment System? –noun The act or process of 1. The number of persons enrolled. Therefore. 3. . computerized enrollment system is very useful to both the firm and students because it rather give an effective and efficient approach for both the students and schools. The state of being 2. What is the used of Computerized Enrollment System and could you give me a short summary about Computerized Enrollment System? Answer: Computerized enrollment system is now used by the universities.

2 Entity-Relationship Diagram .1.

1 1st Normal Form StudentID(PK) StudentNumber Name Gender Age Birthdate Address ParentGuardian ContactNum SchoolYear ElementaryLevel PaymentType TuitionFee DepartmentFee MiscellaneousFee 2.1 Database Normalization Process 2.1.Phase 2: Database Design 2.2 2nd Normal Form .1.

3 3rd Normal Form ContactNum SchoolYear tblStudent ElementaryLevel PaymentType tblAssessment AstCashID(PK) TuitionFee DepartmentFee MiscellaneousFee tblElementaryLev el ElemLevelID(PK) ElementaryLevel tblSchoolYear SYID(PK) SchoolYear .1.tblStudent StudentID(PK) StudentNumber LastName FirstName MI Age Gender Birthdate Address ParentGuardian ContactNum SchoolYear ElementaryLevel PaymentType StudentID(PK) StudentNumber LastName FirstName MI Age Gender Birthdate Address ParentGuardian 2.

2 Database Scheme .tblAssessment AstCashID(PK) TuitionFee DepartmentFee MiscellaneousFee tblElementaryLev el ElemLevelID(PK) ElementaryLevel tblSchoolYear tblAssessmentInstallme nt AstInstallmentID(PK) TuitionFee DepartmentFee MiscellaneousFee SYID(PK) SchoolYear 2.

schoolYear. contactNum. elemLevelID. elementaryLevel. parentGuardian. departmentFee. astInstallmentID) FOREIGN KEY elemLevelID REFERENCES tblElementaryLevel ON UPDATE CASCADE FOREIGN KEY syID REFERENCES tblSchoolYear ON UPDATE CASCADE FOREIGN KEY astCashID REFERENCES tblAssessmentCash ON DELETE RESTRICT ON UPDATE CASCADE FOREIGN KEY astInstallmentID REFERENCES tblAssessmentInstallment ON DELETE RESTRICT ON UPDATE CASCADE 2.tblElementaryLevel(elemLevelID. tuitionFee. miscellaneousFee) tblAssessmentInstallment(astInstallmentID. MI. firstName. birthdate. astCashID. age. address. paymentType. lastName. syID.3 MySQL Code . departmentFee miscellaneousFee) tblStudent(studentID. gender. tuitionFee. studentNumber. elementaryLevel) tblSchoolYear(syID. SchoolYear) tblAssessmentCash(astCashID.

0 rows affected (0.05 sec) mysql> CREATE TABLE tblSchoolYear -> ( -> syID SMALLINT NOT NULL. 0 rows affected (0. 1 row affected (0. -> departmentFee VARCHAR(50). -> elementaryLevel VARCHAR(50). -> CONSTRAINT PKtblAssessmentCash PRIMARY KEY (astCashID) . -> CONSTRAINT PKtblSchoolYear PRIMARY KEY (syID) -> ). Query OK. -> schoolYear VARCHAR(50).mysql> CREATE DATABASE Enrollment. Query OK. Database changed mysql> CREATE TABLE tblElementaryLevel -> ( -> elemLevelID SMALLINT NOT NULL. -> tuitionFee VARCHAR(50).03 sec) mysql> CREATE TABLE tblAssessmentCash -> ( -> astCashID SMALLINT NOT NULL. -> CONSTRAINT PKtblElementaryLevel PRIMARY KEY (elemLevelID) -> ).01 sec) mysql> USE Enrollment. -> miscFee VARCHAR(50). Query OK.

0 rows affected (0. -> miscFee VARCHAR(50). -> gender VARCHAR(50). -> departmentFee VARCHAR(50). -> firstName VARCHAR(50). -> schoolYear VARCHAR(50). -> lastName VARCHAR(50). -> CONSTRAINT PKtblAssessmentInstallment PRIMARY KEY (astInstallmentID) -> ). -> age VARCHAR(50).02 sec) mysql> CREATE TABLE tblAssessmentInstallment -> ( -> astInstallmentID SMALLINT NOT NULL. -> contactNum VARCHAR(50).01 sec) mysql> CREATE TABLE tblStudent -> ( -> studentID SMALLINT NOT NULL. Query OK. -> parentGuardian VARCHAR(50).-> ). . -> tuitionFee VARCHAR(50). 0 rows affected (0. -> studentNumber VARCHAR(50). -> birthdate VARCHAR(50). Query OK. -> MI VARCHAR(50). -> address VARCHAR(225).

00 sec) Phase 3: Database Population . -> CONSTRAINT FKsyID FOREIGN KEY (syID) -> REFERENCES tblSchoolYear -> ON UPDATE CASCADE. -> elemLevelID SMALLINT. 0 rows affected (0.-> elementaryLevel VARCHAR(50). Query OK. -> astCashID SMALLINT. -> CONSTRAINT FKastCashID FOREIGN KEY (astCashID) -> REFERENCES tblAssessmentCash -> ON UPDATE CASCADE. -> syID SMALLINT. -> CONSTRAINT PKtblStudent PRIMARY KEY (studentID). -> CONSTRAINT FKastInstallmentID FOREIGN KEY (astInstallmentID) -> REFERENCES tblAssessmentInstallment -> ON UPDATE CASCADE -> ). -> paymentType VARCHAR(50). -> CONSTRAINT FKelemLevelID FOREIGN KEY (elemLevelID) -> REFERENCES tblElementaryLevel -> ON UPDATE CASCADE. -> astInstallmentID SMALLINT.

1.3.1 Navicat *tblAssessmentCash *tblAssessmentInstallment *tblElementaryLevel *tblSchoolYear *tblStudent .1 Database Structure 3.

3.2 MS Access .1.

*tblAssessmentCash *tblAssessmentInstallment *tblElementaryLevel *tblSchoolYear *tblStudent .

3.2 Populated Tables .

* tblAssessmentCash * tblAssessmentInstallment * tblElementaryLevel * tblSchoolYear * tblStudent .

3 Queries & Resulting Tables .3.

* How many students are enrolled in Grade II? mysql> SELECT * FROM tblStudent WHERE elementaryLevel = 'II'. * How many students are enrolled in Grade III? mysql> SELECT * FROM tblStudent WHERE elementaryLevel = 'III'. .* How many students are enrolled in Grade I? mysql> SELECT * FROM tblStudent WHERE elementaryLevel = 'I'.

* How many students are enrolled in Grade IV? mysql> SELECT * FROM tblStudent WHERE elementaryLevel = 'IV'. * How many students are enrolled in Grade V? mysql> SELECT * FROM tblStudent WHERE elementaryLevel = 'V'. . * How many students are enrolled in Grade VI? mysql> SELECT * FROM tblStudent WHERE elementaryLevel = 'VI'.

* How many students is their payment type is Cash? mysql> SELECT * FROM tblStudent WHERE PaymentType = 'Cash';

* How many students is their payment type is Installment? mysql> SELECT * FROM tblStudent WHERE PaymentType = 'Installment';

* How many students are enrolled in the school year 2009-2010? mysql> SELECT * FROM tblStudent WHERE SchoolYear = '2009-2010';

Phase 4:

Final Project

4.2 Screen Design/Snapshot .1 Project Modules & Functionalities 4.

* frmLogin * frmMain * frmElemInfo .

.

.

* frmSYSettings .

* frmaymentSettings .

* frmAssessment .

* frmPrintLayout .

4.3 Source Code  Module1.bas .

txtPW.txtUser.connection.0." End Sub Public Sub recordset(ByRef sRecordset As ADODB.frm Private Sub Form_Load() Call main End Sub Private Sub paymentsets_Click() . ByVal sSQL As String) With sRecordset .Jet.Text = "" frmLogin.Persist Security Info=False.Show vbModal End Sub"  frmMain.Open sSQL.connection.4. sConnection.Text = "" frmLogin.CursorLocation = adUseClient .recordset.OLEDB. adOpenKeyset.Option Explicit Public Sub connection(ByRef dConnection As ADODB.Open "Provider=Microsoft. ByVal dLocation As String) dConnection. sConnection As ADODB.Data Source=" & dLocation & ". adLockOptimistic End With End Sub ByRef Sub main() frmLogin.

vbInformation Unload Me .frm Private Sub cmdExit_Click() End End Sub Private Sub cmdLogin_Click() Dim uid.Show vbModal End Sub Private Sub sysets_Click() frmSYSettings.Show vbModal End Sub > frmLogin. pw As String uid = "admin" pw = "password" If txtUser.Text = uid And txtPW.Show vbModal End Sub Private Sub close_Click() End End Sub Private Sub eleminfo_Click() frmElemInfo.Text = pw Then MsgBox "Login Successfully Granted!".frmPaymentSettings.

Text = ListView1.txtLastN.Else MsgBox "Invalid username or password!".Text = ListView1.ListItems.SubItems(11) .txtMI.Text = ListView1.Default = True txtPW.txtFirstN.SelectedItem.txtGender.Show vbModal MsgBox "No record found.SubItems(3) .txtStudNum.SelectedItem.Text = ListView1.SelectedItem.Text = "" txtPW. vbExclamation txtUser.Text = "" txtUser.Text = ListView1.SetFocus End If End Sub Private Sub Form_Load() cmdExit.frm Private Sub cmdAssessment_Click() If ListView1.Text = ListView1. "List of Students": Exit Sub With frmAssessment .txtStudID.SelectedItem.Count < 1 Then vbExclamation.SelectedItem.Text = ListView1.Cancel = True cmdLogin.Text = ListView1.".txtSY.SubItems(2) .SelectedItem.SubItems(1) .SelectedItem .txtElemLevel.SubItems(12) .SubItems(4) .SelectedItem. .PasswordChar = "*" End Sub > frmElemInfo.SubItems(5) .

End With End Sub Private Sub cmdDelete_Click() Dim cndelete As New ADODB. "List of Students": Exit Sub MsgBox "No record found. "Confirm Delete") If condition = vbNo Then Exit Sub Else Call connection(cndelete.".SelectedItem.SelectedItem.recordset Dim condition As String If ListView1.connection Dim rsdelete As New ADODB.mdb") Call recordset(rsdelete.SubItems(4) & "'" & "?".SubItems(3) & " " & ListView1. condition = MsgBox("Are you sure you want to delete: " & "'" & ListView1. vbExclamation Call viewStudent Set cndelete = Nothing Set rsdelete = Nothing End Sub .Count < 1 Then vbExclamation.SubItems(2) & ".Delete End With End If MsgBox "The Selected Student is successful deleted from the list of students".SelectedItem & "") With rsdelete . cndelete.SelectedItem. vbYesNo. App. "SELECT * FROM tblStudent WHERE studentID = " & ListView1.Path & "\Database. " & ListView1.ListItems.

comboSY.Text = ListView1.cmbGender.Text = ListView1.SelectedItem.SelectedItem .txtPG.Text = ListView1.SubItems(7) .SubItems(10) .Text = ListView1.SelectedItem.SelectedItem.SelectedItem.txtAge.comboPT.txtAddress.SelectedItem.Show vbModal End Sub .SubItems(2) .SubItems(3) .SelectedItem.SelectedItem.SubItems(12) .SubItems(11) .SelectedItem.SelectedItem.Text = ListView1.comboElem.txtMI.ListItems.SelectedItem. "List of Students": Exit Sub With frmEditStudent .SubItems(13) .txtLastN.Text = ListView1.SubItems(4) .Show vbModal End With End Sub MsgBox "No record found.SubItems(1) .SelectedItem.Text = ListView1.Text = ListView1.SubItems(6) .Text = ListView1. Private Sub cmdNew_Click() frmNewStudent.txtStudID.Text = ListView1.SelectedItem.".SubItems(5) .txtBdate.SubItems(8) .Count < 1 Then vbExclamation.SelectedItem.Text = ListView1.txtStudNum.Text = ListView1.txtFirstN.SubItems(9) .Private Sub cmdEdit_Click() If ListView1.Text = ListView1.Text = ListView1.txtContactNum.

Enabled = False cmdDelete.Private Sub comboLevel_Click() Call viewStudent End Sub Private Sub comboSY_Click() comboLevel.Visible = True Then Call comboLevel_Click End If End Sub Private Sub Form_Load() Call viewSY Call viewLevel Call viewStudent ListView1.mdb") .connection Dim rscmblevel As New ADODB.Width = "0" End Sub Public Sub viewLevel() Dim cncmblevel As New ADODB. App.Item(1).Path & "\Database.Enabled = False cmdEdit.Enabled = False cmdAssessment.recordset Call connection(cncmblevel.Visible = False comboLevel.Enabled = False ListView1.Enabled = True If ListView1.ColumnHeaders.

Path & "\Database. cncmbsy.recordset .MoveNext Loop Set cncmbsy = Nothing Set rscmbsy = Nothing End Sub Public Sub viewStudent() Dim cnStud As New ADODB.EOF comboLevel.AddItem rscmblevel!elementarylevel rscmblevel.mdb") Call recordset(rscmbsy.Call recordset(rscmblevel. "SELECT * FROM tblElementaryLevel ORDER BY elementaryLevel ASC") Do Until rscmblevel. "SELECT * FROM tblSchoolYear ORDER BY schoolYear ASC") Do Until rscmbsy. cncmblevel.MoveNext Loop Set cncmblevel = Nothing Set rscmblevel = Nothing End Sub Public Sub viewSY() Dim cncmbsy As New ADODB.connection Dim rsStud As New ADODB.recordset Call connection(cncmbsy.AddItem rscmbsy!schoolYear rscmbsy. App.connection Dim rscmbsy As New ADODB.EOF comboSY.

ListItems.EOF Set X = ListView1.Fields!schoolYear X.Fields!paymenttype . App.SubItems(5) = .Enabled = True .SubItems(2) = .Fields!firstname X.Text & "' AND elementaryLevel = '" & comboLevel.SubItems(6) = .Fields!elementarylevel X.Fields!studentid) X.mdb") Call recordset(rsStud.SubItems(9) = .Add(.MoveNext Wend End With cmdAssessment.SubItems(1) = .SubItems(13) = .Fields!contactnum X.Fields!parentguardian X. .Visible = True Call connection(cnStud.SubItems(4) = .SubItems(3) = . .Fields!lastname X.Fields!address X.SubItems(7) = .Path & "\Database.Fields!age X. "SELECT * FROM tblStudent WHERE schoolYear = '" & comboSY. cnStud.Text & "' ORDER BY studentnumber ASC") Dim X ListView1.ListItems.SubItems(12) = .SubItems(8) = .Fields!studentnumber X.Fields!mi X.Clear With rsStud While Not .ListView1.SubItems(10) = .Fields!birthdate X.SubItems(11) = .Fields!gender X.

frm Private Sub cmdSave_Click() Dim cnaddnew As New ADODB.parentg uardian.Text <> "" And comboElem.Path & "\Database.Text <> "" And txtPG.Enabled = True cmdDelete.ListItems.mi.Text & "'. App.'" & txtMI.contactnum.Text <> "" And comboPT.cmdEdit.Text <> "" And cmbGender.Text <> "" And txtAddress.paymentType.Text <> "" And txtFirstN.Item(1).'" & txtLastN.connection Dim rsaddnew As New ADODB.Text <> "" And comboPT.Text & "'.'" & txtFirstN.Text <> "" And txtBdate.Text <> "" And comboSY.Text <> "" Then Call connection(cnaddnew.Width = "0" Set cnStud = Nothing Set rsStud = Nothing Dim cnCount As New ADODB.Text & "'. cnCount.Text & "'.Text & "'.'" & .lastname.Text & "'") lblcountstud.mdb") Call recordset(rsCount.recordset Call connection(cnCount. "SELECT COUNT(studentid) as sumstudent FROM tblStudent WHERE elementaryLevel = '" & comboLevel.firstname.elementaryLevel.Caption = rsCount!sumstudent Set cnCount = Nothing Set rsCount = Nothing Exit Sub End Sub > frmNewStudent.schoolYear) VALUES ('" & txtStudNum.age. cnaddnew.Path & "\Database. "INSERY INTO tblStudent (studentnumber.recordset If txtStudNum.Text <> "" And txtLastN.gender.Text & "'.address.Text <> "" And txtAge.Text <> "" And txtContactNum.connection Dim rsCount As New ADODB.'" & cmbGender.Enabled = True 'ListView1.mdb") Call recordset(rsaddnew. App.Text <> "" And txtMI.birthdate.'" & txtAge.

Path & "\Database.recordset Dim idno As Integer Call connection(cnsetnum. " & txtFirstN. App.Text & " is successful added to your database!".Text & "'.") MsgBox txtLastN.Text & "'.Text & "'). cnsetnum.Text & " " & txtMI.mdb") Call recordset(rssetnum.Text & "'.connection Dim rssetnum As New ADODB.'" & txtPG.Text & "'.'" & txtAddress.'" & comboPT.'" & comboSY. vbInformation Unload Me Else MsgBox "All fields are required!".txtBdate.'" & comboElem. vbExclamation End If Set cnaddnew = Nothing Set rsaddnew = Nothing End Sub Private Sub Form_Load() Call viewLevel Call viewSY Call cleared Call setnum Call tabindexes End Sub Public Sub setnum() Dim cnsetnum As New ADODB.Text & "'.Text & ".Text & "'. "SELECT * FROM tblStudent") .'" & txtContactNum.

AddItem "Installment" cmbGender.Text = "" txtContactNum.AddItem "Cash" comboPT.Text = "" comboPT.Enabled = False txtStudID. "yyyy-") & Format(idno.MoveLast idno = rssetnum.AddItem "Male" cmbGender.Text = "" txtStudNum.AddItem "Female" .Text = "" txtAge.Enabled = False txtStudID.Text = "" txtMI.RecordCount = 0 Then idno = 1 Else rssetnum. "000") End Sub Public Sub cleared() txtStudNum.If rssetnum.Fields("studentid") + 1 End If txtStudNum.Text = "" txtAddress.Text = "" txtBdate.Text = Format(Now().Text = "" txtPG.Text = "" txtFirstN.Text = "" txtLastN.

recordset Call connection(cncmbsy.connection Dim rscmbsy As New ADODB.AddItem rscmblevel!elementarylevel rscmblevel. cncmbsy.MoveNext Loop Set cncmblevel = Nothing Set rscmblevel = Nothing End Sub Public Sub viewSY() Dim cncmbsy As New ADODB. App. cncmblevel.Path & "\Database. App.EOF comboSY.mdb") Call recordset(rscmbsy.mdb") Call recordset(rscmblevel.End Sub Public Sub viewLevel() Dim cncmblevel As New ADODB. "SELECT * FROM tblElementaryLevel ORDER BY elementaryLevel ASC") Do Until rscmblevel.Path & "\Database. "SELECT * FROM tblSchoolYear ORDER BY schoolYear ASC") Do Until rscmbsy.EOF comboElem.MoveNext Loop Set cncmbsy = Nothing .connection Dim rscmblevel As New ADODB.recordset Call connection(cncmblevel.AddItem rscmbsy!schoolYear rscmbsy.

Text <> "" And txtFirstN.TabIndex = 10 comboElem.TabStop = False txtStudID.Set rscmbsy = Nothing End Sub Public Sub tabindexes() txtLastN.Text <> "" And txtAddress.TabIndex = 12 cmdSave.TabIndex = 2 txtMI.connection Dim rsupdate As New ADODB.recordset If txtStudNum.TabIndex = 11 comboPT.TabIndex = 13 txtStudNum.TabIndex = 9 comboSY.frm Private Sub cmdSave_Click() Dim cnupdate As New ADODB.Text <> "" And .TabIndex = 3 cmbGender.Text <> "" And txtAge.TabIndex = 8 txtContactNum.Text <> "" And txtPG.Text <> "" And txtMI.TabIndex = 6 txtAddress.Text <> "" And txtBdate.TabIndex = 7 txtPG.Text <> "" And txtLastN.Text <> "" And cmbGender.TabIndex = 5 txtBdate.TabStop = False End Sub > frmEditStudent.TabIndex = 1 txtFirstN.TabIndex = 4 txtAge.

age = '" & txtAge.Text & "'. vbExclamation End If Set cnupdate = Nothing Set rsupdate = Nothing End Sub Private Sub Form_Load() Call viewLevel Call viewSY Call cleared Call tabindexes End Sub Public Sub cleared() .Text & "'" & _ "WHERE studentid = " & txtStudID.Text & "'. birthdate = '" & txtBdate. lastname = '" & txtLastN. schoolyear = '" & comboSY.Text & "'. cnupdate.Text & "") MsgBox txtLastN.Path & "\Database.Text <> "" And comboSY.Text & "'. paymenttype = '" & comboPT.mdb") Call recordset(rsupdate.Text & "'.Text & "'.Text & " " & txtMI. App.Text & "'.Text <> "" Then Call connection(cnupdate. "UPDATE tblStudent SET studentnumber = '" & txtStudNum. elementarylevel = '" & comboElem. gender = '" & cmbGender.Text <> "" And comboElem.txtContactNum. address = '" & txtAddress. contactnum = '" & txtContactNum.Text <> "" And comboPT. firstname = '" & txtFirstN. mi = '" & txtMI. parentguardian = '" & txtPG.Text & ". " & txtFirstN.Text & "'.Text & "'.Text & " is successful modified from your database!".Text & "'.Text & "'. vbInformation Unload Me Else MsgBox "All fields are required!".Text & "'.Text <> "" And comboPT.

connection Dim rscmblevel As New ADODB.EOF comboElem.Enabled = False txtStudNum.Text = "" txtPG. App.AddItem "Cash" comboPT.MoveNext Loop .txtStudID.recordset Call connection(cncmblevel.AddItem "Male" cmbGender.AddItem "Installment" cmbGender.Text = "" txtFirstN.AddItem rscmblevel!elementarylevel rscmblevel.Text = "" txtLastN.AddItem "Female" End Sub Public Sub viewLevel() Dim cncmblevel As New ADODB.mdb") Call recordset(rscmblevel.Text = "" txtBdate.Enabled = False txtStudID.Text = "" comboPT. "SELECT * FROM tblElementaryLevel ORDER BY elementaryLevel ASC") Do Until rscmblevel.Text = "" txtAge. cncmblevel.Text = "" txtContactNum.Text = "" txtAddress.Path & "\Database.Text = "" txtMI.

TabIndex = 9 . cncmbsy.TabIndex = 2 txtFirstN.Path & "\Database. App.TabIndex = 8 txtPG.AddItem rscmbsy!schoolYear rscmbsy.MoveNext Loop Set cncmbsy = Nothing Set rscmbsy = Nothing End Sub Public Sub tabindexes() txtLastN. "SELECT * FROM tblSchoolYear ORDER BY schoolYear ASC") Do Until rscmbsy.mdb") Call recordset(rscmbsy.TabIndex = 5 txtAge.recordset Call connection(cncmbsy.TabIndex = 6 txtBdate.TabIndex = 3 txtMI.Set cncmblevel = Nothing Set rscmblevel = Nothing End Sub Public Sub viewSY() Dim cncmbsy As New ADODB.connection Dim rscmbsy As New ADODB.TabIndex = 4 cmbGender.EOF comboSY.TabIndex = 7 txtAddress.

TabStop = False End Sub > frmAssessment.Text .Caption = txtGender.TabIndex = 10 comboSY.Text .Text .Text) + Val(txtDFee.Label13.TabStop = False txtStudNum.Text .Text) + Val(txtMFee.Label5.txtContactNum.Caption = txtSY.Caption = txtLastN.Caption = txtMI.TabIndex = 11 comboElem.TabIndex = 14 txtStudID.Text = Val(txtTFee.Label11.Caption = txtStudNum.Label3.Label9.frm Private Sub cmbPT_Click() Call paymenttype txtTotal.TabIndex = 13 cmdSave.Caption = txtFirstN.Text .Label7.TabIndex = 12 comboPT.Text) End Sub Private Sub cmdCancel_Click() Unload Me End Sub Private Sub cmdPrintShow_Click() With frmPrintLayout .Text .

Label21.Text .Label15.Text .recordset Dim rsInst As New ADODB. cnCash.Caption = txtTFee.Text) + Val(txtDFee.connection Dim rsCash As New ADODB.Show vbModal End With End Sub Private Sub Form_Load() Call cleared cmbPT.Caption = "Total: " & txtTotal.Caption = cmbPT.recordset If cmbPT.Caption = txtMFee.Label19.Text = "Cash" Then Call connection(cnCash.AddItem "Installment" Call paymenttype txtTotal. App.Text) + Val(txtMFee.connection Dim cnInst As New ADODB.Text .Label26.Path & "\Database.AddItem "Cash" cmbPT.Label17.Text .Caption = txtDFee.Text = Val(txtTFee. "SELECT * FROM tblAssessmentCash") .Caption = txtElemLevel.mdb") Call recordset(rsCash.Text .Text .Label23.Text) End Sub Public Sub paymenttype() Dim cnCash As New ADODB..

txtCashID.Text = rsInst!astInstallmentID txtTFee.connection . "SELECT * FROM tblAssessmentInstallment") txtInstID.Text = "Installment" Then Call connection(cnInst.Text = rsCash!departmentfee txtMFee.mdb") Call recordset(rsInst.Text = "" txtDFee.Text = rsInst!departmentfee txtMFee.Text = rsInst!tuitionfee txtDFee.Text = "" End Sub  frmSYSettings Private Sub cmdDelete_Click() Dim cndelete As New ADODB.Text = "" txtMFee.Text = rsCash!astCashID txtTFee. App. cnInst.Text = rsCash!miscfee Set cnCash = Nothing Set rsCash = Nothing ElseIf cmbPT.Path & "\Database.Text = rsInst!miscfee Set cnInst = Nothing Set rsInst = Nothing End If End Sub Public Sub cleared() txtTFee.Text = rsCash!tuitionfee txtDFee.

SubItems(1) & "?". vbExclamation Call dataload Set cndelete = Nothing Set rsdelete = Nothing End Sub Private Sub cmdEdit_Click() If ListView1.Count < 1 Then MsgBox "No record found.SelectedItem .recordset Dim condition As String If ListView1. vbYesNo.txtSYID.Dim rsdelete As New ADODB. App. vbExclamation.SelectedItem.mdb") Call recordset(rsdelete. "List of Students": Exit Sub With frmEditSY . cndelete.Path & "\Database.ListItems. "SELECT * FROM tblSchoolYear WHERE syID=" & ListView1.".".Delete End With End If MsgBox "The Selected School Year is successful deleted from the your database!". vbExclamation.ListItems.SelectedItem & "") With rsdelete .Text = ListView1. "Confirm Delete") If condition = vbNo Then Exit Sub Else Call connection(cndelete.Count < 1 Then MsgBox "No record found. "List of Students": Exit Sub condition = MsgBox("Are you sure you want to delete: " & ListView1.

.txtSY. "SELECT * FROM tblSchoolYear") ListView1. App.Add(.ListItems.Fields!syID) X.Fields!schoolYear .MoveNext Wend . ..Show vbModal End With End Sub Private Sub cmdNew_Click() frmNewSY.Path & "\Database.SubItems(1) .mdb") Call recordset(rsSY. cnSY.EOF Set X = ListView1.Clear With rsSY While Not .Show vbModal End Sub Private Sub Form_Load() Call dataload End Sub Public Sub dataload() Dim cnSY As New ADODB.SubItems(1) = .SelectedItem.Text = ListView1.ListItems.connection Dim rsSY As New ADODB.recordset Dim X Call connection(cnSY.

mdb") Call recordset(rsaddnew. App.Path & "\Database.frm Private Sub cmdSave_Click() Dim cnaddnew As New ADODB.Show vbModal Else MsgBox "All fields required".Path & "\Database. cnaddnew. "INSERT INTO tblSchoolYear(schoolYear) VALUES ('" & txtSY.Text & "').frm Private Sub cmdSave_Click() Dim cnupdate As New ADODB.Text <> "" Then Call connection(cnaddnew. App.") MsgBox "This school year is successful created to your database!".mdb") . vbInformation Unload Me Unload frmSYSettings frmSYSettings.connection Dim rsupdate As New ADODB.recordset If txtSY.End With Set rsSY = Nothing End Sub  frmNewSY.Text <> "" Then Call connection(cnupdate.connection Dim rsaddnew As New ADODB. vbExclamation End If End Sub  frmEditSY.recordset If txtSY.

Text & "'.Text & "") Unload Me frmSYSettings.Text & "'" & _ "WHERE syid=" & txtSYID.Text <> "" And txtCashDFee.recordset If txtCashTFee. vbInformation Unload Me frmPaymentSettings.dataload MsgBox "The selected school year is successful modified!".Call recordset(rsupdate.Text <> "" Then Call connection(cnupdate. vbInformation Else MsgBox "That field are required!". miscfee = '" & txtCashMFee.connection Dim rsupdate As New ADODB. "UPDATE tblAssessmentCash SET tuitionfee = '" & txtCashTFee.Path & "\Database. App. departmentfee = '" & txtCashDFee. "UPDATE tblSchoolYear SET schoolYear='" & txtSY.Text & "'. vbExclamation End If Set cnupdate = Nothing Set rsupdate = Nothing End Sub  frmPaymentSettings. cnupdate.Text & "") MsgBox "Cash is successful modified from your database!".frm Private Sub cmdCashSave_Click() Dim cnupdate As New ADODB. vbExclamation .Text <> "" And txtCashMFee.mdb") Call recordset(rsupdate.Text & "'" & _ "WHERE astCashID = " & txtCashID. cnupdate.Show vbModal Else MsgBox "All fields are required!".

End If Set cnupdate = Nothing Set rsupdate = Nothing End Sub Private Sub cmdInstSave_Click() Dim cnupdate As New ADODB.Text & "'.Text & "") MsgBox "Installment is successful modified from your database!".Path & "\Database. miscFee = '" & txtInstMFee.Text & "'" & _ "WHERE astInstallmentID = " & txtInstID. cnupdate. App.recordset If txtInstTFee.Text <> "" And txtInstDFee. "UPDATE tblAssessmentInstallment SET tuitionFee = '" & txtInstTFee. vbInformation Unload Me frmPaymentSettings.Show vbModal Else MsgBox "All fields are required!".Text <> "" Then Call connection(cnupdate.Text <> "" And txtInstMFee.Text & "'. departmentFee = '" & txtInstDFee.mdb") Call recordset(rsupdate.connection Dim rsupdate As New ADODB. vbExclamation End If Set cnupdate = Nothing Set rsupdate = Nothing End Sub Private Sub Form_Load() Call cleared .

mdb") Call recordset(rsCash.Text = rsCash!astCashID txtCashTFee. App.Text = rsCash!miscfee Set cnCash = Nothing Set rsCash = Nothing End Sub .Path & "\Database. cnCash.Text = "" txtCashDFee.Text = rsCash!departmentfee txtCashMFee.Text = "" txtInstMFee. "SELECT * FROM tblAssessmentCash") txtCashID.recordset Call connection(cnCash.Text = "" txtInstDFee.connection Dim rsCash As New ADODB.Text = "" txtInstTFee.Text = "" End Function Public Sub cash() Dim cnCash As New ADODB.Call cash Call installment End Sub Public Function cleared() txtCashTFee.Text = rsCash!tuitionfee txtCashDFee.Text = "" txtCashMFee.

Text = rsInst!tuitionfee txtInstDFee.Path & "\Database.Text = rsInst!miscfee Set cnInst = Nothing Set rsInst = Nothing End Sub  frmPrintLayut.connection Dim rsInst As New ADODB.recordset Call connection(cnInst.mdb") Call recordset(rsInst. cnInst.Text = rsInst!astInstallmentID txtInstTFee.Public Sub installment() Dim cnInst As New ADODB.Text = rsInst!departmentfee txtInstMFee.PrintForm Unload Me End Sub Private Sub Command2_Click() Unload Me End Sub Private Sub Form_Load() Label24. App.Caption = "As of " & Time .Visible = False Command2.frm Private Sub Command1_Click() Command1.Visible = False frmPrintLayout. "SELECT * FROM tblAssessmentInstallment") txtInstID.

Label25.Caption = "Date: " & Date End Sub APPENDIXES .

REFERENCES .

Sign up to vote on this title
UsefulNot useful