Sunteți pe pagina 1din 104

1

Chapter 1

INTRODUCTION

Background of the Study

The St. Columban’s School is the only private school in the town of Labrador,

Pangasinan. It was born in the hearts and minds of the early Columban fathers who

served in the parish of San Isidro, Labrador. The school was set up in response to the

continued pleas of parents, whose children graduating from the various elementary

schools in the locality had no access to a secondary school in Labrador. The parish priest,

Rev. Fr. Joseph Gallagher, Senior of St. Columban, was persuaded to provide one. The

parish school has come a long way since the opening day in 1954, when Fr. Gallagher,

who became the first director, welcomed thirty-four high school boys and girls in the

ground floor room of the old convent. In the subsequent years, additional classes were

opened. Fr. Eamonn Byrne, Fr. Gallagher’s assistant, became the director of the school

(1956-1957) when the latter went back to his home in Ireland. Thirty-four students

became the first graduates of this institution in 1958.

In time, the school’s standard of teaching became so well known locally that it

attracted many students in nearby towns like Sual, Bugallon and Lingayen. The coming

of the Columban Sisters in 1960 set the next stage of growth for St. Columban’s High

School. The first group included Sisters Mary Camillus Lilis, Elizabeth Kearns and Mary

Collete Coleman, with Mother Mary Bernard as the first Directress, and Sister Carmel

Keogh as the Principal.


2

The years that followed saw the inevitable increase in the enrollment. Successive

communities of Columban sisters sought the help of the people of Labrador and other

friends, to provide the necessary additional accommodation. In April 1995, the Sisters of

St. Columban handed over the ownership of the school to Bishop Jesus A. Cabrera, head

of the Diocese of Alaminos. During the school year 1996-1997, St. Columban’s High

School began its Elementary and Preparatory Departments with 48 junior and senior

kindergarten pupils. The reason for the move was a request from parents who were

sending their children to private elementary schools in Lingayen and who wished to have

a Catholic elementary school set up in Labrador itself. With the drop in enrollment in the

high school, due to the setting up of a national high school nearby St. Columban’s

School, they had room to spare. Plans were set to increase the elementary grades each

year until the completion of the elementary department by SY 1999 – 2000. (2008

Student Handbook of St. Columban’s School, pages 2-3).

Today, St. Columban’s School is under the supervision and management of the

Sisters of St. Joseph of Cluny, with a board of trustees with the Rev. Bishop Marlo M.

Peralta as the director, Sister Anselm Alunkal as the acting directress and Mrs. Imelda

Segarra as the Principal, with 28 faculty members for both elementary and high school

departments.

The population of St. Columban is increasing yearly. They started from thirty-four

students and at present, there are 643 high school students, 196 elementary pupils, and 48

preparatory pupils (kindergarten and day/care) for a total of 887 students. The enrollment

increase creates a great need to have a computer-based system to speed up the


3

enrollment process. To be able to comply with the demands of the clients, the school

should have the shortest and easiest possible way of searching and storing the student’s

data.

The staff-in-charge is having a long time in finding data of students, which

causes the slow enrollment process. Sometimes, the data are misplaced and lost due to

lack of security. It is because, the staff-in-charge writes the record of students on a sheet

of paper. It is a tedious job on the part of the staff-in-charge because it includes many

tasks such as checking if the information are correct, finding for a particular file of their

old students and arranging the files alphabetically after use.

Statement of the Problem

During enrollment at St. Columban’s School, the principal was assigned two

faculty members per year level to handle the enrollment, they check the information and

requirements of the student one-by-one that cause of slow process of enrollment. The

registering student needs to fill up the registration form either he/she is new, old or

transferees. In the cashier the staff-in-charge use manual computation, which results the

delay of issuing receipts of the student that will pay either full payment or monthly

payment. It is big responsibilities in the part of computing the fees of the students.

Furthermore, the staff-in-charge will need to check the information of the books before

giving the rentals and sales book to the students.

St. Columban’s School is operating using manual system in recording the

sales/rentals of books and information of the students, which are filed in the folders and
4

are stored in the filing in the cabinet that is cause of interruption in giving pertinent

papers of the students.

Moreover when students ask for verifications and updates of their record, staff-in-

charge consumes more time and exerts more effort.

Other problems during enrollment which the teachers, students and staff

encounter are:

1. Because more time is consumed in looking for students records, enrollees

tend to wait for a longer period of time.

2. Records are sometimes misplaced because files of the students in the

folder disarrange.

3. Accessing and retrieving files maybe delayed or time consuming because

of manual operation.

Objectives of the Study

General Objectives

The objective of this study is to provide St. Columban’s School a computer- based

enrollment system that will minimize slow enrollment process, will store student

information in a database for instant record access and will make accurate reports and

information of the students in the fastest possible way.

Specific Objectives

Specifically, the system would be able to:

1. provide a user - friendly accessing of student’s record;


5

2. provide an efficient and maintainable system for enrollment by storing

data in the database;

3. provide an immediate on-hand report such as summary of student records

and individual information of students;

4. help assist the user in providing faster services to clients;

5. implement the use of a unique identification number to each student for

easy record tracking; and

6. print information of students, and different forms such as request form,

registration form, assessment form, and enrollment list.

Significance of the Study

This project will minimize the slow enrollment process of St. Columban’s School

by giving students accurate reports in the fastest time. The St. Columban’s School

Enrollment System (SCSES) will help the staff-in-charge to lessen the time in updating,

searching, adding, monitoring, managing as well as printing forms and records of the

students. Furthermore, it will help organize accurate reports of the students in the fastest

possible way.

With this project, St. Columban’s School will be upgraded with the latest

technology that will encourage the parents to enroll their children, not only because of the

quality education that it provides but also with regards to the efficiency of its enrollment

system.
6

Scope and Delimitation

This study is concerned with the enrollment process of St. Columban’s School,

Labrador, Pangasinan. The St. Columban’s School Enrollment System (SCSES) includes

the registering, accurate reports, and updated information. It can search, update, delete,

and view a student’s information on the database. It will secure the system from

unauthorized person. The system is connected into a Local Area Network (LAN) so that

the database can accessed in more than one computer. The system does not include the

storing and computing of grades and the financial expenses of the school, although it can

print forms such as fees, receipt, unsettled accounts, settled accounts and all students

enrolled.

Definition of Terms

The following terms used in this project are defined here.

Back-up – it refers to additional copies of data so that these additional copies may be

used to restore the original, after a data loss event.

Command Button – it is option of the user that will click for every transaction.

Data – are important facts and figures regarding the students such as name, address,

contact number and other personal information.

Database – an orderly collection of information or an integrated collection of computer

data organized and stored in a manner that facilities easy retrieval.

Data Flow Diagram – a top down structured analysis and design tool, which consists

primarily of rectangle with rounded corners representing how data and people
7

interact.

Database Management System (DBMS) – the software that handles the storage,

maintenance and retrieval of data in a database.

Efficient – it is resourceful or working properly.(?)

Enrollment System – it is the process composed of issuance of enrollment forms, paying

of fees in the cashier and issuance of form 137 in registrar and giving the rentals

and sales book.

Error – a mistake due to illegal operation of the system

File –collection of data records that relate to a particular subject.

Form 137 – summary of a student’s grades from previous school attended

Information – collected data into database.

MySQL – a database which can be stored the students information.

Password – keyword(s), phrases or number that must be specified before the system will

run.

Payments – setting of student fees during the whole school year, it includes the tuition

fees, matriculations, down payments and monthly payments.

Profile – refers to the demographic characteristics of the respondents in terms of sex,

year level and name.

Receipts –are proof of list of payments made by the students.

Record – a collection of data elements that relates to a certain subject multiple records

comprise a file.

Registration Form – the form given to the students during the enrollment, which
8

contains student’s information.

Report – is a way to output data from tables or queries that is the summarize of student

information.

Report Card – it contains the grades of the students from the school last attended.

St. Columban’s School Enrollment System (SCSES) – is a computer-based enrollment

system, which can be used by the staff-in-charge to minimize the slow and

manual process of their enrollment.

St. Columban’s School - a private school in the town of Labrador.

Search – act of locating and or withdrawing the needed records.

Section – a partition in which the students is assigned to.

Sort – the order of the records appearing in the database.

System – organized set of related components established to accomplish a certain task.

Table – the basic building blocks of a database; it is where the actual data reside.

Textbox – it is object in Visual Basic that accepts the user input.

User friendly – it is a system that is ready to use and easy to understand for a wide

variety of people.

User Interface – the part of program that interacts with a person using the program.

User’s Manual – the guidelines of the user on how to operate the system.

Utilities – other function which is useful to the user, it contains calculator, calendar and

user manual.

View - a function for which the user can look at the records of the students.

Visual Basic – it is an object oriented, event-driven programming language.


9

Year Level –it is the way were can determine the section of the students or were groups

they belong.
10

Chapter 2

REVIEW OF RELATED LITERATURE AND STUDIES

The following related literature and studies serve as guidelines in understanding

the underlying concepts of the study conducted. These led us to formulate the topic and

strategies in making the computer – based enrollment system.

Related Literature

Computers are being used for instructions, drill and practice, record-keeping, and

other applications. With the over widening application of computers, different

computerized systems are being developed. Likewise, computers are now designed to be

interactive and user-friendly. (Caraque, Ofelia, An Introduction to Information

Technology, Computer Literacy: Manila Rex Bookstores, lnc. 1999)

File management is made easier with the arrival of computers. File operation

starts with the data collection and validation. The contents are changed or updated to cope

up with the rapid change in system requirements and to retrieve the stored information for

the purpose of extracting the needed information. That is getting, inquiring and

generating reports. The file operation will maintain, change, or improve its performance

by restructuring and reorganizing. (Martin, Merlie, Analysis and Design of Business

Information System New York: Macmillan Publishing Company; 1991).

Computer – based systems have been proven to be an essential part of the

contemporary work environment. The number of applications of computer technology is


11

expanding and computer techniques are increasingly employed for purposes such as

control of equipment, monitoring information, storage and retrieval of records (Barry and

Reymund; 1987).

According to Dr. Kurshan Barbara, et al,( Computer Literacy Through

Application) the basic hierarchy of data organization is database, file, and records.

Information system is one of the keys to success in competing business companies. The

informations are readily available, provided that users hold much opportunity to analyze,

make decisions, and easily negotiate with clients. Also, customers can relay information

even beyond national borders.

Computers are found in diverse areas in business, science, education, government

and laws. They are essential in information and communication tasks which build better

facilities for the society. Computers have been used and integrated in many facilities used

in daily activities like ATM machines, elevators, cars, and communication.

Computer hardware and software must be explicitly directed to perform correct

interpretations of the data to be processed. There is almost no aspect of our lives that is

untouched by computers. Activities performed by any type of computers are recorded as

software applications that perform forward planning, scheduling, selling maintaining

school and medical records, detail transactions, reservation system, transportation and

communication. Almost all food processing, manufacturing, power generator and

transmission, water and waste treatment facilities and all the conveniences of modern life

are conducted by computerized animation. It is not new anymore to hear schools switch

to computer-based enrollment system. It commonly occurs that institutions begin


12

operating manually. Since the manual method shows difficulties, the said institutions

proceed with the computerized system (Smith 1998).

Related Studies

The following related studies gave pertinent information to the researchers in the

conduct of their study.

The Pangasinan National High School Enrollment System for Incoming First Year

was designed to relieve the concerned staff-in-charge of the burden of the manual

operation and to make searching, retrieving and updating student records. The system

was developed by Jouly P. Dela Cruz and Edwin V. Eslao.

San Fabian National High School Information System was designed to

computerize the manual operation of managing the faculty and student records of the said

school. It likewise provides an efficient, systematic and secured information system for

the school personnel and student. The San Fabian National High School Information

System was developed by Raymundo P. Ramos, et al.

Polong National High School Students and Faculty Information System was

developed to help lessen the burden in every task done by the school personnel in

managing and generating records of students and teachers. It eliminates certain manual

procedures encountered such as searching, editing and filing records. Also, the system

stores records, provides rapid information to all concerned and provides online help

facility. This system was developed by Deo Duey Canave, Katherine De Guzman Villete

and Noli Mose Mirador.


13

Math Circle Management Information System is created to help the user in

managing profile of the officers and the members of the Math Circle and the faculty of

the Math, Computer Science, and Information and Communications Technology

Department of the Pangasinan State University. This system is designed to eliminate the

difficulties encountered in searching, viewing, processing of records of members and

officers. The system was developed by Virginia Ringor and Angelyn Predas.

Synthesis

The computerized of transaction of the school, the registering and updated

information is help for the staff-in-charge. It lessens the problem in the enrollment

encountered by the school and it provides easy look up for updated the student

information and accurate reports. The related literatures are connected to the study being

conducted. They provide resources and ideas as an accurate basis of the information

regarding the problem under study to integrate and to develop a system more reliable and

efficient.

The related studies have similar concepts to the proposed system.

For instance, the Pangasinan National High School Enrollment System for

Incoming First Year help the researchers in developing a concepts to be included in the

study being undertaken such as registration and accurate report.

The San Fabian National High School Information System and Polong National

High School and Faculty Information System both helped the researchers in developing

the study.
14

Chapter 3

SYSTEM ANALYSIS AND DESIGN

Preliminary Investigation Phase

The purpose of the preliminary investigation phase is to discover the undesirable

situations that prevent the St. Columban’s School Enrollment System (SCSES) from fully

achieving its purpose so that there is a chance to improve the system.

At present, the St. Columban’s School, a diocesan school, is under the supervision

