You are on page 1of 61

1.

0 INTRODUCTION
Minien National High School has contributed significantly and impressively to the
progress and welfare of the community in particular and of the municipality and the
country in general.
For quite some time the school remains a sleeping giant until signs of progress
started to be felt from June 1996 to May 2000. Enrollment increase by force of necessity
number of classes was double and even triple of the most number of pupils per class.
With the continuous progress in the schools number of enrollees, the admission
department has had faced very difficult tasks in the past years.
The difficulty of their tasks is because Minien National High School is still using
1

a manual enrollment system.


BACKGROUND OF THE STUDY
Technology was the great function of modernity for different application to make work

easier, more capable, and more adaptable for the humanity. Nowadays computer serves as an
important role in our society, most especially in school premise. Most of school uses computer to
help their student deal
in our modern technology.
Before entering a school, every student must go through the process of enrollment.
Minien National High School is one of those who practices teaching and inculcate learning.
Their enrollment system is basically like most other schools where as it is done manually and
human labor is essential. Our group came to an agreement of making a pre-enrollment process
for the school which is the enrollment system.
It is about creating a system that would ease the specific trouble and problems
encountered by a certain company or business establishment which normally is the ones that
requires enhancement in the field of technology. In this case their enrollment process.
1.2 STATEMENT OF OBJECTIVES
1.2.1 GENERAL OBJECTIVE

Page 1 of 61

To prevent damage or problems in compiling the files or retrieving it, we came up with
creating a new automated enrollment system. It is for the convenience of students and
administrators during enrollment process
1.2.2 SPECIFIC OBJECTIVE

To come up with a system that is capable to process the students data quickly.
To come up with a system that is capable to determine the similarities of student

data
Coming up with a system that is capable to avoid the loss of student files

1.3 SIGNIFICANCE OF THE STUDY


It is important in such a way that it benefits not only the student but the
administration as a whole. It lessens the workload, and provides accurate information.
1.4 SCOPE AND LIMITATION OF THE STUDY
The study only covers the Enrollment System of Minien National High School
and can only be used by the organizational member of the said school. The proposed
system contains the birth certificates, form 138 and payments. It also includes application
forms or commonly known for enrollment forms.
2.0 METHODOLOGY OF THE STUDY
We used SDLC as the method of this project and the specific phases are as follows: On
the first phase, system requirements establish the components for building the system,
including the hardware requirements, software tools and other necessary components.

Page 2 of 61

Second phase, software requirements establish the expectations for software functionality
and identifies which system requirements the software affects. Requirements analysis
includes determining interaction needed with other applications and databases,
performance requirements, user interface requirements, and so on.
Next is the architectural design, which determines the software framework of a system to
meet the specified requirements. The design defines the major components and the
interaction of those components, but the design does not define the structure of each
component. You also determine the external interfaces and tools to use in the project.
Then the detailed design, examine the software components defined in the
architectural design Stage. It produces a specification for how each component is
implemented. Coding, implements the detailed design specification.
The testing determines whether the software meets the specified requirements and finds
any error presents in the code.
And lastly, maintenance addresses problems and enhancement requests after the software
releases
3.0 DATA GATHERING PROCEDURES AND OUTPUTS
We originally scheduled an interview to the principal of Minien National High School.
Since he wasnt there at the time we arrived, we observed the functionality of each
department as the 1st week of classes goes on and the enrollment is still ongoing. After
sometime the principal arrived and having no enough time for the interview because of
his busy schedule, he handed us a copy of some documents about the process and

Page 3 of 61

operation of the school. The document also contains the planned system of the school. As
we review and analyze the documents we came up to propose an automated enrollment
system in which the planned system in stated in the document. As we also observed we
came up to this output of GENERAL OPERATIONS OVERVIEW as stated below.
GENERAL OPERATIONS OVERVIEW
Minien National High School conducts the enrollment annually. Freshmen and
Transferees were given an enrollment form to fill up necessary information. After filling
up the registration form together with the requirements; these are submitted to the teacher
in charge and subsequently to the school principal for verification. After the approval of
the school principal, the students proceed to the accounting office for the payments of
tuition fees and miscellaneous fees. The school requires transferees to submit a summary
dismissal from their previous. Alma Matter. A freshmen is also required their graduation
certificate from their previous school in elementary grade. Old students need only to
present their report cards.

4.0 Existing System


4.1 COMPANY BACKGROUND
Minien National High School has contributed significantly and impressively to the
progress and welfare of the community in particular and of the municipality and the
country in general.
Page 4 of 61

The School had known public national high school with three catchments barangay area
namely Minien West, Minien East and Tebag East. For quite some time the school
remains a sleeping giant until signs of progress started to be felt from June 1996 to May
2000. Enrollment increase by force of necessity number of classes was double and even
triple of the most number of pupils per class. With such growing pupils yearly, pupils
were require to bring their seats to bear the rigors of standing and squatting while in
class. Such situation persisted for quite a time, but with the concerted effort and with
serious concerned of Teachers, parents DepEd official, LGU and other concerned citizen,
the schools problem of facilities was gradually resolved.

MINIEN NATIONAL HIGH SCHOOL AT PRESENT


In the pursuit of the Department of Education (DepEd) mandate to respond to the
educational needs of every Filipino, the Minien National High School has taken a bold in
operating on an educational policy framework which caters to the needs of every learner.

Page 5 of 61

The Minien National High School envisions a lifelong learning that transform and
transcends all ways and means by which learning can take place. All throughout the year,
the Minien National High School remained steadfast and even mindful in the attainment
of quality education that is sealed in culture of excellence.
4.2 DESCRIPTION OF THE SYSTEM
The Enrollment System of Minien National high School is very quick and easy. It
depends on the status of the students and by the help of the Teachers that are assigned
into the Enrollment System.
For the new students, they should have with their birth certificates, form 138, good moral
character and payments. After which, they will present it to the assigned Teacher that will
give them the enrollment form fot them to fill up the necessary informations needed.
After filling up, the students may proceed to form a line, and then give the form to the
assigned teacher individually. The teachers will request or verify if the students has
already paid for his/her miscellaneous fee and PTCA fee. Manually, the teacher in charge
will encode the files of the student into their lists. After paying all the fees and coding the
files of the student, the new enrollee is now officially enrolled to MNHS.
As for the Transferees, they will be interviewed by the Principal and also required to
present their report card and certificate of GMRC from their previous school. After the
completion of the requirements are submitted and classified, the transferee student will
just follow the same procedure as the new student did.

Page 6 of 61

And for the old students, it is easier for them to enroll. First they should have their cards
for the last year, then they will show it to the teacher and the teacher will give them a
form to fill up to. After filling the student has to form a line, then the teacher get the plot
form, they are now enrolled to MNHS.

4.3 DATA FLOW DAIGRAM

Student
Page 7 of 61

Requirements

Payment

1
Official Receipt

Submit
Requirement

Submitted Requirement

3
Fees

Verify
Requirement

Pay of fees

Updated/Added

Q
Updated/Added
Student Info

Student Info

Enrollment

Updated/Added

Record

Student Info

Student Account

Paid fees

5
Produce Section
and Student list

Cashier

Student Personal files

Student Record
Student List

Teacher
In-charge

4.4 Data Dictionary


Students Requirements things and accomplished before enrolling
Birth Certificate- students information
Page 8 of 61

Form 138- basis for the student admittance


Good Moral Character- background of the student from former school
Enrollment Form- students information basis
Student Requirement (NEW) = Form 138+ good moral character + enrollment form
Student Requirement (OLD) = Form 138+clearance+enrolment form
Student Name students unique identity
Student Name= Last Name + Given Name + Middle Name
Student Address= Street no. + Barangay + City+{[Town][Province]}
Teacher in charge- one who checks all the requirements
Teacher in charge= Last Name + Given Name + Middle Name
Schedule- given time, subjects, and assigned classrooms for the students
Schedule=Time + Classroom

4.5 PROBLEM AREAS


Minien National High School uses manual procedures in its Enrollment System and
student information monitoring and management. Based on the observations in yearly

Page 9 of 61

implementing of the old system procedures performed by the school employees, it is


inevitable to encounter the following problems.
1. The processing of student records is too slow.
It is tedious for the employees to manually sort of all the student records according to
their year level and sections during and after the enrollment.
2. Inconsistence of student datas.
Since every student is obliged to ensure the cashier and the principal an up-to-date copy
of his/her account balance for which they often fails to do so, it may lead to the
inconsistence in coding the students data. Copy of account balance often takes place.
3. Slow retrieval of student data / account.
Retrieval of a student account balance takes place especially, during examinations. And
still, the principal needs to manually search the records in a file of folders.
4. Unavoidable loss of student files.
Since the students files kept only in a file cabinet that is usually disorganized due to
frequent searching, some files may accidentally be misplaced or lost.