of the Sisters of St. Joseph of Cluny, with a board of trustees headed by Bishop Marlo M.

Peralta D.D as the president and Director Fr. Jim Sheehy, the parish priest. Most of the

students in this school are Roman Catholics, but St. Columban’s School is also accepting

non-Roman Catholic enrollees. Today, St. Columban’s School is increasing in population.

It started with 34 students fifty years ago. And now the school has a population of 887

students, 643 of which are high school students and 244 are elementary and preparatory

pupils.

According to Mrs. Imelda Segarra, the school principal, two faculty members are

assigned in every year level to handle the enrollment. For the new students, the staff-in-

charge informs the about all the requirements and the terms of payments, and checks the

students’ information. It is time consuming on the part of the cashier in computing the

fees of their students. In giving the payments and book rentals, the cashier needs to

ensure that the information of the books is exact, before these will be given to the

students. The staff–in–charge then needs to alphabetically arrange the records of the
15

students who are enrolled and file and store it in the cabinet. This system leads to the

possibility that the information will be damaged, misplaced or lost.

Problem Analysis Phase

Every school year, the population of St. Columban’s School (SCS) is increasing;

therefore it needs a database with a bigger capacity and longer life span. As the number

of students increase, the staff-in-charge encounters problems such as difficulties in

finding students data. It will need a computerized enrollment system to decrease the time-

consuming enrollment process. The security of the information is also needed to

protected from unauthorized persons.

Requirements Analysis Phase

The requirements analysis phase is based from the approved system. In the data of

the new enrollees, old enrollees, and the transferees are collected and gathered. The St.

Columban’s School Enrollment Sysyem (SCSES) will allow the staff-in-charge to encode

data into the system which are to be inputted by the user and are then stored in the

database. Viewing enrollment information according to what the user wants to view;

either by fees or references of students is possible. Printing is one of the important needs

in the system; it must print all data of students, the number of enrollees during the school

year, fees, and other forms. Deleting files, records and other information is a very

confidential procedure that it must only be done by authorized personnel: Lastly, the use

of a security password is recommended.


16

Decision Analysis Phase

Given the requirements, there are alternative ways to design new information

system. The purpose of this phase is to identify candidate solutions, analyze those

candidate solutions for feasibility, and recommend a candidate solution to be designed.

St. Columban’s School is the only private school at Labrador, Pangasinan, It

needs to store data or information of its students. In anticipation, the possibility that there

is an annual increase of enrollees, the system must be networked locally so that sharing

information to other staff in-charge can be done.

MySQL will be the database of the system. The system is designed using Visual

Basic Programming.

Design Phase

The purpose of the design phase is to transform the business requirements

statement from the requirement analysis phase to design specification construction. In

other words, the design phase addresses how technology will be used in the new system.

The main target of this phase is the user. In order to implement this project, it

must be suited to the requirements of the user and it must have a similarity to the

previous system used by the user so that he will not have a difficulty in adjusting to the

new system. The design includes the basic functions such as adding, viewing, editing,

updating and printing of data. With these features, manipulating the data will be easy.
17

Construction Phase

Researchers started a trial and error process in designing and coding the project.

The specification of the system is constructed according to the needs of the user.

Software Visual Programming is used to build the project. The purpose of the system is to

gather data and input to the system so that the data will be manageable easy storage data

of compatible to the software used. Its secured system and interface will make the user to

continue using the system and not to be confused in using the system. One important

aspect of construction is conducting tests of both individual system components as well

as the overall system. It tests the user to identify what are the additional aspects needed to

improve. After the test, the system is ready for implementation.

Implementation Phase

The St. Columban’s School Enrollment System (SCSES) is tested by one of the

staff-in-charge handling the enrollees and the registrar of St. Columban’s School (SCS) to

find out if it suits the needs of their office and to determine what are the other processes

needed in the system to improve the enrollment system of St. Columban’s School (SCS).

The implementation of the data and current records in their files are included in the

system while testing for the exact specification to their system. Individuals are then

trained in using the system and developing documentation to aid system user. During the

implementation, the researcher’s support for the maintenance was required.

CHAPTER 4

RESULTS AND DISCUSSION


18

The researchers aim to improve and to minimize the use of manual system of

generating student’s enrollment records. A computer based enrollment system of St.

Columban’s School was created primarily to have a manageable and user friendly system.

It was developed by using Microsoft Visual Basic 6.0 and its database MySQL.

To start the system, the user must login to the security of the system for securing

important information files.

LOGIN FORM

Figure 1

The user will need to sign in to the login in form entering the user name and the

corresponding password to continue opens the system (See figure 1).

LOGIN ERROR 1
19

Figure 2

Once the user did not input or mistake for typing its password, there will be

prompt that the user has incorrect input of password (See figure 2).

LOGIN ERROR 2

Figure 3

The user has only 3 attempts to enter the correct password. After reaching the all

attempts, the program will automatically terminate (See figure 3)

WELCOME SCREEN
20

Figure 4

Succeeding entry for the correct username and password, it will appear the

welcome screen. And you can restore, edit, update, view, and prints enrollment

information like receipt, students information.

MAIN INTERFACE

Figure 5

In the man interface, you can see the following menus in the upper right hand

corner. FILE TRANSACTION, SETTINGS, PRINT, UTILITIES, ABOUT. (See figure 5)


21

The File Transaction menu has submenus Student Information, Enroll Student,

Book Information, and School Year Setting. In the Student Information it can search by

last name and has submenus that the user can add new and transferee student. To add new

or transferee student has the same process of submitting requirements. (See figure 6)

STUDENT FORM LIST

Figure 6

Add new or transferee, by clicking he add command button on students

information, there will appear a form that contain either the student will enrolled at

primary or secondary year level. This admission process is step by step, there will no
22

exception, strictly to be filled up all requirements in the form. The system generates

student number for the students for avoiding duplicate names in restoring data of student

(See figure 6).

ADD STUDENT FORM

Figure 7

The student number given to the student, it serves as a key in his information. The

enrollees should be given student number. The user will need to choose either high school

or elementary, since the elementary and high school student is different in the students id

and then click the next button to be proceed the next form (See figure 7).

ADD STUDENT FORM


23

Figure 8

The user will type all the students information, if the user if forget some information it

will not proceed to the next form, in clicking the next button it will appear a messages

box contain “Fill-up the highlighted text” after the enrollees can now store their

information and parents information. Confirming that the given data is right and true,

before continuing, it shows the summary of the given data (See figure 7).

ADD STUDENT – PARENT INFORMATION


24

Figure 9

SUMMARY FORM

Figure 10
25

Saving the given information by the enrollees next is assessment of the enrollees

corresponding to the year level and to payments. It prints the receipt if the enrollees I the

enrollees want to print their receipts,

ASSESSMENT FORM

Figure 11

When the enrollee already assessed, the enrollee is now enrolled. His or her

account will be viewed to the interface with the corresponding school year and year level.

All the time, the student can edit his or her information by double clicking to the

data source of adds student form. The student can have his copy for his information with

valid reasons. Just print the information. The old student, fill up the form, if there’s a

changes of his information, the in charge will edit the changes of the student.
26

EDIT STUDENT FORM

Figure 11

ASSESSMENT FORM

Figure 12
27

Figure 12, shows the receipt to be print, all payments stores at a single database.

In this case, the in-charge of enrollment, asking the student if he will pay full tuition or he

will pay installment. By clicking check box of full or monthly at ASSESSMNT FORM, it

will automatically compute the total amount to be paid by the student for his enrollment.

Then the student is now enrolled after paying his down payment. Giving the receipt to the

student to present the receipt to the library to get his rented books. The presented receipt

shows that the student settled his down payment to the cashier.

At the library, the system will stores borrowers book, date borrowed, date

returned, book title, and author of the book. At Figure 13, click adds for the adding

student in the borrowers list, choosing of book requirements for the year level, returning

of books is done after the school year. The student must returned exact book the he or she

borrowed, otherwise, the student will be charge to the book he or she lost.

BOOK INFORMATION

Figure 13
28

BOOK INFORMATION INDIVIDUAL

Figure 14

BOOK INFORMATION

Figure 15
29

In adding book of student, each book has unique code to know that the book is

responsible for particular student. When the user mistaken to entering the book code,

there will prompt that the book is already borrowed. For the user know the action done by

the user if it is correct. The print button prints the student books.

BOOK INFORMATION PRINTING

Figure 16
30

SCHOOL YEAR SETTING

Figure 17

Under FILE TRANSACTION menus on the submenus, School Year Settings is a

setting that the registrar office could create school year enrollment every year.
31

SYSEM INTERFACE

Figure 18

Exiting the system, before it exit there will be prompt that the system is close, to

continue using the system, open the system icon from your desktop and operate it.
32

FEES SETTING

Figure 19

From the second menus, SETTINGS, under Settings menu are Payment Settings,

changing the payments of student for updating details, whether the fees is to decrease or

to increase.
33

BOOK SETTINGS

Figure 20

Book Settings is under setting menus. This setting, updates the books of

student to be borrowed, or to be rent. It add book title and book author in this setting.
34

USER UTILITIES

Figure 21

User Utilities is the account settings of this system. Adding user accounts, editing

user accounts and deleting user accounts. In adding, enter username, password, retype

password, name, address and contact. If these fields are null, then it will failed adding

new user.

USER UTILITIES – Add User

Figure 22
35

STUDENT INFORMATION

Figure 23

Viewing the information of the school, the name of the school, address, and

contact number of the school.


36

PRINT MENU

Figure 24

Printing student information will work when the in-charge select school year and

year level. After selecting school year and year level, there will appear student

information to the current selected school year and year level. When there’s no student

enrolled at that school year, it prompt that there is no record. The user has choices what to

print unsettled accounts, settled accounts and student information.


37

UTILITIES

Figure 25

In the Utilities menu, the user can view the calendar in current date and set the

date. Calculator is to computing other financial assistance of the school.


38

Chapter 5

SUMMARY, CONCLUSION AND RECOMMENDATION

Summary:

The main goal of the St. Columban’s School Enrollment System is not only to

produce accurate records of the students, but also to lessen the time spent and effort in

searching, accessing and filing records. The system gives the school office easy and fast

in work, easy to use and a user- friendly system.

Conclusion:

Based on the developers, evaluation of this system gives the following benefits:

 The proposed system will help the user to search and filing records in a

fastest possible way.

 It can facilitate and minimize the use of manual filing of student’s

record.

 Reduce a certain error which can help to attain accurate information.

Recommendation:

Based on the conduct study, we highly recommended the following;

 The user must be a computer iterate at school office personnel so that the

 User will not be hard up in using the system.

 To prevent the data loss the user must provide a back up file and update

for every transaction.


39

 Providing an anti- virus to the software to avoid corrupt file and slow

down operation.

 We highly recommend maintenance of the system.

 The computer must be Pentium III, Pentium IV to work the system, the

hard disk must be minimum of 15 gigabytes, 128 memory and

above, 64Hz VGA and the operating system is windows 2000,

windows XP.
40

BIBLIOGRAPHY

BOOKS
1
CARAQUE, OFELIA. An Introduction to Information Technology, Computer

Literacy; Manila Rex Bookstores, Inc; 1999.


2
KURSHAN, BARBARA L. et al, Computer Literacy Through Application;

1995.
3
MARTIN MERLIE P., Analysis and Design of Business Information; New York:

Macmillan Publishing Company; 1991.


4
WHITTEN JEFFREY L. et al, Systems Analysis and Design Methods; Fifth

Edition, McGraw-Hill Higher Education;

JOURNAL

GEORGE SMITH, Wall Street Journal, September 8, 1998.

Student Handbook 2008 of St. Columban’s School, pages 2-3.

THESIS BOOKS
1
CAVANE DEO DUEY et al, Polong National High School and Faculty

Information System; March 2005.


2
DELA CRUZ JOULY P. et al, Pangasinan National High School Enrollment

System for Incoming First Year; March 2005.


3
PREDAS ANGELYN C. et al, Math Circle Management Information System

(MC-MIS); March 2008.


4
RAMOS RAYMUND P. et al, San Fabian National High School Information

System; March 2006.


41
42
43

Transaction
User Accounts Students_info
ACCOUNTS id_or (PK)
Students_info sno (FK)
Username
date_paid
Password
fees
Name Students_info school_year,
Contact
Address
sno(PK)
lname
fname
mname
barangay
town
province
Book_information birthdate
sex
book_title (PK) contact
bookauthor school_attended
general_average
form137
transcript
birth_certiicate
baptism
confirmation
firstcommunion Tb-fees
f_lname Students_info
f_fname year_level (PK)
Tb-book-rental_ matriculation_fees
f_mname
laboratory_fees
Sno (FK)
f_occu library_fees
bokcode(PK) m_lname medical_fees
book_date m_fname athletic_fees
book_renturn_date m_mname guidance
school_year book_rentals
m_occu
year_level bato_balani
book_title
parents_contact snj
book_author values_magazine
id tuition
monthly_payment
ASSESSMENT
SCSES INFO
Entity Relationship Diagram
Figure 26 har(45) NOT
NULL,
`snj` varchar(45)
NOT NULL,

`values_magazine`
varchar(45) NOT
NULL,
`id` varchar(45)
NOT NULL,
varchar(45) NOT
NULL,

`monthly_paymen 44
ts` varchar(45)
NOT NULL,
PRIMARY KEY
(`year_level`)
)
ENGINE=InnoDB
DEFAULT
CHARSET=latin1
;

STUDENT’S
INFORMATION
STUDENT
Student
Requirements

Saint Columban’s School


Enrollment System

PRINCIPAL
ENROLLED STUDENT

SCSES Context Data Flow Diagram


Figure 27
45

Student Requirements 1 PRINCIPAL


STUDENT
REGISTRATION
Student Info

Student 3
Requirements
GENERAL REPORT
Registration Form

Student Info

Student Info
2
Student Info D1
VALIDATION
Student Info

Explotion Context Dataflow


Figure 28

Registration Form 1 ASSESSMENT INFO


STUDENT
ASSESSMENT FEES

D2 FEES

2. Explotion Context Dataflow

Figure 29
46

USER STUDENT_INFO BOOKS_INFO TRANSACTIONS

Username sno(PK) book_title (PK) id_or (PK)


Password lname bookauthor sno (FK)
Name fname date_paid
Address mname fees
contact barangay school_year,
town
province
birthdate
sex
contact
school_attended
general_average
form137
transcript
birth_certiicate
baptism
confirmation
firstcommunion
f_lname
f_fname FEES
f_mname
f_occu
m_lname year_level (PK)
m_fname matriculation_fees
m_mname laboratory_fees
m_occu library_fees
parents_contact medical_fees
thletic_fees guidance
book_rentals bato_balani
snj
values_magazine
id
tuition monthly_payment

SCSES Database Schema

Figure 30
47

START

HIGH SCHOOL/ ELEM

ADD STUDENT

DATA
DELETE

A
Y

N
DATA AND BOOK RENT
A DELETE INFORMATION AND SALES

PAYMENT
SECTION

PRINT FORMS,
ENROLLEES, AND END
RECEIPT

SCSES Flow Chart


Figure 31
48
49
50

TABLES

Database name: db_student


Table name: tb_student

Field Type Null Key Description


Sno Varchar(20) no PRI Student number
Lname Varchar(20) no Last name
Fname Varchar(20) no First name
Mname varchart(20) no Middle name
Barangay Varchar(20) no Barangay
Town Varchar(20) no Town
Province Varchar(20) no Province
Birthdate Varchar(20) no Birthdate
General_average Varchar(20) no General average
Form 137 Varchar(20) no Form 137
Transcript Varchar(20) No Transcript
Birth_certiicate Varchar(20) no Birth certificate
Baptism Varchar(20) no Baptism
Confirmation Varchar(20) no Confirmation
firstcommunion Varchar(20) no First communion
F_lname Varchar(20) no Father last name
F_fname Varchar(20) no Father first name
F_mname Varchar(20) no Father middle name
F_cccu Varchar(20) no Father occupation
M_lname Varchar(20) no Mother last name
M_fname Varchar(20) no Mother first name
M_mname Varchar(20) no Mother middle name
M_occu Varchar(20) no Mother occupation
Parents_contact Varchar(20) no Parents contact
date Varchar(20) no Date
Year_level Varchar(20) no Year level

Table 1

Database name: db_student


Table name: tb_book
Field Type Null Key Description
Book_title Varchar(20) no PRI Book title
Book_author Varchar(20) no Book author

Table 2
51

Database name:db_student
Table name: tb_book_rental

Field Type Null Key Description


Id_book_rental Varchar(20) no PRI ID book rental
Sno Varchar(20) no Student number
Book_code Varchar(20) no Book code
Book_date Varchar(20) no Book date borrow
Book_return_date Varchar(20) no Book date return
School_year Varchar(20) no School year
Year_level Varchar(20) no Year level
Book_title Varchar(20) no Book title
Book_author Varchar(20) no Book author

Table 3

Database name:db_student
Table name: tbuser

Field Type Null Key Description


Username Varchar(20) no PRI User name
Password Varchar(20) no Password
Name Varchar(20) no Name
Contact varchart(20) no Contact number
Address Varchar(20) no Address

Table 4

Database name:db_student
Table name: tb_fees

Field Type Null Key Description


Year_level Varchar(20) no PRI Year level
Matriculation_fees Varchar(20) no Matriculation fees
Library_fees Varchar(20) no Library fees
Medical_fees varchart(20) no Medical fees
Athletic_fees Varchar(20) no Athletic fees
guidance Varchar(20) no guidance
Book_rentals Varchar(20) no Book rentals
Bato_balani Varchar(20) no Bato balani
Snj Varchar(20) no Student news journal
Values_magazine Varchar(20) no Values magazine
id varchar no id
Tuition Varchar(20) no Tuition fees
Monthly_payments Varchar(20) no Monthly payments
52

Table 5

Database name: db_student


Table name: tb_transaction

Field Type Null Key Description


Id_or Varchar(20) no Official receipts
Sno Varchar(20) no Student number
Date_paid Varchar(20) no Date paid
fees varchar no Fees
School_year Varchar(20) no School year

Table 6
53
54

CODES
MDImain form

Option Explicit
Dim sql As String
Dim rs As ADODB.Recordset
Dim i As Integer
Dim rsndi As ADODB.Recordset
Dim rsname As ADODB.Recordset

Private Sub alls_Click()


Dim sqlunsettled As String
Dim rsunsettled As ADODB.Recordset
sqlunsettled = "select sno1, charge,
((matriculation_fees+laboratory_fees+library_fees+medical_fees+athletic_fees+guidance+book_r
entals+bato_balani+snj+values_magazine+id+tuition)-(charge)) as paid, fname, lname, mname,
year_level1 as yearlevel, section from tb_syenrollees a, tb_student b, tb_fees where a.sno1 =
b.sno and a.school_year = '" & Combo1.Text & "' and a.year_level1 = '" & Combo2.Text & "' and
tb_fees.year_level = '" & Combo2.Text & "'"
Set rsunsettled = db.Execute(sqlunsettled)
Set DataReport3.DataSource = rsunsettled
DataReport3.Sections("Section2").Controls("Label3").Caption = Combo1.Text
DataReport3.Sections("Section2").Controls("Label5").Caption = Combo2.Text
DataReport3.Sections("Section2").Controls("Label13").Caption = rsunsettled.RecordCount
DataReport3.Sections("Section2").Controls("Label7").Caption = Date

DataReport3.Show vbModal

End Sub

Private Sub bi_Click()


book_information.Show vbModal
End Sub

Private Sub bokset_Click()


frmsetting.Show vbModal
End Sub

Private Sub calcu_Click()


Shell "calc.exe"
End Sub

Private Sub cale_Click()


calendar.Show vbModal
55

End Sub

Private Sub Combo1_Click()


If Combo2.Text = "" Then
Else
Call Combo2_Click
End If

End Sub

Private Sub Combo2_Click()


DataGrid1.Visible = True
sql = "select sno, charge as balance,
((matriculation_fees+laboratory_fees+library_fees+medical_fees+athletic_fees+guidance+book_r
entals+bato_balani+snj+values_magazine+id+tuition)-(charge)) as paid, fname, lname, mname,
year_level1 as yearlevel, section from tb_syenrollees a, tb_student b, tb_fees where a.sno1 =
b.sno and a.school_year = '" & Combo1.Text & "' and a.year_level1 = '" & Combo2.Text & "' and
tb_fees.year_level = '" & Combo2.Text & "'"
Set rs = db.Execute(sql)
If rs.RecordCount = 0 Then
MsgBox "No Records.", vbOKOnly + vbExclamation, "No records."
DataGrid1.Visible = False
End If
Set DataGrid1.DataSource = rs
Combo3.Text = rs.RecordCount
End Sub

Private Sub Command1_Click()


Call Combo2_Click
End Sub

Private Sub DataGrid1_DblClick()


If rs.Fields("balance") = 0 Then
MsgBox "Settled all accounts", vbInformation, "Settled Accounts"
Else
frmmonthlypayments.Text1.Text = rs.Fields("sno")
frmmonthlypayments.Label3.Caption = Combo2.Text
frmmonthlypayments.Show vbModal
End If
End Sub

Private Sub enrollstud_Click()


frmenroll.Show , MDImain
End Sub

Private Sub exit_Click()


Unload Me
End Sub
56

Private Sub Form_Load()


DataGrid1.Visible = False
Call SetConnection("localhost", "db_student", "root", "")
sql = "select * from school_year"
Set rs = db.Execute(sql)
For i = 1 To rs.RecordCount
Combo1.AddItem rs.Fields("school_year")
rs.MoveNext
Next i
End Sub

Private Sub Form_Unload(Cancel As Integer)


MsgBox "System close.", vbOKOnly + vbDefaultButton4, "Exi†"
End Sub

Private Sub ia_Click()


Dim sqlname As String
If Combo1.Text = "" Then
MsgBox "Select school year."
Else
If Combo2.Text = "" Then
MsgBox "Select year level."
Else
sqlname = "select lname, fname, mname from tb_student where sno = '" & rs.Fields("sno") & "'"
Set rsname = db.Execute(sqlname)
sql = "select id_or, fees, date_paid from tb_transaction where sno = '" & rs.Fields("sno") & "' and
school_year = '" & Combo1.Text & "'"
Set rsndi = db.Execute(sql)
Set DataReport2.DataSource = rsndi
DataReport2.Sections("Section2").Controls("Label2").Caption = rs.Fields("sno")
DataReport2.Sections("Section2").Controls("Label7").Caption = Date
DataReport2.Sections("Section2").Controls("Label8").Caption = "" & rsname.Fields("lname") &
", " & rsname.Fields("fname") & " " & rsname.Fields("mname") & ""
DataReport2.Sections("Section2").Controls("Label3").Caption = Combo1.Text
Dim o As Integer
Dim coun As Integer
coun = 0
For o = 1 To rsndi.RecordCount
coun = Val(coun) + Val(rsndi.Fields("fees"))
rsndi.MoveNext
Next o
Dim rss As ADODB.Recordset
Dim sqle As String
sqle = "select
(matriculation_fees+laboratory_fees+library_fees+medical_fees+athletic_fees+guidance+book_r
entals+bato_balani+snj+values_magazine+id+tuition) as full from tb_fees where year_level = '"
& Combo2.Text & "'"
57

Set rss = db.Execute(sqle)


DataReport2.Sections("Section3").Controls("Label12").Caption = coun
DataReport2.Sections("Section3").Controls("Label15").Caption = rss.Fields("full") - coun

DataReport2.Show vbModal
End If
End If
End Sub

Private Sub payset_Click()


setfees.Show vbModal
End Sub

Private Sub sas_Click()


Dim sqlunsettled As String
Dim rsunsettled As ADODB.Recordset
sqlunsettled = "select sno1, charge,
((matriculation_fees+laboratory_fees+library_fees+medical_fees+athletic_fees+guidance+book_r
entals+bato_balani+snj+values_magazine+id+tuition)-(charge)) as paid, fname, lname, mname,
year_level1 as yearlevel, section from tb_syenrollees a, tb_student b, tb_fees where a.sno1 =
b.sno and a.school_year = '" & Combo1.Text & "' and a.year_level1 = '" & Combo2.Text & "' and
tb_fees.year_level = '" & Combo2.Text & "' and charge = 0"
Set rsunsettled = db.Execute(sqlunsettled)
Set DataReport3.DataSource = rsunsettled
DataReport3.Sections("Section2").Controls("Label3").Caption = Combo1.Text
DataReport3.Sections("Section2").Controls("Label5").Caption = Combo2.Text
DataReport3.Sections("Section2").Controls("Label13").Caption = rsunsettled.RecordCount
DataReport3.Sections("Section2").Controls("Label7").Caption = Date

DataReport3.Show vbModal

End Sub

Private Sub schoolsetting_Click()


frmschoolsetting.Show , MDImain
End Sub

Private Sub sd_Click()


MsgBox "System Developers." & vbCrLf & "JAY DE GUZMAN" & vbCrLf & "MARINES
MAMARLAO" & vbCrLf & "MADELYN MISLANG", vbInformation, "System Developers"

End Sub

Private Sub si_Click()


If Combo1.Text = "" Then
MsgBox "Select School year.", vbInformation, ""
Else
If Combo2.Text = "" Then
58

MsgBox "Select year level.", vbInformation, ""


Else
Dim sql_in As String
Dim rs_in As ADODB.Recordset
sql_in = "select * from tb_student where sno = '" & rs.Fields("sno") & "'"
Set rs_in = db.Execute(sql_in)

Set DataReport5.DataSource = rs_in


DataReport5.Sections("Section2").Controls("Label2").Caption = rs_in.Fields("sno")
DataReport5.Sections("Section2").Controls("Label15").Caption = "" & rs_in.Fields("lname") &
", " & rs_in.Fields("fname") & " " & rs_in.Fields("mname") & ""

DataReport5.Sections("Section2").Controls("Label17").Caption = rs_in.Fields("birthdate")
DataReport5.Sections("Section2").Controls("Label16").Caption = "" & rs_in.Fields("barangay")
& ", " & rs_in.Fields("town") & " " & rs_in.Fields("province") & ""
DataReport5.Sections("Section2").Controls("Label19").Caption = "" & rs_in.Fields("sex") & ""
DataReport5.Sections("Section2").Controls("Label20").Caption = rs_in.Fields("contact")
DataReport5.Sections("Section2").Controls("Label21").Caption = "" & rs_in.Fields("f_lname") &
", " & rs_in.Fields("f_fname") & " " & rs_in.Fields("f_mname") & ""
DataReport5.Sections("Section2").Controls("Label22").Caption = rs_in.Fields("f_occu")
DataReport5.Sections("Section2").Controls("Label23").Caption = "" & rs_in.Fields("m_lname")
& ", " & rs_in.Fields("m_fname") & " " & rs_in.Fields("f_mname") & ""
DataReport5.Sections("Section2").Controls("Label24").Caption = rs_in.Fields("m_occu")
DataReport5.Sections("Section2").Controls("Label25").Caption = rs_in.Fields("parents_contact")