5.0 THE PROPOSED SYTEM


5.1 SYSTEM OVERVIEW
We the researchers proposed this Enrollment System to the Teachers and Students of
Minien National High School for them to have a fast and reliable system that they can use
for the replacement of their old system. We see that this system will be effective in the

Page 10 of 61

future five years from now because of what we proposed in our documentation, the
resolutions of the problems that the school encountered when a student is enrolling.
Five years from now the Enrollment System of the Minien National High School would
become faster that todays enrollment system. Due to the long process of enrollment in
the previous past years of Minien National High School, the students and the
establishment consumed more, to both considerable amount of money, energy and time.
Through the proposed system we created, we may able to do the process of enrolling
easily and productively by just encoding into their computer. The proposed system may
decrease the allotted money, energy and time gained by the enrollee for further use of the
system in the near future. Through it, the proposed system will help the school to enhance
its ability to be technology oriented and to be more competitive to either private or public
schools.

5.2 Process Specification

5.2.1 DATA FLOW DIAGRAM

Student
Page 11 of 61

Requirements

Payment

Submit/Verify
Requirements

3
Pay of fees

Update/Add
Student Info

Enrollment Record
Student Record

Update/Add

Student Account

Information

Student Personal
files

Produce Sections
and Student List,
Schedule

5.2.2 Data Dictionary


Students Requirements things and accomplished before enrolling
Birth Certificate- students information
Form 138- basis for the student admittance
Page 12 of 61

Good Moral Character- background of the student from former school


Enrollment Form- students information basis
Student Requirement (NEW) = Form 138+ good moral character + enrollment form
Student Requirement (OLD) = Form 138+clearance+enrolment form
Student Name students unique identity
Student Name= Last Name + Given Name + Middle Name
Student Address= Street no. + Barangay + City + {[Town][Province]}
Teacher in charge- one who checks all the requirements
Teacher in charge= Last Name + Given Name + Middle Name
Schedule- given time, subjects, and assigned classrooms for the students
Schedule=Time + Classroom

5.3 Data Specifications

5.3.1 ENTITY RELATIONSHIP DIAGRAM

Birth Certificate
Form 13
Good
Page 13 of 61

Moral Character
Enrolment Form

Student

Submit

Requirements

Get

Evaluated
By

Subject

Issued
By

Evaluates
Adviser

5.3.2 TABLE/FILES LAYOUT

Page 14 of 61

Page 15 of 61

Page 16 of 61

Page 17 of 61

Page 18 of 61

Page 19 of 61

Page 20 of 61

Page 21 of 61

Page 22 of 61

5.4 SCREEN LAYOUT/SPECIFICATIONS

Page 23 of 61

Page 24 of 61

Page 25 of 61

Page 26 of 61

Page 27 of 61

Page 28 of 61