DataReport5.Show vbModal

End If
End If
End Sub

Private Sub ss_Click()


school_info.Show vbModal
End Sub

Private Sub studinfo_Click()


frmstudent.Show , MDImain
End Sub

Private Sub Timer1_Timer()


Call Combo2_Click
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)


Select Case Button.Index
Case 1:
studinfo_Click
Case 2:
59

enrollstud_Click
Case 3:
bi_Click
Case 4:
si_Click
Case 5:
useraccounts_Click
End Select
End Sub

Private Sub ua_Click()


Dim sqlunsettled As String
Dim rsunsettled As ADODB.Recordset
sqlunsettled = "select sno1, charge,
((matriculation_fees+laboratory_fees+library_fees+medical_fees+athletic_fees+guidance+book_r
entals+bato_balani+snj+values_magazine+id+tuition)-(charge)) as paid, fname, lname, mname,
year_level1 as yearlevel, section from tb_syenrollees a, tb_student b, tb_fees where a.sno1 =
b.sno and a.school_year = '" & Combo1.Text & "' and a.year_level1 = '" & Combo2.Text & "' and
tb_fees.year_level = '" & Combo2.Text & "' and charge > 0"
Set rsunsettled = db.Execute(sqlunsettled)
Set DataReport3.DataSource = rsunsettled
DataReport3.Sections("Section2").Controls("Label3").Caption = Combo1.Text
DataReport3.Sections("Section2").Controls("Label5").Caption = Combo2.Text
DataReport3.Sections("Section2").Controls("Label13").Caption = rsunsettled.RecordCount
DataReport3.Sections("Section2").Controls("Label7").Caption = Date

DataReport3.Show vbModal
End Sub

Private Sub useraccounts_Click()


frmuser.Show vbModal
End Sub

__________________________________________________________

book_information form

Option Explicit
Dim sql As String
Dim rs As ADODB.Recordset

Private Sub Combo1_Click()


If Combo2.Text = "" Then
DataGrid1.Visible = False
Else
sql = "select sno, count(sno) from tb_book_rental where school_year = '" & Combo1.Text & "'
and year_level = '" & Combo2.Text & "' group by sno"
Set rs = db.Execute(sql)
60

If rs.RecordCount = 0 Then
MsgBox "No records.", vbCritical, "No records."
DataGrid1.Visible = False

Else
DataGrid1.Visible = True
Set DataGrid1.DataSource = rs
End If
End If
End Sub

Private Sub Command1_Click()


Unload Me
End Sub

Private Sub Command3_Click()


frmstud_book.Show vbModal
End Sub

Private Sub DataGrid1_DblClick()


frm_book.Label4.Caption = rs.Fields("sno")
frm_book.Combo2.Text = Combo1.Text
frm_book.Combo3.Text = Combo2.Text
frm_book.Show vbModal
End Sub

Private Sub Form_Load()


DataGrid1.Visible = False
Call SetConnection("localhost", "db_student", "root", "")
sql = "select * from school_year order by school_year desc"
Set rs = db.Execute(sql)
Dim i As Integer
For i = 1 To rs.RecordCount
Combo1.AddItem rs.Fields("school_year")
rs.MoveNext
Next i
End Sub
Private Sub Combo2_Click()
sql = "select sno, count(sno) from tb_book_rental where school_year = '" & Combo1.Text & "'
and year_level = '" & Combo2.Text & "' group by sno"

Set rs = db.Execute(sql)
If rs.RecordCount = 0 Then
MsgBox "No records.", vbOKOnly, "No records"
DataGrid1.Visible = False
Else
DataGrid1.Visible = True
Set DataGrid1.DataSource = rs
61

End If
End Sub

________________________________________________________

frm_book form

Option Explicit
Dim sql As String
Dim rs As ADODB.Recordset
Dim rs1 As ADODB.Recordset
Dim sett As String

Private Sub Combo1_Click()


sql = "select book_author from " & sett & " where book_title = '" & Combo1.Text & "'"
Set rs1 = db.Execute(sql)
Text4.Text = rs1.Fields("book_author")

End Sub

Private Sub Combo2_Click()


Combo3.Clear
sql = "select year_level1 from tb_syenrollees where school_year = '" & Combo2.Text & "' and
sno1 = '" & Label4.Caption & "'"
Set rs = db.Execute(sql)

Dim i As Integer
For i = 1 To rs.RecordCount
Combo3.Text = rs.Fields("year_level1")
rs.MoveNext
Next i
If Combo3.Text = "" Then
DataGrid1.Visible = False
Else
sql = "select book_title, book_code, book_date as Date_Borrowed, book_return_date as
Date_Returned, book_author from tb_book_rental where sno ='" & Label4.Caption & "' and
school_year = '" & Combo2.Text & "' and year_level = '" & Combo3.Text & "'"
Set rs = db.Execute(sql)
If rs.RecordCount = 0 Then
DataGrid1.Visible = False
Else
DataGrid1.Visible = True

Set DataGrid1.DataSource = rs
End If
End If

End Sub
62

Private Sub Combo3_Click()


If Combo2.Text = "" Then
Else
sql = "select book_title, book_code, book_date as Date_Borrowed, book_return_date as
Date_Returned, book_author from tb_book_rental where sno ='" & Label4.Caption & "' and
school_year = '" & Combo2.Text & "' and year_level = '" & Combo3.Text & "'"
Set rs = db.Execute(sql)
Set DataGrid1.DataSource = rs
End If

End Sub

Private Sub Command1_Click()


If Combo1.Text = "" Then
MsgBox "please choose book title", vbQuestion, ""
ElseIf Text4.Text = "" Then
MsgBox "please choose book title", vbQuestion, ""
ElseIf Text1.Text = "" Then
MsgBox "please input book code", vbQuestion, ""
Else

sql = "select book_title, book_code from tb_book_rental where book_title='" & Combo1.Text &
"' and book_code = '" & Text1.Text & "' and school_year = '" & Combo2.Text & "'"
Set rs1 = db.Execute(sql)
If rs1.RecordCount > 0 Then
MsgBox "Book already rent by another student."
Else
sql = "select * from tb_book_rental where sno = '" & Label4.Caption & "' and school_year = '" &
Combo2.Text & "' and year_level = '" & Combo3.Text & "' and book_title = '" & Combo1.Text &
"'"
Set rs1 = db.Execute(sql)

If rs1.RecordCount > 0 Then