`5.5 REPORT/FORM SPECIFICATION


SOURCE CODE
prjEnroll - frmAssign (Code) FORM (frmAssign.frm)
'Outside declaration of the variables, you will learn the purpose of this sooner..
Dim rsSY, rsAssign As New ADODB.Recordset
Dim strStud As String

Page 29 of 61

Private Sub Form_Load()


openDB
Set rsAssign = New ADODB.Recordset
Set rsSY = New ADODB.Recordset
rsSY.Open "SELECT * FROM schYear", con, adOpenStatic, adLockPessimistic,
adCmdText

'Get the last school year in the table 'schYear'


rsSY.MoveLast
'And then assign it to textbox 'txtSY'
txtSY.Text = rsSY("schYr")

'You can find the method 'yearLevel' in the module "function.bas"


yearLevel cboLevel
End Sub

Private Sub cboLevel_Click()


'You can find the method 'populateComboBox' in the module "function.bas"
Page 30 of 61

populateComboBox cboLevel, cboSection


End Sub

Private Sub cboSection_Click()


fraSubj.Enabled = True
Select Case cboLevel

'You can find the method 'populateTextBox' in the module "function.bas"


Case "Freshman"
populateTextBox txtMath, txtScience, txtEnglish, txtFilipino, txtMAPEH,
txtAralPan, txtTLE, txtValues, txtAdviser, _
"SELECT * FROM SecSubFirst WHERE fiSection = '" & cboSection & "'",
"fi"
Case "Sophomore"
populateTextBox txtMath, txtScience, txtEnglish, txtFilipino, txtMAPEH,
txtAralPan, txtTLE, txtValues, txtAdviser, _
"SELECT * FROM SecSubSecond WHERE seSection = '" & cboSection & "'",
"se"

Page 31 of 61

Case "Junior"
populateTextBox txtMath, txtScience, txtEnglish, txtFilipino, txtMAPEH,
txtAralPan, txtTLE, txtValues, txtAdviser, _
"SELECT * FROM SecSubThird WHERE thSection = '" & cboSection & "'",
"th"
Case "Senior"
populateTextBox txtMath, txtScience, txtEnglish, txtFilipino, txtMAPEH,
txtAralPan, txtTLE, txtValues, txtAdviser, _
"SELECT * FROM SecSubFourth WHERE foSection = '" & cboSection & "'",
"fo"
End Select
End Sub

Private Sub cmdAssign_Click()


'Records the information of the student about what Level & Section he/she is in.
'If you look into the database, you'll notice there are many same student id's but
different Level & Section
If rsAssign.State = adStateOpen Then rsAssign.Close

Page 32 of 61

rsAssign.Open "INSERT INTO studSchRec VALUES('" & txtStudNum & "', '" &
txtSY & "', '" & cboLevel & "', " & _
"'" & cboSection & "', 'Enrolled')", con, adOpenStatic, adLockPessimistic,
adCmdText

'Checks if the student ID is already in the table 'studSchReq'


If rsAssign.State = adStateOpen Then rsAssign.Close
rsAssign.Open "SELECT sID FROM studSchReq WHERE sID = '" & txtStudNum
& "'", con, adOpenStatic, adLockPessimistic, adCmdText

'If the result of the query returns zero,


'apparently, there's no student ID that is currently in the table 'studSchReq'
If rsAssign.RecordCount = 0 Then
If rsAssign.State = adStateOpen Then rsAssign.Close
rsAssign.Open "INSERT INTO studSchReq VALUES('" & txtStudNum & "', " &
_
"'" & IIf(chkRCard.Value = vbChecked, "Yes", "No") & "', " & _
"'" & IIf(chkBCert.Value = vbChecked, "Yes", "No") & "', " & _

Page 33 of 61

"'" & IIf(chkGMoral.Value = vbChecked, "Yes", "No") & "')", con,


adOpenStatic, adLockPessimistic, adCmdText
'Otherwise, the following lines only update the records of that student ID.
Else
If rsAssign.State = adStateOpen Then rsAssign.Close
rsAssign.Open "UPDATE studSchReq SET sRCard = '" & IIf(chkRCard.Value =
vbChecked, "Yes", "No") & "', " & _
"sBCert = '" & IIf(chkBCert.Value = vbChecked, "Yes", "No") & "', " &
_
"sGMoral = '" & IIf(chkGMoral.Value = vbChecked, "Yes", "No") & "' "
&_
"WHERE sID = '" & txtStudNum & "'", con, adOpenStatic,
adLockPessimistic, adCmdText

'This part records the entry for purpose of tracking whoever enrolled in a certain
school year.
If rsAssign.State = adStateOpen Then rs.Close
rsAssign.Open "INSERT INTO active " & _

Page 34 of 61

"VALUES('" & txtStudNum & "')", con, adOpenStatic,


adLockPessimistic, adCmdText

End If

'Notifies the student regarding what Level & Section he/she is in..
MsgBox "Assigned in" & vbCrLf & vbCrLf & "Level: " & vbTab & cboLevel &
vbCrLf _
& "Section: " & vbTab & cboSection, vbInformation + vbOKOnly, "Enrollment
System"

Unload Me
End Sub

prjEnroll - frmLogin (Code) FORM (frmLogin.frm)


Private Sub cmdExit_Click()
Unload Me
End Sub

Page 35 of 61

Private Sub cmdLogin_Click()


Dim rsLog As New ADODB.Recordset

openDB
Set rsLog = New ADODB.Recordset
rsLog.Open "SELECT * FROM userAcc WHERE sUser = '" & txtUser & "' AND
sPass = '" & txtPass & "'", con, adOpenStatic, adLockPessimistic, adCmdText

If rsLog.RecordCount <> 0 Then


frmMain.mnuLog.Caption = "Logout"
frmMain.mnuAdmit.Visible = True
frmMain.mnuManage.Visible = True

MsgBox "You are now logged in.", vbInformation + vbOKOnly, "Enrollment


System"
Unload Me
frmMain.Show

Page 36 of 61

Else
MsgBox "Invalid username/password.", vbCritical + vbOKOnly, "Enrollment
System"
txtPass = ""
txtUser.SetFocus
End If
End Sub

'If you want to change what the 'txtPass' display everytime you press a key,
'just go to properties and find the PasswordChar
Private Sub Form_Load()

End Sub

prjEnroll - frmMain (Code) FORM (frmMain.frm)


Private Sub Form_Load()
mnuAdmit.Visible = False
mnuManage.Visible = False
Page 37 of 61

End Sub

Private Sub Form_Unload(Cancel As Integer)


Dim frm As Form
For Each frm In Forms
Unload frm
Next frm

Shell "C:\WINDOWS\system32\cmd.exe /c del *.tmp"


Shell "C:\WINDOWS\system32\cmd.exe /c del *.tmp"
Shell "C:\WINDOWS\system32\cmd.exe /c del *.tmp"
End Sub

Private Sub Image1_Click()

End Sub

Page 38 of 61

Private Sub mnuExit_Click()


Dim frm As Form
For Each frm In Forms
Unload frm
Next frm

Shell "C:\WINDOWS\system32\cmd.exe /c del *.tmp"


Shell "C:\WINDOWS\system32\cmd.exe /c del *.tmp"
Shell "C:\WINDOWS\system32\cmd.exe /c del *.tmp"
End Sub

Private Sub mnuLog_Click()


If mnuLog.Caption = "Login" Then
frmLogin.Show vbModal, Me
ElseIf mnuLog.Caption = "Logout" Then
mnuAdmit.Visible = False
mnuManage.Visible = False

Page 39 of 61

End If
End Sub

Private Sub mnuNew_Click()


frmStudNew.Show vbModal, Me
End Sub
Private Sub mnuOld_Click()
frmStudOld.Show vbModal, Me
End Sub
Private Sub mnuOverview_Click()
frmOverview.Show vbModal, Me
End Sub
Private Sub mnuSecSub_Click()
frmSecSub.Show vbModal, Me
End Sub

Private Sub mnuSY_Click()

Page 40 of 61

frmSY.Show vbModal, Me
End Sub
prjEnroll - frmOverview (Code) FORM (frmOverview.frm)
'Outside declaration of the variables, you will learn the purpose of this sooner..
Dim rsStatus, rsSY, rsViewAll, rsUpdate, rsDelete As New ADODB.Recordset

Private Sub cmdPrint_Click()


Dim intCtrl As Integer
Dim rsInd As Integer
rsInd = 0
With rptStudList
Set .DataSource = rsViewAll
.DataMember = ""

With .Sections("Section1").Controls
For intCtrl = 1 To .Count

Page 41 of 61

If TypeOf .Item(intCtrl) Is RptTextBox Then


.Item(intCtrl).DataMember = ""
.Item(intCtrl).DataField = rsViewAll(rsInd).Name
rsInd = rsInd + 1
End If
Next intCtrl
End With

.Refresh
Me.Hide
.Show
End With
End Sub

Private Sub dgdOverview_Click()

End Sub

Page 42 of 61

Private Sub Form_Load()


openDB
Set rsUpdate = New ADODB.Recordset
Set rsDelete = New ADODB.Recordset
Set rsSY = New ADODB.Recordset
'Get all the list of school year in the table 'schYear'
rsSY.Open "SELECT * FROM schYear", con, adOpenStatic, adLockPessimistic,
adCmdText
Set rsStatus = New ADODB.Recordset
'Get all the status type in the table 'statusType'
rsStatus.Open "SELECT * FROM statusType", con, adOpenKeyset,
adLockBatchOptimistic, adCmdText
Set rsViewAll = New ADODB.Recordset
'Displays the student ID, lastname, firstname, midname, schoolyear enrolled,
level,section
rsViewAll.Open "SELECT i.sID, i.sLName, i.sFName, i.sMName, r.sSY, r.sLevel,
r.sSection, r.sStatus " & _

Page 43 of 61

"FROM studPerInfo AS i, studSchRec AS r WHERE i.sID = r.sID", con,


adOpenStatic, adLockPessimistic, adCmdText

'You can find this method below..


fillGrid
'You can find this method 'yearLevel' in the module "function.bas"
yearLevel cboViewLevel

'Loop through all of the contents of the recordset and then add it to combobox
'cboViewSY'
rsSY.MoveFirst
While Not rsSY.EOF
cboViewSY.AddItem rsSY("schYr")
rsSY.MoveNext
Wend

'Loop through all of the contents of the recordset and then add it to combobox
'cboStatList' & 'cboViewStat'

Page 44 of 61

rsStatus.MoveFirst
While Not rsStatus.EOF
cboStatList.AddItem rsStatus("statType")
cboViewStat.AddItem rsStatus("statType")
rsStatus.MoveNext
Wend
End Sub

'This method will delete all the contents of the table 'active'
'The table 'active' records all of the students that enrolled in a certain school year
Private Sub cmdNewSY_Click()
ans = MsgBox("This will start a new school year?" & vbCrLf & "Are you sure you
want to continue?", vbCritical + vbYesNo, "Enrollment System")
If ans = vbYes Then
If rsDelete.State = adStateOpen Then rsDelete.Close
rsDelete.Open "DELETE * FROM active", con, adOpenStatic, adLockPessimistic,
adCmdText

Page 45 of 61

MsgBox "Congratulations," & vbCrLf & "You can now start the new school year.",
vbInformation + vbOKOnly, "Enrollment System"
End If
End Sub

Private Sub cmdClear_Click()


'You can find this method below..
clearFields
End Sub

Private Sub cmdRefresh_Click()


'I expect a self-explanation with this word "Requery"
rsViewAll.Requery
fillGrid
End Sub

Private Sub cmdSearch_Click()

Page 46 of 61

'Search the datas supplemented by the textboxes & comboboxes in the table
studPerInfo & studSchRec
'If the textbox(es) & combobox(es) is empty, it'll return all of the datas that is in the
two tables.
If rsViewAll.State = adStateOpen Then rsViewAll.Close
rsViewAll.Open "SELECT i.sID, i.sLName, i.sFName, i.sMName, r.sSY, r.sLevel,
r.sSection, r.sStatus " & _
"FROM studPerInfo AS i, studSchRec AS r " & _
"WHERE i.sID = r.sID AND i.sID LIKE '%" & txtViewID & "%' AND " & _
"i.sLName LIKE '" & txtViewLast & "%' AND r.sSY LIKE '" & cboViewSY
& "%' AND " & _
"r.sStatus LIKE '" & cboViewStat & "%' AND r.sLevel LIKE '" &
cboViewLevel & "%' AND " & _
"r.sSection LIKE '" & cboViewSect & "%'", con, adOpenKeyset,
adLockBatchOptimistic, adCmdText
fillGrid
End Sub

Private Sub cboViewLevel_Click()


Page 47 of 61

'You can find this method 'yearLevel' in the module "function.bas"


populateComboBox cboViewLevel, cboViewSect
'Combobox 'cboViewSect' is disabled by default, you can change this anytime in the
properties
cboViewSect.Enabled = True
End Sub

Private Sub cmdChange_Click()


cmdChange.Visible = False
fraChange.Visible = True
End Sub

Private Sub cmdClose_Click()


Unload Me
End Sub

'The following lines will change the status of the student(s) that are shown in the datagrid
'dgdOverView'
Page 48 of 61

'those that are not shown is not affected.


Private Sub cmdStatOk_Click()
ans = MsgBox("Are you sure you want to change the status of the shown results?",
vbExclamation + vbYesNo, "Enrollment System")
If ans = vbYes Then
Do While Not rsViewAll.EOF
rsUpdate.Open "UPDATE studSchRec " & _
"SET sStatus = '" & cboStatList & "' " & _
"WHERE sSY = '" & rsViewAll("sSY") & "' AND sID = '" &
rsViewAll("sID") & "'", con, adOpenStatic, adLockPessimistic, adCmdText
rsViewAll.MoveNext
Loop

'Refresh the datagrid 'dgdOverView' by requerying the necessary entries


If rsViewAll.State = adStateOpen Then rsViewAll.Close
rsViewAll.Open "SELECT i.sID, i.sLName, i.sFName, i.sMName, r.sSY, r.sLevel,
r.sSection, r.sStatus " & _

Page 49 of 61

"FROM studPerInfo AS i, studSchRec AS r WHERE i.sID = r.sID", con,


adOpenStatic, adLockPessimistic, adCmdText
clearFields
fillGrid
End If
cmdChange.Visible = True
fraChange.Visible = False
End Sub

'============================================================'
'===================== START OF METHODS ====================='
'============================================================'
Private Sub fillGrid()
With dgdOverview
Set .DataSource = rsViewAll
.Refresh

.Columns(0).Caption = "Student ID"


Page 50 of 61

.Columns(0).Width = 2000
.Columns(1).Caption = "Lastname"
.Columns(1).Width = 2000
.Columns(2).Caption = "Firstname"
.Columns(2).Width = 2000
.Columns(3).Caption = "Midname"
.Columns(3).Width = 2000
.Columns(4).Caption = "SY"
.Columns(4).Width = 1500
.Columns(5).Caption = "Level"
.Columns(5).Width = 1500
.Columns(6).Caption = "Section"
.Columns(6).Width = 2000
.Columns(7).Caption = "Status"
.Columns(7).Width = 2000
End With
End Sub

Page 51 of 61

Private Sub clearFields()


cboViewSY.ListIndex = -1
cboViewStat.ListIndex = -1
cboViewLevel.ListIndex = -1
cboViewSect.ListIndex = -1
txtViewID = ""
txtViewLast = ""
End Sub
'=========================================================='
'===================== END OF METHODS ====================='
'=========================================================='
prjEnroll - frmPayment (Code) FORM (frmPayment.frm)
Private Sub Command1_Click()
Unload Me
End Sub

Page 52 of 61

Private Sub Form_Load()

End Sub
5.6 PROGRAM/MODULES SPECOFOCATIONS
Modules
prjEnroll function (Code) (function.bas)

Global con As New ADODB.Connection


Dim rsPickSect, rsFill As New ADODB.Recordset
Global temp, yrNow, dayNow, newStud As String

Public Sub openDB()


Set con = New ADODB.Connection
con.CursorLocation = adUseClient
con.Open "PROVIDER = Microsoft.Jet.OLEDB.4.0;" & "Data Source = " &
App.Path & "\dbEnroll.mdb"
temp = ""
End Sub

Public Sub CapFirstLetter(txt As TextBox)


old = txt.SelStart
txt = StrConv(txt, vbProperCase)
txt.SelStart = old
End Sub
Page 53 of 61

Public Sub numbersOnly(KeyAscii As Integer)


Select Case KeyAscii
Case 48 To 57
Case 8
Case Else
KeyAscii = 0
End Select
End Sub

Public Sub lettersOnly(KeyAscii As Integer)


Select Case KeyAscii
Case 32
Case 65 To 90
Case 97 To 122
Case 8
Case Else
KeyAscii = 0
End Select
End Sub

Public Sub MonthList(month As ComboBox)


With month
.AddItem "January"
.AddItem "February"
Page 54 of 61

.AddItem "March"
.AddItem "April"
.AddItem "May"
.AddItem "June"
.AddItem "July"
.AddItem "August"
.AddItem "September"
.AddItem "October"
.AddItem "November"
.AddItem "December"
End With
End Sub

Public Sub genderOnly(gender As ComboBox)


gender.AddItem "Male"
gender.AddItem "Female"
End Sub

Public Sub conditionOnly(cond As ComboBox)


cond.AddItem "Living"
cond.AddItem "Deceased"
End Sub

Public Sub monthsOnly(months As ComboBox)


months.AddItem "January"
Page 55 of 61

months.AddItem "February"
months.AddItem "March"
months.AddItem "April"
months.AddItem "May"
months.AddItem "June"
months.AddItem "July"
months.AddItem "August"
months.AddItem "September"
months.AddItem "October"
months.AddItem "November"
months.AddItem "December"
End Sub

Public Sub yearLevel(level As ComboBox)


level.AddItem "Freshman"
level.AddItem "Sophomore"
level.AddItem "Junior"
level.AddItem "Senior"
End Sub

Public Sub populateComboBox(level, section As Object)


openDB
Set rsPickSect = New ADODB.Recordset

On Error GoTo errTrap


Page 56 of 61

Select Case level


Case "Freshman"
section.Clear
rsPickSect.Open "SELECT * FROM SecSubFirst", con, adOpenStatic,
adLockPessimistic, adCmdText
rsPickSect.MoveFirst
While Not rsPickSect.EOF
section.AddItem rsPickSect("fiSection")
rsPickSect.MoveNext
Wend
rsPickSect.Close
Case "Sophomore"
section.Clear
rsPickSect.Open "SELECT * FROM SecSubSecond", con, adOpenStatic,
adLockPessimistic, adCmdText
rsPickSect.MoveFirst
While Not rsPickSect.EOF
section.AddItem rsPickSect("seSection")
rsPickSect.MoveNext
Wend
rsPickSect.Close
Case "Junior"
section.Clear
rsPickSect.Open "SELECT * FROM SecSubThird", con, adOpenStatic,
adLockPessimistic, adCmdText
rsPickSect.MoveFirst
Page 57 of 61

While Not rsPickSect.EOF


section.AddItem rsPickSect("thSection")
rsPickSect.MoveNext
Wend
rsPickSect.Close
Case "Senior"
section.Clear
rsPickSect.Open "SELECT * FROM SecSubFourth", con, adOpenStatic,
adLockPessimistic, adCmdText
rsPickSect.MoveFirst
While Not rsPickSect.EOF
section.AddItem rsPickSect("foSection")
rsPickSect.MoveNext
Wend
rsPickSect.Close
End Select
errTrap: If Err.Number <> 0 Then MsgBox Err.Description, vbInformation + vbOKOnly,
"Error"
End Sub

Public Sub populateTextBox(mat1, sci1, eng1, fil1, map1, ara1, tle1, val1, adv1 As
TextBox, query, yearLevel As String)

Dim mat2, sci2, eng2, fil2, map2, ara2, tle2, val2, adv2 As String
mat2 = yearLevel & "Math"
sci2 = yearLevel & "Science"
Page 58 of 61

eng2 = yearLevel & "English"


fil2 = yearLevel & "Filipino"
map2 = yearLevel & "MAPEH"
ara2 = yearLevel & "AralPan"
tle2 = yearLevel & "TLE"
val2 = yearLevel & "Values"
adv2 = yearLevel & "Adviser"

openDB
Set rsFill = New ADODB.Recordset
rsFill.Open query, con, adOpenStatic, adLockPessimistic, adCmdText
mat1.Text = IIf(IsNull(rsFill(mat2)), "", rsFill(mat2))
sci1.Text = IIf(IsNull(rsFill(sci2)), "", rsFill(sci2))
eng1.Text = IIf(IsNull(rsFill(eng2)), "", rsFill(eng2))
fil1.Text = IIf(IsNull(rsFill(fil2)), "", rsFill(fil2))
map1.Text = IIf(IsNull(rsFill(map2)), "", rsFill(map2))
ara1.Text = IIf(IsNull(rsFill(ara2)), "", rsFill(ara2))
tle1.Text = IIf(IsNull(rsFill(tle2)), "", rsFill(tle2))
val1.Text = IIf(IsNull(rsFill(val2)), "", rsFill(val2))
adv1.Text = IIf(IsNull(rsFill(adv2)), "", rsFill(adv2))

If rsFill.State = adStateOpen Then rsFill.Close


End Sub

'===========================================================
Page 59 of 61

'DO NOT MIND THESE CODES ===================================


Private Sub Text1_GotFocus()
With Text1
.SelStart = 0
.SelLength = Len(.Text)
End With

rsFill.Open "SELECT * FROM fiSectSched WHERE firstSect = '" & cboTranSect &
"'", cn, adOpenStatic, adLockPessimistic, adCmdText
txtTranMath.Text = IIf(IsNull(rsFill("firstMath")), "", rsFill("firstMath"))
txtTranSci.Text = IIf(IsNull(rsFill("firstScience")), "", rsFill("firstScience"))
txtTranEng.Text = IIf(IsNull(rsFill("firstEnglish")), "", rsFill("firstEnglish"))
txtTranFil.Text = IIf(IsNull(rsFill("firstFilipino")), "", rsFill("firstFilipino"))
txtTranMapeh.Text = IIf(IsNull(rsFill("firstMAPEH")), "", rsFill("firstMAPEH"))
txtTranAral.Text = IIf(IsNull(rsFill("firstAralPan")), "", rsFill("firstAralPan"))
txtTranTLE.Text = IIf(IsNull(rsFill("firstTLE")), "", rsFill("firstTLE"))
txtTranVal.Text = IIf(IsNull(rsFill("firstValues")), "", rsFill("firstValues"))
rsFill.Close

For Each ctrl In Controls


If TypeOf ctrl Is TextBox Then ctrl.Text = ""
If TypeOf ctrl Is ComboBox Then ctrl.ListIndex = -1
Next
End Sub
'DO NOT MIND THESE CODES ===================================
'===========================================================
Page 60 of 61

Page 61 of 61

You might also like