MsgBox "Book title already rent.", vbInformation, ""
Else
sql = "insert into tb_book_rental(sno, book_code, book_date, school_year, year_level, book_title,
book_author) values('" & Label4.Caption & "','" & Text1.Text & "','" & Date & "','" &
Combo2.Text & "','" & Combo3.Text & "','" & Combo1.Text & "','" & Text4.Text & "')"
Set rs = db.Execute(sql)
MsgBox "Book Added!", vbInformation, "New Added"
Call Combo2_Click
End If
End If
End If
Text1.Text = ""
End Sub
63

Private Sub Command2_Click()


Unload Me
End Sub

Private Sub Command3_Click()


Set DataReport4.DataSource = rs
DataReport4.Sections("Section2").Controls("Label2").Caption = Combo2.Text
DataReport4.Sections("Section2").Controls("Label6").Caption = Date
DataReport4.Sections("Section2").Controls("Label15").Caption = Label4.Caption
DataReport4.Sections("Section2").Controls("Label4").Caption = Combo3.Text
DataReport4.Sections("Section2").Controls("Label17").Caption = rs.RecordCount
Dim sqlview As String
Dim rsview As ADODB.Recordset
sqlview = "select * from tb_student where sno = '" & Label4.Caption & "'"
Set rsview = db.Execute(sqlview)
DataReport4.Sections("Section2").Controls("Label8").Caption = "" & rsview.Fields("lname") &
", " & rsview.Fields("fname") & " " & rsview.Fields("mname") & ""

DataReport4.Show vbModal
Form_Load
End Sub

Private Sub Command4_Click()


If Text7.Text = "" Then
Dim response As String
response = MsgBox("Do you want to continue?", vbYesNo + vbQuestion, "")
If response = vbNo Then
ElseIf response = vbYes Then
sql = "update tb_book_rental set book_return_date = '" & Date & "' where sno = '" &
Label4.Caption & "' and school_year='" & Combo2.Text & "' and book_title='" &
rs.Fields("book_title") & "'"
Set rs = db.Execute(sql)
MsgBox "Book returned!", vbOKOnly + vbInformation, ""
Call Combo2_Click
End If
Else
MsgBox "Book returned already.", vbOKOnly + vbCritical, ""
End If
End Sub

Private Sub DataGrid1_Click()

Text2.Text = rs.Fields("book_title")
Text3.Text = rs.Fields("book_author")
Text5.Text = rs.Fields("book_code")
Text6.Text = rs.Fields("Date_Borrowed")
Text7.Text = rs.Fields("Date_Returned")
End Sub
64

Private Sub Form_Load()


Call locke
Text4.locked = True
Call SetConnection("localhost", "db_student", "root", "")
sql = "select school_year from school_year order by school_year"
Set rs = db.Execute(sql)
Dim i As Integer
Combo2.Clear
For i = 1 To rs.RecordCount
Combo2.AddItem rs.Fields("school_year")
rs.MoveNext
Next i

If book_information.Combo2.Text = "1ST YEAR" Then


sett = "tb_book_hs"
ElseIf book_information.Combo2.Text = "2ND YEAR" Then
sett = "tb_book_hs"
ElseIf book_information.Combo2.Text = "3RD YEAR" Then
sett = "tb_book_hs"
ElseIf book_information.Combo2.Text = "4TH YEAR" Then
sett = "tb_book_hs"
ElseIf book_information.Combo2.Text = "PREP" Then
sett = "tb_book_elem"
ElseIf book_information.Combo2.Text = "KINDER" Then
sett = "tb_book_elem"
ElseIf book_information.Combo2.Text = "GRADE 1" Then
sett = "tb_book_elem"
ElseIf book_information.Combo2.Text = "GRADE 2" Then
sett = "tb_book_elem"
ElseIf book_information.Combo2.Text = "GRADE 3" Then
sett = "tb_book_elem"
ElseIf book_information.Combo2.Text = "GRADE 4" Then
sett = "tb_book_elem"
ElseIf book_information.Combo2.Text = "GRADE 5" Then
sett = "tb_book_elem"
ElseIf book_information.Combo2.Text = "GRADE 6" Then
sett = "tb_book_elem"
End If

sql = "select * from " & sett & ""


Set rs = db.Execute(sql)
For i = 1 To rs.RecordCount
Combo1.AddItem rs.Fields("book_title")
rs.MoveNext
Next i
End Sub
65

Private Sub unless()

End Sub
Private Sub locke()
Text2.locked = True
Text3.locked = True
Text5.locked = True
Text6.locked = True
Text7.locked = True
End Sub

________________________________________________________

frmaddschoolyear form

Private Sub Command1_Click()


sql = "select * from school_year where school_year = '" & Text1.Text & "'"
Set rs = db.Execute(sql)

If rs.RecordCount Then
MsgBox "Invalid school year.", vbOKOnly + vbCritical, ""
Else
sql = "insert into school_year values('" & Text1.Text & "')"
Set rs = db.Execute(sql)
MsgBox "School Year " & Text1.Text & " created", vbOKOnly, ""
Unload Me
End If
End Sub

Private Sub Form_Load()


Call SetConnection("localhost", "db_student", "root", "")
End Sub

________________________________________________________

frmaddstudent form

Option Explicit
Dim sql As String
Dim rs As ADODB.Recordset
Dim error As Integer

Private Sub Combo1_Change()


Combo1.BackColor = &H80000005
End Sub

Private Sub Combo1_Click()


66

Combo1.BackColor = &H80000005
End Sub

Private Sub Combo2_Change()


If Not IsNumeric(Combo2) Then
Combo2.Text = ""
End If
Combo2.BackColor = &H80000005
End Sub

Private Sub Combo2_Click()


Combo2.BackColor = &H80000005
End Sub

Private Sub Combo3_Change()


If Not IsNumeric(Combo3) Then
Combo3.Text = ""
End If

Combo3.BackColor = &H80000005
End Sub

Private Sub Command1_Click()


Unload Me
End Sub

Private Sub Command10_Click()


sql = "insert into tb_student values('" & UCase(Text1.Text) & "','" & UCase(Text2.Text) & "','" &
UCase(Text3.Text) & "','" & UCase(Text4.Text) & "', " & _
"'" & UCase(Text5.Text) & "','" & Text6.Text & "','" & UCase(Text7.Text) & "','" &
DTPicker1.value & "','" & UCase(Combo1.Text) & "','" & UCase(Text8.Text) & "'," & _
"'" & UCase(Text9.Text) & "','" & UCase(Text11.Text) & "','" & Check1.value & "','" &
Check2.value & "','" & Check3.value & "','" & Check4.value & "'," & _
"'" & Check5.value & "','" & Check6.value & "','" & UCase(Text12.Text) & "','" &
UCase(Text13.Text) & "','" & UCase(Text14.Text) & "','" & UCase(Combo2.Text) & "'," & _
"'" & UCase(Text15.Text) & "','" & UCase(Text16.Text) & "','" & UCase(Text17.Text) & "','" &
UCase(Combo3.Text) & "','" & UCase(Text18.Text) & "','" & Date & "','" & Label27.Caption &
"')"
Set rs = db.Execute(sql)
MsgBox "Student SAVE", vbOKOnly, ""
Dim tofind As String

tofind = Text1.Text
Me.Hide
frmenroll.Show
SendKeys tofind
SendKeys "{enter}"
Unload Me
67

End Sub

Private Sub Command11_Click()


Unload Me
End Sub

Private Sub Command12_Click()


SSTab1.Tab = 2
End Sub

Private Sub Command13_Click()


Label27.Caption = "A"
sql = "select * from hsnumber order by idno desc"
Set rs = db.Execute(sql)
If rs.RecordCount = 0 Then
sql = "insert into hsnumber values()"
Set rs = db.Execute(sql)
sql = "select * from hsnumber order by idno desc"
Set rs = db.Execute(sql)
Text1.Text = Format(Now(), "yyyy-") & Format(rs.Fields("idno"), "0000000""A")

Else

sql = "insert into hsnumber values()"


Set rs = db.Execute(sql)
sql = "select * from hsnumber order by idno desc"
Set rs = db.Execute(sql)
Text1.Text = Format(Now(), "yyyy-") & Format(rs.Fields("idno"), "0000000""A")
End If
frmaddstudent.Caption = "Student Number: " & Text1.Text & ""
End Sub

Private Sub Command2_Click()


If Text1.Text = "" Then
MsgBox "Please choose year level to continue registration."
SSTab1.Tab = 0
Else
SSTab1.Tab = 1
End If
End Sub

Private Sub Command3_Click()


error = 0
If Text2.Text = "" Then
error = 1
Text2.BackColor = &H8080FF
End If
68

If Text3.Text = "" Then


error = 1
Text3.BackColor = &H8080FF
End If
If Text4.Text = "" Then
error = 1
Text4.BackColor = &H8080FF
End If
If Text5.Text = "" Then
error = 1
Text5.BackColor = &H8080FF
End If
If Text6.Text = "" Then
error = 1
Text6.BackColor = &H8080FF
End If
If Text7.Text = "" Then
error = 1
Text7.BackColor = &H8080FF
End If
If Text10.Text = "" Then
error = 1
Text10.BackColor = &H8080FF
End If
If Combo1.Text = "" Then
error = 1
Combo1.BackColor = &H8080FF
End If
If Text8.Text = "" Then
error = 1
Text8.BackColor = &H8080FF
End If
If Text9.Text = "" Then
error = 1
Text9.BackColor = &H8080FF
End If
If Text11.Text = "" Then
error = 1
Text11.BackColor = &H8080FF
End If
If error = 1 Then
MsgBox "Please Fill-up all highlighted requirements.", vbOKOnly, ""
Else
SSTab1.Tab = 2
End If
End Sub

Private Sub Command4_Click()


69

Unload Me
End Sub

Private Sub Command5_Click()


Label27.Caption = "E"
sql = "select * from elemnumber order by idno desc"
Set rs = db.Execute(sql)
If rs.RecordCount = 0 Then
sql = "insert into elemnumber values()"
Set rs = db.Execute(sql)
sql = "select * from elemnumber order by idno desc"
Set rs = db.Execute(sql)
Text1.Text = Format(Now(), "yyyy-") & Format(rs.Fields("idno"), "0000000""E")
Else

sql = "insert into elemnumber values()"


Set rs = db.Execute(sql)
sql = "select * from elemnumber order by idno desc"
Set rs = db.Execute(sql)
Text1.Text = Format(Now(), "yyyy-") & Format(rs.Fields("idno"), "0000000""E")

End If
frmaddstudent.Caption = "Student Number: " & Text1.Text & ""
End Sub

Private Sub Command6_Click()


SSTab1.Tab = 0
End Sub

Private Sub Command7_Click()


error = 0
If Text12.Text = "" Then
error = 1
Text12.BackColor = &H8080FF
End If
If Text13.Text = "" Then
error = 1
Text13.BackColor = &H8080FF
End If
If Text14.Text = "" Then
error = 1
Text14.BackColor = &H8080FF
End If
If Text15.Text = "" Then
error = 1
Text15.BackColor = &H8080FF
End If
If Text16.Text = "" Then
70

error = 1
Text16.BackColor = &H8080FF
End If
If Text17.Text = "" Then
error = 1
Text17.BackColor = &H8080FF
End If
If Text18.Text = "" Then
error = 1
Text18.BackColor = &H8080FF
End If
If Combo2.Text = "" Then
error = 1
Combo2.BackColor = &H8080FF
End If
If Combo3.Text = "" Then
error = 1
Combo3.BackColor = &H8080FF
End If
If error = 1 Then
MsgBox "Please Fill-up the highlighed requirements."
SSTab1.Tab = 2
Else
SSTab1.Tab = 3
Call preview
End If
End Sub

Private Sub Command8_Click()


Unload Me
End Sub

Private Sub Command9_Click()


SSTab1.Tab = 1
End Sub

Private Sub DTPicker1_GotFocus()


DTPicker1.value = Month(Date) & "/" & Day(Date) & "/" & Year(Date) - 10
End Sub

Private Sub DTPicker1_LostFocus()


Dim current_date As String
Dim birth_date As String
Dim dy As String
Dim dm As String

current_date = Date
birth_date = DTPicker1.value
71

dy = Year(current_date) - Year(birth_date)
dm = Month(current_date) - Month(birth_date)

If dm < 0 Then
dy = dy - 1
End If
Text10.BackColor = &H80000005
Text10.Text = dy
End Sub

Private Sub Form_Load()


frmaddstudent.Caption = "Student"
Label27.Caption = ""
Call SetConnection("localhost", "db_student", "root", "")
Text1.locked = True
SSTab1.Tab = 0
Combo2.Clear
Combo3.Clear
Combo2.AddItem "Architect"
Combo2.AddItem "Businessman"
Combo2.AddItem "DH"
Combo2.AddItem "Doctor"
Combo2.AddItem "Engineer"
Combo2.AddItem "Farmer"
Combo2.AddItem "Fisherman"
Combo2.AddItem "Lawyer"
Combo2.AddItem "Nurse"
Combo2.AddItem "Operator"
Combo2.AddItem "Policeman"
Combo2.AddItem "Seaman"
Combo2.AddItem "Soldier"
Combo2.AddItem "Teacher"
Combo2.AddItem "Tricycle Driver"
Combo2.AddItem "Others"
Combo3.AddItem "Architect"
Combo3.AddItem "Businesswoman"
Combo3.AddItem "DH"
Combo3.AddItem "Doctor"
Combo3.AddItem "Engineer"
Combo3.AddItem "Housewife"
Combo3.AddItem "Lawyer"
Combo3.AddItem "Nurse"
Combo3.AddItem "Policewoman"
Combo3.AddItem "Teacher"
Combo3.AddItem "Others"

End Sub
72

Private Sub preview()


rtb.locked = True
rtb.Text = rtb.Text & _
vbNewLine
rtb.Text = ""
rtb.Text = rtb.Text & _
"Student Number :" & Text1.Text & vbNewLine
rtb.Text = rtb.Text & _
"Name :" & Text2.Text & "," & Text3.Text & " " & Text4.Text & " " & vbNewLine
& ""
rtb.Text = rtb.Text & _
"Address :" & Text5.Text & "," & Text6.Text & " " & Text7.Text & " " & vbNewLine
& ""
rtb.Text = rtb.Text & _
"BirthDate :" & DTPicker1.value & "" & vbNewLine & ""
rtb.Text = rtb.Text & _
"Age :" & Text10.Text & "" & vbNewLine & ""
rtb.Text = rtb.Text & _
"Sex :" & Combo1.Text & "" & vbNewLine & ""
rtb.Text = rtb.Text & _
"Contact :" & Text8.Text & "" & vbNewLine & ""
rtb.Text = rtb.Text & _
vbNewLine

rtb.Text = rtb.Text & _


"Previous School Attended: " & Text9.Text & "" & vbNewLine & ""
rtb.Text = rtb.Text & _
"General Average :" & Text11.Text & "" & vbNewLine & ""
rtb.Text = rtb.Text & _
vbNewLine
rtb.Text = rtb.Text & _
"Parents Info: " & vbNewLine & ""
rtb.Text = rtb.Text & _
vbNewLine
rtb.Text = rtb.Text & _
"Fathers Name: " & Text12.Text & ", " & Text13.Text & " " & Text14.Text & "" & vbNewLine &
""
rtb.Text = rtb.Text & _
"Fathers Occupation: " & Combo2.Text & "" & vbNewLine & ""
rtb.Text = rtb.Text & _
"Mothers Name: " & Text15.Text & ", " & Text16.Text & " " & Text17.Text & "" & vbNewLine
& ""
rtb.Text = rtb.Text & _
"Mothers Occupation: " & Combo3.Text & "" & vbNewLine & ""
rtb.Text = rtb.Text & _
"Parents Contact: " & Text18.Text & "" & vbNewLine & ""
rtb.Text = rtb.Text & _
vbNewLine
73

rtb.Text = rtb.Text & _


"Credentials Submitted: " & vbNewLine & ""
rtb.Text = rtb.Text & _
vbNewLine

If Check1.value = 1 Then
rtb.Text = rtb.Text & _
" FORM138 " & vbNewLine & ""
End If
If Check2.value = 1 Then
rtb.Text = rtb.Text & _
" TRANSCRIPT OF RECORDS " & vbNewLine & ""
End If
If Check3.value = 1 Then
rtb.Text = rtb.Text & _
" BIRTH CERTIFICATE " & vbNewLine & ""
End If
If Check4.value = 1 Then
rtb.Text = rtb.Text & _
" BAPTISM" & vbNewLine & ""
End If
If Check5.value = 1 Then
rtb.Text = rtb.Text & _
" CONFIRMATION " & vbNewLine & ""
End If
If Check6.value = 1 Then
rtb.Text = rtb.Text & _
" FIRST COMMUNION" & vbNewLine & ""
End If

End Sub

Private Sub Text10_Change()


If Not IsNumeric(Text10.Text) Then
Text10.Text = ""
End If
End Sub

Private Sub Text11_Change()


Text11.BackColor = &H80000005
If Not IsNumeric(Text11) Then
Text11.Text = ""
End If

End Sub

Private Sub Text12_Change()


74

If IsNumeric(Text12.Text) Then
Text12.Text = ""
End If

Text12.BackColor = &H80000005
End Sub

Private Sub Text13_Change()


If IsNumeric(Text13.Text) Then
Text13.Text = ""
End If

Text13.BackColor = &H80000005
End Sub

Private Sub Text14_Change()


If IsNumeric(Text14.Text) Then
Text14.Text = ""
End If

Text14.BackColor = &H80000005
End Sub

Private Sub Text15_Change()


If IsNumeric(Text15.Text) Then
Text15.Text = ""
End If

Text15.BackColor = &H80000005
End Sub

Private Sub Text16_Change()


If IsNumeric(Text16.Text) Then
Text16.Text = ""
End If
Text16.BackColor = &H80000005
End Sub

Private Sub Text17_Change()


If IsNumeric(Text17.Text) Then
Text17.Text = ""
End If

Text17.BackColor = &H80000005
End Sub

Private Sub Text18_Change()


If Not IsNumeric(Text18.Text) Then
75

Text18.Text = ""
End If

Text18.BackColor = &H80000005
End Sub

Private Sub Text2_Change()


If IsNumeric(Text2.Text) Then
Text2.Text = ""
End If

Text2.BackColor = &H80000005
End Sub

Private Sub Text3_Change()


If IsNumeric(Text3.Text) Then
Text3.Text = ""
End If

Text3.BackColor = &H80000005
End Sub

Private Sub Text4_Change()


If IsNumeric(Text4.Text) Then
Text4.Text = ""
End If

Text4.BackColor = &H80000005
End Sub

Private Sub Text5_Change()


Text5.BackColor = &H80000005
End Sub

Private Sub Text6_Change()


If IsNumeric(Text6.Text) Then
Text6.Text = ""
End If

Text6.BackColor = &H80000005
End Sub

Private Sub Text6_Click()


Text6.BackColor = &H80000005
End Sub

Private Sub Text7_Change()


If Not IsNumeric(Text7.Text) Then
76

Text7.Text = ""
End If
Text7.BackColor = &H80000005
End Sub

Private Sub Text7_Click()


Text7.BackColor = &H80000005
End Sub

Private Sub Text8_Change()


If Not IsNumeric(Text8) Then
Text8.Text = ""
End If
Text8.BackColor = &H80000005
End Sub

Private Sub Text9_Change()


If IsNumeric(Text9.Text) Then
Text9.Text = ""
End If
Text9.BackColor = &H80000005
End Sub

____________________________________________________

frmadduser form

Option Explicit
Dim sqladduser As String
Dim rsadduser As ADODB.Recordset

Private Sub Command1_Click()


Call ifblank
End Sub

Private Sub Command2_Click()


Unload Me
End Sub

Private Sub Form_Load()


Call SetConnection("localhost", "db_student", "root", "")
End Sub

Private Sub ifblank()


Dim a As String
a = "Missing requirements : "
If Text1.Text = "" Then
a = "" & a & " username,"
77

End If
If Text2.Text = "" Then
a = "" & a & " password,"
End If
If Text3.Text = "" Then
a = "" & a & " retype password,"
End If
If Text4.Text = "" Then
a = "" & a & " name,"
End If
If Text5.Text = "" Then
a = "" & a & " contact,"
End If
If Text6.Text = "" Then
a = "" & a & " address,"
End If
If Text2.Text = Text3.Text Then
If a = "Missing requirements : " Then
sqladduser = "select username from tbuser where username = '" & Text1.Text & "'"
Set rsadduser = db.Execute(sqladduser)
If rsadduser.RecordCount = 0 Then
sqladduser = "insert into tbuser(username, password, name, contact, address) values('" &
Text1.Text & "','" & Text2.Text & "','" & Text4.Text & "','" & Text5.Text & "','" & Text6.Text &
"')"
Set rsadduser = db.Execute(sqladduser)
MsgBox "New user added!", vbInformation, ""
Dim s As String
Dim t As ADODB.Recordset
s = "select username, name, contact, address from tbuser"
Set t = db.Execute(s)
Set frmuser.DataGrid1.DataSource = t
Unload Me
Else
MsgBox "Username already exist. Choose another username."
End If

Else
MsgBox "" & a & "", vbInformation, ""
End If

Else
MsgBox "Password and retype password did not gorabis.", vbCritical, ""
Text2.Text = ""
Text3.Text = ""
Text2.SetFocus
End If
End Sub
78

_______________________________________________________

frmeditauthor form

Option Explicit
Dim sqladduser As String
Dim rsadduser As ADODB.Recordset

Private Sub Command1_Click()


Call ifblank

End Sub

Private Sub Command2_Click()


Unload Me
End Sub

Private Sub Form_Load()


Call SetConnection("localhost", "db_student", "root", "")
End Sub

Private Sub ifblank()


Dim a As String
a = "Missing requirements : "
If Text1.Text = "" Then
a = "" & a & " username,"
End If
If Text2.Text = "" Then
a = "" & a & " password,"
End If
If Text3.Text = "" Then
a = "" & a & " retype password,"
End If
If Text4.Text = "" Then
a = "" & a & " name,"
End If
If Text5.Text = "" Then
a = "" & a & " contact,"
End If
If Text6.Text = "" Then
a = "" & a & " address,"
End If
If Text2.Text = Text3.Text Then
If a = "Missing requirements : " Then
sqladduser = "select username from tbuser where username = '" & Text1.Text & "'"
Set rsadduser = db.Execute(sqladduser)
If rsadduser.RecordCount = 0 Then
79

sqladduser = "insert into tbuser(username, password, name, contact, address) values('" &
Text1.Text & "','" & Text2.Text & "','" & Text4.Text & "','" & Text5.Text & "','" & Text6.Text &
"')"
Set rsadduser = db.Execute(sqladduser)
MsgBox "New user added!", vbInformation, ""
Dim s As String
Dim t As ADODB.Recordset
s = "select username, name, contact, address from tbuser"
Set t = db.Execute(s)
Set frmuser.DataGrid1.DataSource = t
Unload Me
Else
MsgBox "Username already exist. Choose another username."
End If

Else
MsgBox "" & a & "", vbInformation, ""
End If

Else
MsgBox "Password and retype password did not gorabis.", vbCritical, ""
Text2.Text = ""
Text3.Text = ""
Text2.SetFocus
End If
End Sub

______________________________________________________

frmeditstudent form

Option Explicit
Dim sql As String
Dim rs As ADODB.Recordset

Private Sub Command1_Click()

sql = "update tb_student set lname='" & Text1.Text & "', fname= '" & Text2.Text & "'," & _
"mname = '" & Text3.Text & "', barangay ='" & Text4.Text & "',town='" & Combo1.Text &
"',province='" & Combo2.Text & "',birthdate = '" & DTPicker1.value & "', " & _
"sex = '" & Combo4.Text & "', contact = '" & Text6.Text & "', school_attedend='" & Text7.Text &
"'," & _
"general_average='" & Text8.Text & "',form137='" & Check1.value & "',transcript='" &
Check2.value & "'," & _
"birth_cerificate='" & Check3.value & "', baptism='" & Check4.value & "', confirmation='" &
Check5.value & "'," & _
"firstcommunion='" & Check6.value & "',f_lname='" & Text9.Text & "', f_fname='" &
Text10.Text & "', f_mname='" & Text11.Text & "'," & _
80

"f_occu='" & Combo5.Text & "',m_lname='" & Text12.Text & "',m_fname='" & Text13.Text &
"',m_mname='" & Text14.Text & "', " & _
"m_occu = '" & Combo6.Text & "',parents_contact='" & Text15.Text & "',date = '" & Date & "'
where sno = '" & Text21.Text & "'"
Set rs = db.Execute(sql)
MsgBox "Student update!", vbInformation, ""
Unload Me
End Sub

Private Sub Command2_Click()


Call unlocked
Command1.Enabled = True
sql = "insert into tb_editstudent values('" & UCase(Text21.Text) & "','" & UCase(Text1.Text) &
"','" & UCase(Text2.Text) & "','" & UCase(Text3.Text) & "', " & _
"'" & UCase(Text4.Text) & "','" & UCase(Combo1.Text) & "'," & _
"'" & UCase(Combo2.Text) & "','" & DTPicker1.value & "'," & _
"'" & UCase(Combo4.Text) & "'," & _
"'" & UCase(Text6.Text) & "','" & UCase(Text7.Text) & "','" & Text8.Text & "'," & _
"'" & Check1.value & "','" & Check2.value & "','" & Check3.value & "'," & _
"'" & Check4.value & "','" & Check5.value & "','" & Check6.value & "'," & _
"'" & UCase(Text9.Text) & "','" & UCase(Text10.Text) & "'," & _
"'" & UCase(Text11.Text) & "','" & UCase(Combo5.Text) & "'," & _
"'" & UCase(Text12.Text) & "','" & UCase(Text13.Text) & "'," & _
"'" & UCase(Text14.Text) & "','" & UCase(Combo6.Text) & "'," & _
"'" & UCase(Text15.Text) & "','" & Now & "" & Text21.Text & "','" & Label26.Caption & "')"
Set rs = db.Execute(sql)
MsgBox "Ready to update.", vbInformation, "UPdate"
End Sub

Private Sub Command3_Click()


Unload Me
End Sub

Private Sub DTPicker1_Change()


Text5.Text = Val(Year(Date)) - Val(Format(DTPicker1, "yyyy"))
If Val(Format(DTPicker1, "mm")) > Month(Date) Then
If Val(Format(DTPicker1, "dd")) < Day(Date) Then
Text5.Text = Val(Text5.Text) - 1
Else
End If
Else
End If

End Sub

Private Sub Form_Load()


Command1.Enabled = False
Text21.Enabled = False
81

Text1.locked = True
Call SetConnection("localhost", "db_student", "root", "")
Call DTPicker1_Change

End Sub

Private Sub Text21_Change()


sql = "select * from tb_student where sno = '" & Text21.Text & "'"
Set rs = db.Execute(sql)
Call value
Call locked
End Sub
Private Sub value()
Text1.Text = rs.Fields("lname")
Text2.Text = rs.Fields("fname")
Text3.Text = rs.Fields("mname")
Text4.Text = rs.Fields("barangay")
Combo1.Text = rs.Fields("town")
Combo2.Text = rs.Fields("province")
DTPicker1.value = Format(rs.Fields("birthdate"), "dd-mm-yyyy")
Call DTPicker1_Change
Combo4.Text = rs.Fields("sex")
Text6.Text = rs.Fields("contact")
Text7.Text = rs.Fields("school_attedend")
Text8.Text = rs.Fields("general_average")
Check1.value = rs.Fields("form137")
Check2.value = rs.Fields("transcript")
Check3.value = rs.Fields("birth_cerificate")
Check4.value = rs.Fields("baptism")
Check5.value = rs.Fields("confirmation")
Check6.value = rs.Fields("firstcommunion")
Text9.Text = rs.Fields("f_lname")
Text10.Text = rs.Fields("f_Fname")
Text11.Text = rs.Fields("f_mname")
Combo5.Text = rs.Fields("f_occu")
Text12.Text = rs.Fields("m_lname")
Text13.Text = rs.Fields("m_Fname")
Text14.Text = rs.Fields("m_mname")
Combo6.Text = rs.Fields("m_occu")
Text15.Text = rs.Fields("parents_contact")
Label26.Caption = rs.Fields("year_level")
End Sub
Private Sub locked()
Text1.locked = True
Text2.locked = True
Text3.locked = True
Text4.locked = True
Combo1.locked = True
82

Combo2.locked = True
Text5.locked = True
Combo4.locked = True
Text6.locked = True
Text7.locked = True
Text8.locked = True
Check1.Enabled = False
Check2.Enabled = False
Check3.Enabled = False
Check4.Enabled = False
Check5.Enabled = False
Check6.Enabled = False
Text9.locked = True
Text10.locked = True
Text11.locked = True
Combo5.locked = True
Text12.locked = True
Text13.locked = True
Text14.locked = True
Combo6.locked = True
Text15.locked = True

End Sub

Private Sub unlocked()


Text1.locked = False
Text2.locked = False
Text3.locked = False
Text4.locked = False
Combo1.locked = False
Combo2.locked = False
Text5.locked = False
Combo4.locked = False
Text6.locked = False
Text7.locked = False
Text8.locked = False
Check1.Enabled = True
Check2.Enabled = True
Check3.Enabled = True
Check4.Enabled = True
Check5.Enabled = True
Check6.Enabled = True
Text9.locked = False
Text10.locked = False
Text11.locked = False
Combo5.locked = False
Text12.locked = False
Text13.locked = False
83

Text14.locked = False
Combo6.locked = False
Text15.locked = False

End Sub

______________________________________________________

frmenroll form

Option Explicit
Dim sql As String
Dim rs As ADODB.Recordset
Dim tofind As String

Private Sub c4_Click()


sql = "select sno, lname, fname, mname, sex, birthdate, general_average, year_level from
tb_student where sno = '" & Combo1.Text & "'"
Set rs = db.Execute(sql)
If rs.RecordCount = 0 Then
MsgBox "No record found.", vbOKOnly + vbInformation, "No records"
Else

Combo1.Text = rs.Fields("sno")
Label12.Caption = "" & UCase(rs.Fields("lname")) & ", " & UCase(rs.Fields("fname")) & " " &
UCase(rs.Fields("mname")) & ""
Label13.Caption = rs.Fields("sex").value
Label14.Caption = "" & rs.Fields("birthdate") & ""
Label18.Caption = rs.Fields("general_average")
End If

End Sub

Private Sub Combo1_Change()


Dim sl As String
Dim sr As ADODB.Recordset
sl = "select sno from tb_student where sno = '" & Combo1.Text & "'"
Set sr = db.Execute(sl)
If sr.RecordCount = 0 Then

Else
Command1.Enabled = True
Option2.Enabled = True
Option1.Enabled = True
End If
End Sub

Private Sub Combo1_Click()


84

Call c4_Click

sql = "select school_year, sno1 from tb_syenrollees where school_year = '" & Combo2.Text & "'
and sno1 = '" & Combo1.Text & "'"
Set rs = db.Execute(sql)
If rs.RecordCount = 1 Then
MsgBox "Student's enrolled at this school year."
Command1.Enabled = False
Combo1.Clear
Form_Load
Else
Command1.Enabled = True
Option1.Enabled = True
Option2.Enabled = True
End If
End Sub

Private Sub Combo2_Click()


sql = "select school_year, sno1 from tb_syenrollees where school_year = '" & Combo2.Text & "'
and sno1 = '" & Combo1.Text & "'"
Set rs = db.Execute(sql)
If rs.RecordCount = 1 Then
MsgBox "Student's enrolled at this school year."
Combo2.Clear
Command1.Enabled = False
Form_Load
Else
Command1.Enabled = True
Option1.Enabled = True
Option2.Enabled = True
End If
End Sub

Private Sub Combo3_Click()


Label30.Caption = "0"
Option1.value = False
Option2.value = False
If Combo3.Text = "1ST YEAR" Then
Combo4.Clear
Combo4.AddItem "SECTION A"
Combo4.AddItem "SECTION B"
Combo4.AddItem "SECTION C"
ElseIf Combo3.Text = "2ND YEAR" Then
Combo4.Clear
Combo4.AddItem "SECTION A"
Combo4.AddItem "SECTION B"
Combo4.AddItem "SECTION C"
85

ElseIf Combo3.Text = "3RD YEAR" Then


Combo4.Clear
Combo4.AddItem "SECTION A"
Combo4.AddItem "SECTION B"
Combo4.AddItem "SECTION C"
ElseIf Combo3.Text = "4TH YEAR" Then
Combo4.Clear
Combo4.AddItem "SECTION A"
Combo4.AddItem "SECTION B"
Combo4.AddItem "SECTION C"
Else
Combo4.Clear
End If
sql = "select book_rentals, bato_balani, snj, values_magazine, id,
matriculation_fees+laboratory_fees+library_fees+medical_fees+athletic_fees+guidance as pay
from tb_fees where year_level = '" & Combo3.Text & "'"
Set rs = db.Execute(sql)
Label15.Caption = rs.Fields("pay")
Label16.Caption = rs.Fields("book_rentals")
Label26.Caption = rs.Fields("bato_balani")
Label25.Caption = rs.Fields("snj")
Label24.Caption = rs.Fields("values_magazine")
Label27.Caption = rs.Fields("id")
Label28.Caption = Val(Label27.Caption) + Val(Label15.Caption) + Val(Label16.Caption) +
Val(Label26.Caption) + Val(Label25.Caption) + Val(Label24.Caption) + Val(Label30.Caption)
End Sub

Private Sub Command1_Click()


If Combo1.Text = "" Then
MsgBox "No records", vbOKOnly, "No records"
Else
If Combo3.Text = "select" Then
MsgBox "Select year level"
Combo3.SetFocus
Else
frmreceipt.Show vbModal

End If
End If
End Sub

Private Sub Command5_Click()


Unload Me
End Sub

Private Sub Form_Activate()


Combo1.SetFocus
sql = "select school_year from school_year order by school_year desc"
86

Set rs = db.Execute(sql)
rs.MoveFirst
Combo2.Text = rs.Fields("school_year")
End Sub

Private Sub Form_Load()


'Combo1.locked = True
Command1.Enabled = False
Option1.Enabled = False
Option2.Enabled = False

Call SetConnection("localhost", "db_student", "root", "")

Label31.Caption = Date
sql = "select school_year from school_year order by school_year desc"
Set rs = db.Execute(sql)
Dim i As Integer
For i = 1 To rs.RecordCount
Combo2.AddItem rs.Fields("school_year")
rs.MoveNext
Next i

Dim sqlid As String


Dim rsid As ADODB.Recordset
sqlid = "select sno from tb_student order by sno"
Set rsid = db.Execute(sqlid)
For i = 1 To rsid.RecordCount
Combo1.AddItem rsid.Fields("sno")
rsid.MoveNext
Next i
End Sub

Private Sub Label30_Change()


Label28.Caption = Val(Label27.Caption) + Val(Label15.Caption) + Val(Label16.Caption) +
Val(Label26.Caption) + Val(Label25.Caption) + Val(Label24.Caption) + Val(Label30.Caption)

End Sub

Private Sub Option1_Click()


Label30.Caption = 0
sql = "select tuition-(monthly_payments*9) as mont from tb_fees where year_level = '" &
Combo3.Text & "'"
Set rs = db.Execute(sql)
If rs.RecordCount = 0 Then
MsgBox "No year level selected.", vbOKOnly + vbInformation, "error"
Else
Label30.Caption = rs.Fields("mont")
87

End If

End Sub

Private Sub Option1_DblClick()


Option1.value = False
If Option1.value = False Then
Label30.Caption = 0
ElseIf Option1.value = True Then
Call Option1_Click
End If

End Sub

Private Sub Option2_Click()


Label30.Caption = 0
sql = "select tuition from tb_fees where year_level = '" & Combo3.Text & "'"
Set rs = db.Execute(sql)
If rs.RecordCount = 0 Then
MsgBox "No year level selected.", vbOKOnly + vbInformation, "error"
Else
Label30.Caption = rs.Fields("tuition")
End If
End Sub

Private Sub Option2_DblClick()


Option2.value = False
If Option2.value = False Then
Label30.Caption = 0
ElseIf Option2.value = True Then
Call Option2_Click
End If
End Sub

_______________________________________________________

frmfind form

Option Explicit
Dim sql As String
Dim rs As ADODB.Recordset

Private Sub Command1_Click()


sql = "select sno,lname, fname,mname from tb_student where sno = '" & Text1.Text & "'"
Set rs = db.Execute(sql)
If rs.RecordCount = 1 Then
frmenroll.Combo1.Text = rs.Fields("sno").value
88

frmenroll.Label12.Caption = "" & rs.Fields("lname").value & ", " & rs.Fields("fname").value & "
" & rs.Fields("mname").value & ""
Unload Me
Else
MsgBox "No record found.", vbOKOnly, ""
End If
End Sub

Private Sub Form_Load()


Call SetConnection("localhost", "db_student", "root", "")

End Sub

______________________________________________________

frmlogin form

Option Explicit
Dim sql As String
Dim rs As ADODB.Recordset
Dim i As Integer
Dim err As Integer

Private Sub Command1_Click()

sql = "select * from tbuser where username= '" & Combo1.Text & "' and password = '" &
Text1.Text & "'"
Set rs = db.Execute(sql)
If rs.RecordCount = 0 Then
MsgBox "Invalid Username and Password", vbOKOnly + vbCritical, ""
err = err - 1
Text1.Text = ""
Label3.Caption = "Attempt: " & err & ""
If err = 0 Then
MsgBox "YOu have use your all attempts.", vbOKOnly + vbCritical, ""
End
End If
ElseIf rs.RecordCount = 1 Then
MsgBox "Welcome " & rs.Fields("name").value & "", vbOKOnly + vbInformation, "Welcome"
Unload Me
MDImain.Show
End If
End Sub

Private Sub Command2_Click()


Unload Me
End Sub
89

Private Sub Form_Load()


err = 3
Label3.Caption = "Attempt: " & err & ""
Call SetConnection("localhost", "db_student", "root", "")
sql = "select username from tbuser order by username asc"
Set rs = db.Execute(sql)
For i = 1 To rs.RecordCount
Combo1.AddItem rs.Fields("username").value
rs.MoveNext
Next i
End Sub

_______________________________________________________

frmmonthly form

Option Explicit
Dim sql As String
Dim rs As ADODB.Recordset

Private Sub Command1_Click()


If Val(Label1.Caption) - Val(Label28.Caption) < 0 Then

MsgBox "Overflow", vbCritical, "Error"

Else

If Label28.Caption = 0 Then
MsgBox "Please enter value.", vbOKOnly + vbQuestion, "Null"
Else
Dim sqlmonthly As String
Dim rsmonthly As ADODB.Recordset
Set DataReport1.DataSource = rs
DataReport1.Sections("Section2").Controls("Label10").Caption = Label12.Caption
DataReport1.Sections("Section2").Controls("Label8").Caption = Label4.Caption
DataReport1.Sections("Section2").Controls("Label6").Caption = Label7.Caption
DataReport1.Sections("Section2").Controls("Label4").Caption = b.Caption
DataReport1.Sections("Section2").Controls("Label3").Caption = a.Caption
DataReport1.Sections("Section2").Controls("Label28").Caption = Text1.Text
DataReport1.Sections("Section2").Controls("Label27").Caption = 0
DataReport1.Sections("Section2").Controls("Label26").Caption = 0
DataReport1.Sections("Section2").Controls("Label25").Caption = 0
DataReport1.Sections("Section2").Controls("Label24").Caption = 0
DataReport1.Sections("Section2").Controls("Label23").Caption = 0
DataReport1.Sections("Section2").Controls("Label22").Caption = 0
DataReport1.Sections("Section2").Controls("Label21").Caption = Text1.Text
DataReport1.Show vbModal
Command2.Enabled = True
90

End If
End If
End Sub

Private Sub Command2_Click()

Dim sql1 As String


sql1 = "insert into tb_transaction values('" & Label7.Caption & "','" & Label4.Caption & "','" &
b.Caption & "','" & Label28.Caption & "','" & a.Caption & "')"
Set rs = db.Execute(sql1)

sql = "select * from tb_syenrollees where syno = '" & a.Caption & "-" & Label4.Caption & "'"
Set rs = db.Execute(sql)
Dim art As String
art = rs.Fields("charge")
sql = "update tb_syenrollees set charge = " & art & " - " & Val(Label28.Caption) & " where syno
= '" & a.Caption & "-" & Label4.Caption & "'"
Set rs = db.Execute(sql)
MsgBox "Student update.", vbOKOnly + vbInformation, "Enrolled"

Unload Me
Unload frmmonthlypayments
End Sub

Private Sub Form_Load()


Command2.Enabled = False
Call SetConnection("localhost", "db_student", "root", "")
Label6.Caption = MDImain.Combo2.Text
b.Caption = Date
sql = "select * from tb_transaction"
Set rs = db.Execute(sql)
If rs.RecordCount = 0 Then
Label7.Caption = Format(rs.RecordCount + 1, "OR-000000000000")
Else
Label7.Caption = Format(rs.RecordCount + 1, "OR-000000000000")
End If

sql = "select * from tb_student where sno = '" & frmmonthlypayments.Text1.Text & "'"
Set rs = db.Execute(sql)
Label4.Caption = rs.Fields("sno")
Label12.Caption = "" & rs.Fields("lname") & ", " & rs.Fields("fname") & " " &
rs.Fields("mname") & ""
End Sub

Private Sub Frame1_DragDrop(Source As Control, X As Single, Y As Single)

End Sub
91

Private Sub Text1_Change()


If Not IsNumeric(Text1) Then
Text1.Text = ""
End If
Label28.Caption = Text1.Text
If Val(Label1.Caption) < 0 Then
MsgBox "overflow.", vbCritical, "Overflow"
frmmonthly.Label1.Caption = frmmonthlypayments.Text2.Text
Text1.Text = 0
End If
End Sub

_______________________________________________________

frmmonthlypayments form

Option Explicit
Dim sql As String
Dim rs As ADODB.Recordset
Dim sql1 As String

Private Sub Command1_Click()


Unload Me
End Sub

Private Sub Command2_Click()


frmmonthly.a.Caption = MDImain.Combo1.Text
frmmonthly.Label1.Caption = Text3.Text

frmmonthly.Show vbModal
End Sub

Private Sub Command4_Click()


Unload Me
End Sub

Private Sub Form_Load()


Text1.locked = True
Text2.locked = True
Text3.locked = True
Text4.locked = True
Call SetConnection("localhost", "db_student", "root", "")
Label2.Caption = Date
sql = "select
matriculation_fees+laboratory_fees+library_fees+medical_fees+athletic_fees+guidance+book_re
ntals+bato_balani+snj+values_magazine+id+tuition as pay from tb_fees where year_level = '" &
MDImain.Combo2.Text & "'"
92

Set rs = db.Execute(sql)
Text4.Text = rs.Fields("pay")
'MsgBox sql

End Sub

Private Sub Text1_Change()


sql = "select charge from tb_syenrollees where sno1 = '" & Text1.Text & "' and school_year = '"
& MDImain.Combo1.Text & "'"
Set rs = db.Execute(sql)
Text3.Text = rs.Fields("charge")

End Sub

Private Sub Text3_Change()


Text2.Text = Val(Text4.Text) - Val(Text3.Text)
End Sub

______________________________________________________

frmreceipt form

Option Explicit
Dim sql As String
Dim rs As ADODB.Recordset
Dim a As String
Private Sub Command1_Click()
Set DataReport1.DataSource = rs
DataReport1.Sections("Section2").Controls("Label3").Caption = Label11.Caption
DataReport1.Sections("Section2").Controls("Label4").Caption = Label1.Caption
DataReport1.Sections("Section2").Controls("Label6").Caption = Label7.Caption
DataReport1.Sections("Section2").Controls("Label8").Caption = Label4.Caption
DataReport1.Sections("Section2").Controls("Label10").Caption = Label12.Caption
DataReport1.Sections("Section2").Controls("Label12").Caption = Label6.Caption
DataReport1.Sections("Section2").Controls("Label21").Caption = Label30.Caption
DataReport1.Sections("Section2").Controls("Label22").Caption = Label15.Caption
DataReport1.Sections("Section2").Controls("Label23").Caption = Label16.Caption
DataReport1.Sections("Section2").Controls("Label24").Caption = Label26.Caption
DataReport1.Sections("Section2").Controls("Label25").Caption = Label25.Caption
DataReport1.Sections("Section2").Controls("Label26").Caption = Label24.Caption
DataReport1.Sections("Section2").Controls("Label27").Caption = Label27.Caption
DataReport1.Sections("Section2").Controls("Label28").Caption = Label28.Caption

DataReport1.Show vbModal
Command2.Enabled = True
End Sub

Private Sub Command2_Click()


93

sql = "select syno from tb_syenrollees where syno = '" & Label11.Caption & "-" &
Label4.Caption & "'"
Set rs = db.Execute(sql)
If rs.RecordCount = 1 Then
MsgBox "Student already enrolled at this school year " & Label11.Caption & ""
Else
sql = "select
(matriculation_fees+laboratory_fees+library_fees+medical_fees+athletic_fees+guidance+book_r
entals+bato_balani+snj+values_magazine+id+tuition)as pay from tb_fees where year_level = '" &
Label6.Caption & "'"
Set rs = db.Execute(sql)
sql = "insert into tb_syenrollees(syno,school_year, sno1, year_level1, section, charge) " _
& " values('" & Label11.Caption & "-" & Label4.Caption & "','" & Label11.Caption & "'," _
& "'" & Label4.Caption & " ','" & Label6.Caption & "','" & frmenroll.Combo4.Text & "'," _
& "'" & rs.Fields("pay").value & "')"
Set rs = db.Execute(sql)
End If
sql = "insert into tb_transaction values('" & Label7.Caption & "','" & Label4.Caption & "','" &
Label1.Caption & "','" & Label28.Caption & "','" & Label11.Caption & "')"
Set rs = db.Execute(sql)

sql = "select charge from tb_syenrollees where syno = '" & Label11.Caption & "-" &
Label4.Caption & "'"
Set rs = db.Execute(sql)
a = rs.Fields("charge")
sql = "update tb_syenrollees set charge = " & a & " - " & Val(Label28.Caption) & " where syno =
'" & Label11.Caption & "-" & Label4.Caption & "'"
Set rs = db.Execute(sql)
MsgBox "Student enrolled.", vbOKOnly + vbInformation, "Enrolled"

Unload Me
End Sub

Private Sub Form_Load()


Command2.Enabled = False
Call SetConnection("localhost", "db_student", "root", "")
Label1.Caption = Date
sql = "select * from tb_transaction"
Set rs = db.Execute(sql)
If rs.RecordCount = 0 Then
Label7.Caption = Format(rs.RecordCount + 1, "OR-000000000000")
Else
Label7.Caption = Format(rs.RecordCount + 1, "OR-000000000000")
End If
Label30.Caption = frmenroll.Label30.Caption
Label15.Caption = frmenroll.Label15.Caption
Label11.Caption = frmenroll.Combo2.Text
94

Label4.Caption = frmenroll.Combo1.Text
Label12.Caption = frmenroll.Label12.Caption
Label6.Caption = frmenroll.Combo3.Text
Label16.Caption = frmenroll.Label16.Caption
Label26.Caption = frmenroll.Label26.Caption
Label25.Caption = frmenroll.Label25.Caption
Label24.Caption = frmenroll.Label24.Caption
Label27.Caption = frmenroll.Label27.Caption
Label28.Caption = frmenroll.Label28.Caption

End Sub

_______________________________________________________

frmschoolsetting form

Option Explicit
Dim sql As String
Dim rs As ADODB.Recordset

Private Sub Command1_Click()


frmaddschoolyear.Show vbModal
End Sub

Private Sub Command2_Click()


sql = "select * from school_year order by school_year desc"
Set rs = db.Execute(sql)
Set DataGrid1.DataSource = rs
End Sub

Private Sub Command3_Click()


Unload Me
End Sub

Private Sub Form_Load()


Call SetConnection("localhost", "db_student", "root", "")
sql = "select * from school_year order by school_year desc"
Set rs = db.Execute(sql)
If rs.RecordCount = 0 Then
MsgBox "No Records.", vbOKOnly + vbCritical, ""
Else
Set DataGrid1.DataSource = rs
End If
End Sub

____________________________________________________

frmset form
95

Option Explicit
Dim rs As ADODB.Recordset

Private Sub Command1_Click()


Unload Me
End Sub

Private Sub Form_Load()

List1.AddItem "sno"
List1.AddItem "lname"
List1.AddItem "fname"
List1.AddItem "mname"
List1.AddItem "barangay"
List1.AddItem "town"
List1.AddItem "province"
List1.AddItem "birthdate"
List1.AddItem "sex"
List1.AddItem "contact"
List1.AddItem "school_attedend"
List1.AddItem "general_average"
List1.AddItem "form137"
List1.AddItem "transcript"
List1.AddItem "birth_cerificate"

List1.AddItem "province"
List1.AddItem "birthdate"
List1.AddItem "sex"
List1.AddItem "contact"
List1.AddItem "school_attedend"
List1.AddItem "general_average"
List1.AddItem "form137"
List1.AddItem "transcript"
List1.AddItem "birth_cerificate"

List1.Selected(0) = True
List1.Selected(1) = True
List1.Selected(2) = True
List1.Selected(3) = True
End Sub

Private Sub Form_Unload(Cancel As Integer)


SQL_GLOBAL = "select "
Dim a As Integer
For a = 0 To List1.ListCount - 1
If List1.Selected(a) = True Then
SQL_GLOBAL = SQL_GLOBAL & List1.List(a) & ", "
96

End If
Next a
SQL_GLOBAL = Mid$(SQL_GLOBAL, 1, Len(SQL_GLOBAL) - 2)
SQL_GLOBAL2 = SQL_GLOBAL
SQL_GLOBAL = SQL_GLOBAL & " from tb_student order by lname"
Set rs = db.Execute(SQL_GLOBAL)
Set frmstudent.DataGrid1.DataSource = rs
frmstudent.Show
End Sub

___________________________________________________

frmsetting form

Option Explicit
Dim sql As String
Dim rs As ADODB.Recordset
Dim fin As String

Private Sub Combo1_Click()


Call Form_Load
End Sub

Private Sub Command1_Click()


Dim title As String
Dim author As String
title = InputBox("Enter book title.", "")
If title = "" Then
Else
author = InputBox("Enter book author.", "")
If author = "" Then

Else
sql = "insert into " & fin & "(book_title, book_author) values('" & UCase(title) & "','" &
UCase(author) & "')"
Set rs = db.Execute(sql)
Call Form_Load
End If
End If
End Sub

Private Sub Command2_Click()


Dim edittitle As String
Dim editauhtor As String
If Combo1.Text = "" Then
MsgBox "Select year level", vbOKOnly, ""
Else
frmeditauthor.Text1.Text = rs.Fields("book_title")
97

frmeditauthor.Text2.Text = rs.Fields("book_author")
frmeditauthor.Text3.Text = fin
frmeditauthor.Text4.Text = rs.Fields("book_title")
frmeditauthor.Show vbModal
End If
End Sub

Private Sub Command3_Click()


If Combo1.Text = "" Then
MsgBox "Select year level", vbOKOnly, ""
Else
Dim res As String
res = MsgBox("Are you sure you want to delete?", vbYesNo + vbInformation, "Delete?")
If res = vbNo Then

ElseIf res = vbYes Then


sql = "delete from " & fin & " where book_title = '" & rs.Fields("book_title") & "'"
Set rs = db.Execute(sql)
MsgBox "Deleted!", vbExclamation, ""
Call Form_Load
End If
End If
End Sub

Private Sub Command4_Click()


Unload Me
End Sub

Private Sub DataGrid1_DblClick()


Call Command2_Click
End Sub

Private Sub Form_Load()


Call SetConnection("localhost", "db_student", "root", "")
If Combo1.Text = "" Then
Else
If Combo1.Text = "High School" Then
fin = "tb_book_hs"
ElseIf Combo1.Text = "Elementary" Then
fin = "tb_book_elem"
End If
sql = "select * from " & fin & ""
Set rs = db.Execute(sql)
Set DataGrid1.DataSource = rs
End If
End Sub
98

_____________________________________________________

frmstud_book form

Option Explicit
Dim sql As String
Dim rs As ADODB.Recordset
Dim rs1 As ADODB.Recordset

Private Sub Combo1_Click()


If Combo2.Text = "" Then
Else
sql = "select sno1 from tb_syenrollees where school_year = '" & Combo1.Text & "' and
year_level1 = '" & Combo2.Text & "'"
Set rs = db.Execute(sql)
If rs.RecordCount = 0 Then
MsgBox "No records.", vbOKOnly, ""
DataGrid1.Visible = False
Else
DataGrid1.Visible = True
Set DataGrid1.DataSource = rs
End If
End If

End Sub

Private Sub Combo2_Click()


If Combo1.Text = "" Then
Else
sql = "select sno1 from tb_syenrollees where school_year = '" & Combo1.Text & "' and
year_level1 = '" & Combo2.Text & "'"
Set rs = db.Execute(sql)
If rs.RecordCount = 0 Then
MsgBox "No records.", vbOKOnly, ""
DataGrid1.Visible = False
Else
DataGrid1.Visible = True

Set DataGrid1.DataSource = rs
End If
End If

End Sub

Private Sub Command1_Click()


If Combo1.Text = "" Then
Else
If Combo2.Text = "" Then
99

Else
sql = "select * from tb_book_rental where sno = '" & rs.Fields("sno1") & "' and school_year = '"
& Combo1.Text & "' and year_level = '" & Combo2.Text & "'"
Set rs1 = db.Execute(sql)
If rs1.RecordCount > 0 Then
MsgBox "Student already exist."
Else
sql = "insert into tb_book_rental(sno, school_year, year_level) values('" & rs.Fields("sno1") &
"','" & Combo1.Text & "','" & Combo2.Text & "')"
Set rs = db.Execute(sql)
MsgBox "Save!"
End If
Call Combo1_Click
End If
End If
End Sub

Private Sub Command2_Click()


Unload Me
End Sub

Private Sub Form_Load()


DataGrid1.Visible = False
Call SetConnection("localhost", "db_student", "root", "")
sql = "select school_year from school_year order by school_year"
Set rs = db.Execute(sql)
Dim i As Integer
For i = 1 To rs.RecordCount
Combo1.AddItem rs.Fields("school_year")
rs.MoveNext
Next i

End Sub

Private Sub Text1_Change()


Dim tofind As String
Dim a As Integer
Dim max As Integer
Dim name As String
If Combo1.Text = "" And Combo2.Text = "" Then
MsgBox "Select School year and year level."
Else

tofind = UCase(Text1.Text)
sql = "select sno1 from tb_syenrollees where school_year= '" & Combo1.Text & "' and
year_level1 = '" & Combo2.Text & "' and mid(sno1,1,length(" & "'" & tofind & "')) = " & "'" &
tofind & "'"
100

Set rs = db.Execute(sql)
Set DataGrid1.DataSource = rs
End If
End Sub

_____________________________________________________

frmstudent form

Option Explicit
Dim sql As String
Dim rs As ADODB.Recordset
Dim tofind As String
Dim i As Integer

Private Sub Command1_Click()


frmaddstudent.Show vbModal
End Sub

Private Sub Command3_Click()


tofind = InputBox("Enter student number.", "Find")
If tofind = "" Then
MsgBox "Invalid student number.", vbOKOnly, "Error"
Else
sql = "select sno, lname, fname, mname from tb_student where sno = '" & tofind & "' order by
lname asc"
Set rs = db.Execute(sql)
If rs.RecordCount = 0 Then
MsgBox "No records.", vbOKOnly, "No records"
Else
Set DataGrid1.DataSource = rs
End If
End If

End Sub

Private Sub Command4_Click()


Call Form_Load
End Sub

Private Sub Command5_Click()


Unload Me
End Sub

Private Sub DataGrid1_DblClick()


frmeditstudent.Text21.Text = rs.Fields("sno")
frmeditstudent.Show vbModal
101

End Sub

Private Sub Form_Load()


DataGrid1.Visible = True
Call SetConnection("localhost", "db_student", "root", "")

sql = "select sno, lname, fname, mname from tb_student order by lname asc"
Set rs = db.Execute(sql)
Set DataGrid1.DataSource = rs
SQL_GLOBAL2 = "select sno,lname,fname,mname "
End Sub

Private Sub mnusettings_Click()


FRMSET.Show
End Sub

Private Sub Text1_Change()


Dim tofind As String
Dim a As Integer
Dim max As Integer
Dim name As String

tofind = UCase(Text1.Text)
sql = SQL_GLOBAL2 & " " & "from tb_student where mid(lname,1,length(" & "'" & tofind &
"')) = " & "'" & tofind & "'"

Set rs = db.Execute(sql)
Set DataGrid1.DataSource = rs
End Sub

_______________________________________________________

frmuser form

Option Explicit
Dim sqluser As String
Dim rsuser As ADODB.Recordset

Private Sub Command1_Click()


frmadduser.Show vbModal
End Sub

Private Sub Command2_Click()

End Sub
102

Private Sub Command3_Click()


Dim res As String
res = MsgBox("Are you sure you want to delete?", vbYesNo, "")
If res = vbYes Then
sqluser = "delete from tbuser where username = '" & rsuser.Fields("username") & "'"
Set rsuser = db.Execute(sqluser)
MsgBox "User Account deleted!", vbInformation, ""
ElseIf res = vbNo Then
End If
End Sub

Private Sub Command4_Click()


Unload Me
End Sub

Private Sub Form_Load()


Call SetConnection("localhost", "db_student", "root", "")
sqluser = "select username, name, address, contact from tbuser"
Set rsuser = db.Execute(sqluser)
Set DataGrid1.DataSource = rsuser
End Sub

______________________________________________________

setfees form

Option Explicit
Dim sql As String
Dim rs As ADODB.Recordset

Private Sub Combo1_Click()


Call Form_Load
End Sub

Private Sub Command1_Click()


sql = "update tb_fees set matriculation_fees = '" & Text1.Text & "', laboratory_fees = '" &
Text2.Text & "', library_fees = '" & Text3.Text & "', medical_fees = '" & Text4.Text & "',
athletic_fees = '" & Text5.Text & "', guidance='" & Text6.Text & "', book_rentals='" & Text7.Text
& "', bato_balani='" & Text8.Text & "',snj='" & Text9.Text & "',values_magazine='" &
Text10.Text & "',id='" & Text11.Text & "',tuition='" & Text12.Text & "' where year_level = '" &
Combo1.Text & "'"
Set rs = db.Execute(sql)
MsgBox "FEES Updated!"
Call Form_Load
End Sub

Private Sub Command2_Click()


Call unlok
103

Command1.Enabled = True
End Sub

Private Sub Command3_Click()


Unload Me
End Sub

Private Sub Form_Load()


Command1.Enabled = False
Call SetConnection("localhost", "db_student", "root", "")
If Combo1.Text = "" Then
Else
sql = "select * from tb_fees where year_level = '" & Combo1.Text & "'"
Set rs = db.Execute(sql)
Text1.Text = rs.Fields("matriculation_fees")
Text2.Text = rs.Fields("laboratory_fees")
Text3.Text = rs.Fields("library_fees")
Text4.Text = rs.Fields("medical_fees")
Text5.Text = rs.Fields("athletic_fees")
Text6.Text = rs.Fields("guidance")
Text7.Text = rs.Fields("book_rentals")
Text8.Text = rs.Fields("bato_balani")
Text9.Text = rs.Fields("snj")
Text10.Text = rs.Fields("values_magazine")
Text11.Text = rs.Fields("id")
Text12.Text = rs.Fields("tuition")

Text13.Text = Val(Text1.Text) + Val(Text2.Text) + Val(Text3.Text) + Val(Text4.Text) +


Val(Text5.Text) + Val(Text6.Text) + Val(Text7.Text) + Val(Text8.Text) + Val(Text9.Text) +
Val(Text10.Text) + Val(Text11.Text) + Val(Text12.Text)
End If
Call lok
End Sub

Private Sub lok()

Text1.locked = True
Text2.locked = True
Text3.locked = True
Text4.locked = True
Text5.locked = True
Text6.locked = True
Text7.locked = True
Text8.locked = True
Text9.locked = True
Text10.locked = True
Text11.locked = True
Text12.locked = True
104

Text13.locked = True
End Sub

Private Sub unlok()

Text1.locked = False
Text2.locked = False
Text3.locked = False
Text4.locked = False
Text5.locked = False
Text6.locked = False
Text7.locked = False
Text8.locked = False
Text9.locked = False
Text10.locked = False
Text11.locked = False
Text12.locked = False
Text13.locked = False
End Sub

S-ar putea să vă placă și