tuition registration system with vb6 codings

138
Abstract Tuition Centre Management System is the system that is going to be used in education centre. The idea on building this system is due to the lack of computerized in management system for education centre. The review to an existing system had been made and analysed in order to discover the lack and inappropriate method from the existing system. The management system that is covered in this thesis is specialized to education centre aspect. The user of this system is the person that handles management works which are teachers and staffs. This system has the ability to keep huge data organized, secured and may reduce the uses of papers. There are sixth modules to be done in order to complete this system. All the tasks are managed by using the database application technique. The uses of database element can produce more structured system data. This system is going to reduce the inefficient way that is currently used. This thesis can be a medium to express the process of planning, analysing, designing, implementing and testing this system. Acknowledgement I would like to thank all people who helped me to finish this system successfully. Especially to Mr.Saravanan, my supervisor, my friends and my parents and last but not least, I would like to thank Google. Without Mr.Saravanan, I will not have enough information to finish this system successfully. He gave me all the information that I asked to him. Then without my supervisor, I wouldn’t finish this system in a correct 1

Upload: logan-sempoi

Post on 19-Feb-2016

21 views

Category:

Documents


1 download

DESCRIPTION

about tuition registration documentation and also got full perfect coding for vb6

TRANSCRIPT

Page 1: Tuition Registration System with vb6 codings

Abstract

Tuition Centre Management System is the system that is going to be used in education centre.

The idea on building this system is due to the lack of computerized in management system

for education centre. The review to an existing system had been made and analysed in order

to discover the lack and inappropriate method from the existing system. The management

system that is covered in this thesis is specialized to education centre aspect. The user of this

system is the person that handles management works which are teachers and staffs. This

system has the ability to keep huge data organized, secured and may reduce the uses of

papers. There are sixth modules to be done in order to complete this system. All the tasks are

managed by using the database application technique. The uses of database element can

produce more structured system data. This system is going to reduce the inefficient way that

is currently used. This thesis can be a medium to express the process of planning, analysing,

designing, implementing and testing this system.

AcknowledgementI would like to thank all people who helped me to finish this system successfully. Especially

to Mr.Saravanan, my supervisor, my friends and my parents and last but not least, I would

like to thank Google. Without Mr.Saravanan, I will not have enough information to finish this

system successfully. He gave me all the information that I asked to him. Then without my

supervisor, I wouldn’t finish this system in a correct format. My supervisor explains me the

correct method to do the system till the end. Then without my friend I will face some

problems. They helped me whenever I had problems with the coding. Then I would like to

thank my parents, because they support me morally whenever I get confused and when I try

to give up. Then lastly I would like to thank to Google, because this website helps me a lot

when I have a major problem with the coding. Whenever my friends were not beside me, I try

to solve my problems by searching in the Google website.

1

Page 2: Tuition Registration System with vb6 codings

Table of content PageAbstract 1Acknowledgement 1Chapter 1Background of study 3Problem statement 4Objective 5Scope of study 5Project significant 6Literature review 6 - 7Chapter 2Methodology and analysis 8 - 13Chapter 3Design 14 - 29Chapter 4Results and Interfaces 30 - 41System testing 42 - 52Chapter 5Conclusion and future works 53 - 54Appendix Source code 55 - 112

2

Page 3: Tuition Registration System with vb6 codings

Chapter 1

Background of Study

Nowadays People are sufficiently maintaining their own business like restaurant, education

centre and much more. An education centre is organized designed to provide good education

for students. Education centre will not be same teaching level each other’s but they all needed

the efficient and effective operation of an education.

Smart tuition centre was established in 2007 by Mr.Saravanan. It’s located in 23-A, Jalan Ah

Peng, 35900 Tanjong Malim, Perak, Malaysia. This tuition is mainly for SPM students. Smart

Tuition Centre will be started from 5.00PM – 9.00PM on Saturday and Sunday, and on the

other day, the Tuition Centre will be closed. This tuition has capable of three classrooms, a

manager room, and also with two bathrooms. Smart Tuition Centre has around 5 teachers,

and 2 staffs,

1. Manager (himself Mr.Saravanan)

2. One Physics teacher (for SPM)

3. One Biology teacher (for SPM)

4. One Chemistry teacher (for SPM)

5. One Mathematic teacher (for SPM)

6. One Add Math teacher (for SPM)

7. Two staffs

3

Page 4: Tuition Registration System with vb6 codings

Problem Statement

1. Too much of students information data

Mr.Saravanan used to record all the information of the student and teacher manually and keep

it in file. So as the student increase to his education centre, he found a lot of difficulties by

recording the student’s and teacher’s information manually. And also he has to carry a lot of

file with him whenever he comes to the education centre. Sometimes he forgets some files at

his house and need to travel again to take it back.

2. Make simple mistakes

Sometimes when Mr.Saravanan records the student information, he makes some mistakes in

it. To re-correct the mistakes, Mr.Saravanan has to record all over again. Before his tuition

centre joined by a plenty of student, he doesn’t noticed the problem with a few of students but

now he find some difficulties. He has to re-correct the information all over again when the

students change their personal information like changing their phone number or their house

address or etc.

3. Losing some important data

Mr.Saravanan had a few problems by lost some important information of the students and

teachers. He always use the manual system to record it and had some experience in losing the

important data and he didn’t having a problem before his tuition centre joined by a plenty of

student, but for now he faced a lot of problems by this. So when the students came up with

some questions like “where are my fee results?”, or “where is my information?” or etc, he has

to show them what they asking for. As I mentioned before, he had a bit experience in losing

some important data, so when the student came and ask, he face some problem by that.

4. Not enough time to record

Mr.Saravanan having some problem with times because now his tuition centre were joined by

many students and he don’t have much time to record the system manually. Before this, he

doesn’t find any difficulties with few students. And now he faces the problems. Because his

primary job as a teacher and he doing the education centre as a part time. So by that, he

doesn’t have much time to concentrate on the data recording by manually and he also has to

concentrate on his school work. So by that he faces a lot of problems.

4

Page 5: Tuition Registration System with vb6 codings

Objective

Nowadays, the world is getting into digital world system that was trying to create to make for

people more efficiency and convenience. The main purpose of this project is to handle the

data management efficiently. This system allows add students and teachers information;

delete it, and modifying the information of the students and teachers by save the wasting

time. Not need to spend a lot of time for record it manually. The main objective of tuition

registration system is to maximize profit by increasing efficiency and decreasing overhead

without compromising student’s satisfaction.

To reduce the use of papers.

To minimize the redundancy and loss of data.

To save time, cost, and effort for manpower uses.

To have backup option of the system.

Scope of studyThis system is going to be developed in order to have better data management for education

centre. It is more to management tools which help user to store data accordingly and

maintaining it.

1. Subject cost

The payment method for fees can be done in cash only. Not using the system to pay. But the

admin can refer the payment for the subject and also he can edit the value according to the

rules.

2. Registration

This section is going to be used by the administrator (the person who administers the system).

He can edit the student and teacher information, can delete it and also can add. He also can

edit the timetable and subject value. The students and teachers can use this system but they

only can refer it, they cannot edit or delete or can add.

3. Schedule

The admin can edit the schedule and save it. The student and teacher only can view the

schedule that edited by admin.

4. Teacher and student

Teacher and student, they only can view the schedule that edit by admin and they cannot edit

their information. They have to give their information to the admin and the admin only do the

editing. It’s for security purpose.

5

Page 6: Tuition Registration System with vb6 codings

Project significanceThe reason of building this system is for better data management. It can be used to replace the

manual system, where the manual system can be the alternative method. Instead of using

manually record, which require more time and cost, this system has the ability to add record,

save record, delete record, edit record and view report. All these tasks are doing by computer.

The task can be centralized which means, the process of entering data, handling data,

maintaining data and updating data can be done by administer. The information inside the

system will be keep safely and securely. There is an authenticated level, for top management

its down level. The authentication requires name and password for admin.

1. Admin – Admin can edit the students and teachers information, delete the information, add

the information, search the information, can edit the schedule and last is he can edit the

subject’s value.

2. Teacher – Teachers can view the schedule that edit by the admin.

3. Student – Students can view the schedule that edit by the admin.

4. Subject cost – The admin can change the subject cost based on the student amount. He also

can view the subject cost for make calculation manually.

5. Registration – The admin can register the student information and teacher information. He

also can edit the information when the teacher or student changes their phone number or

address. But teachers and students cannot edit or add their information in it. It’s for security

purpose.

Literature ReviewThis chapter is about reviewing past researches that can be used as the material of this

project. It is also to define the methodology that will be use for the system. (Haywood and

Wragg, 1982) "The purpose of reviewing previous works is to guide through the kind of work

that others have done related to the project field." The aim of a literature review is to show

that the writer has studied existing work in the field with insight. Literature review presents a

clear case and context for the project which makes up the rest of the thesis. The project that is

going to be developed entitled Education Centre Management System. The review includes

the research on existing system. There is also research on related topic such as the

management of data and the database aspect such as database security, database permission,

6

Page 7: Tuition Registration System with vb6 codings

and information retrieval. The research on software and hardware that is used for this project

is also reviewed in this chapter.

On previous work, they made a lot of mistakes but still the system can run. So when

the admin face a lot of problem by the system, he comes back to the manual system because

the students are very low amount. But when the student increases in his tuition centre, he

faces a lot of problems by manually adding them. So I’m helping him to make the system

work properly and put more things to make it user friendly. As I do the research on the

previous work, I found a lot of mistakes that made by the developer. The developer just does

the basic development in that system and it’s not a user friendly program. So I take some of

the ideas from the previous developers program and put some of my ideas in it to complete

the system fully and also user friendly.

In previous program, the developer just designs the registration system only. It’s like

the admin enter to the system and register the student information in the system and log out

from the system. Then he didn’t separate the student and teacher’s registration system, he just

merges it and when the admin add the information, it will combine and look messy. He didn’t

make the edit command in the system. So when Mr.Saravanan need to edit the information,

he have to delete the record and he have to add the information again. So in that way he can

edit the information. But it is not a user friendly system that made by previous developer.

So I gather his ideas and some of my ideas to do the system completely. I put the edit

command in the program, so Mr.Saravanan doesn’t need to delete the record and add it again.

Then I separate the student registration section and teacher’s registration section. So it would

not look messy when the admin add the information. Then I put extra information, example

like viewing and editing the subject cost and also viewing and editing the schedule. It’s a

useful thing because he doesn’t have to remember the cost and also the schedule. And also

can back up the information about the cost and schedule. Then I gave another extra thing in

the system. It’s for security, and the admin, teachers and student will gave a username and

password and they use that information to login to the system. But the user cannot use their

username and password on other user’s login system.

Finally, I made an exclusive and user friendly system to Mr.Saravanan. And it will

help him and make his work easier. This system is fully made upon the admin needs. He will

find a lot easier thing than the previous system.

7

Page 8: Tuition Registration System with vb6 codings

Chapter 2

Methodology and Analysis

Fact Finding

Fundamentally there is numerous truth discovering systems that are utilized by framework

examiner to research necessity. In this stage, the working of the framework is to be seen by

the framework investigator to plan the proposed framework. The expert necessities to

completely comprehend the current framework. Each system has its own particular qualities

and shortcoming.

Interviews

Investigators can utilize meetings to gather data about present framework from the potential

clients. There might be a few goals to utilizing talking with, for example, figuring out

certainties, confirming truths, illuminating realities, producing energy, getting the end client

included, distinguishing necessity and social event thoughts and ideas. Here the experts find

the zones of error, impossible special case and portrayal of exercises and issues as well as

imperviousness to the new proposed framework.

Research

A useful fact-find technique is to research the application and problem. Computer trade

journals, reference books and the internet are good sources of information. So that, I have

done a research from other website like www.f1sourcecode.com and Google search. From

that, I had got an idea about the process and design of the system.

Observation

Perception is a standout amongst the best certainty discovering systems for comprehension a

framework. With this system, it is conceivable to either take part in or watch an individual

perform exercises to look into the framework. This strategy is regularly utilized when the

legitimacy of information gathered through other system is being referred to or when the

8

Page 9: Tuition Registration System with vb6 codings

multifaceted nature of specific parts of the framework anticipates a reasonable clarification

by the end clients.

Software development methods

Before starting development for project that has very important things to choose of

methodology I would be used the waterfall development model for the project that is the one

of the methodology. It will help to develop in project management of the system. Its

descriptions development method that is linear and sequential. It has clear goals output for

each phase of development.

Advantages of the waterfall method

1. Design error is captured before any software is written saving time during the

implementation phase.

2. The total cost of the project can be accurately estimated after the requirement has been

defined.

3. Simple and easy to understand and use.

4. Allow for departmentalization.

5. Managerial control.

6. Allow returnable phase.

7. Easy in analyzing potential changes.

9

Page 10: Tuition Registration System with vb6 codings

Waterfall Methodology

Requirement

I take the previous system to do the research. And then I gather some information from Mr.Saravanan

about the tuition that he runs.

Analysis

From the previous system, I’ve found a lot of mistakes done by the previous developer. Then

I do some analysis on the internet for the system.

Design

Then I change the design based on the admin needs. And also I design the system based on

the internet.

Coding

I change the existing coding that were in the previous system.

10

Page 11: Tuition Registration System with vb6 codings

Testing

Then I test the system that if work properly or not. When it fails to run, I change the design

and then need to change the coding and test the system again. These current methods were

repeats as long as the system fails to run.

Acceptance

If the system runs successfully, the admin will accept my system.

System Requirements

Hardware 1. LCD Monitor

2. Printer

3. Memory minimum 1GB RAM

4. Pentium 4 or above computer

5. 8x speed CD-ROM

6. Keyboard and Mouse

7. 40GB hard disk space

Software 1. Visual Basic (vb 6.0) software

2. Microsoft Window Xp or Microsoft Window 7

3. Microsoft Access

4. Microsoft word

5. My SQL

User requirements

User requirement analysis provides precise description of the content, functionality and

quality demanded by prospective users for the identification of user.

1. Security

2. Login

3. Register

11

Page 12: Tuition Registration System with vb6 codings

4. Schedule and subject value viewing

5. Editing the information

Functional

A functional is a requirement that when satisfied will allow the user to perform some kind of

function.

1. Add information. Admin can add the student’s and teacher’s information to the system.

2. Edit information. Admin can edit the student’s and teacher’s information to the system.

3. Delete information. Admin can delete the student’s information from the system.

4. Cancel. Admin can cancel from add, delete or modifying the information to the system.

5. Search information. Admin can search the student’s and teacher’s information to the

system.

6. OK. Admin can press the OK button to add the information

7. First, Next, Previous and Last. Admin can press these buttons for searching the student’s

information one by one.

Non-functional

Non-Function is usually some form of constraint or restriction that must be considered when

designing the solution

1. Security. The registration system provides the password security access control to avoid

unauthorized user to login to the system.

2. Consistency. The tuition registration system provides consistency user interface design to

the admin. The designs of the screen are standardize and consistent that make the admin feel

comfortable to use it.

12

Page 13: Tuition Registration System with vb6 codings

3. Reliability. The tuition registration system provides the effective method to maintain the

back-end of the system such as generate report. All of the orders are manage by this system

effectively.

4. Convenience. The system may give convenience to the admin to make order easily.

13

Page 14: Tuition Registration System with vb6 codings

Chapter 3

DesignSystem Modelling- UML Diagram

A class diagram is an illustration of the relationships and source code dependencies among

classes in the Unified Modelling Language (UML).Use Case Diagrams

Administrator

14

Maintain the system

Maintain the registration

Maintain the fee

Maintain the schedule

Viewing the schedule

Teacher

Viewing the schedule

Staff

Page 15: Tuition Registration System with vb6 codings

Database Design- ERD diagrams

This diagramming technique is used to visually present a database schema or data model and

was original proposed by Chen in the 1970s. The ERD diagram also called an entity-

relationship (ER) diagram, a graphical representation of entities and their relationships to each

other, typically used in computing in regard to the organization within databases or

information systems. An entity is a piece of data-an object or concept about which data is

stored.

15

ADMIN

CHANGE

STAFF TEACHER

REGISTER REGISTER

CHECK CHECK

SCHEDULE

Page 16: Tuition Registration System with vb6 codings

figure3.1

figure3.2

16

Admin Exit

Smart tuition centre

ADMIN LOGIN SYSTEM

USERNAME

PASSWORD

LOGIN EXITCLEAR

TEACHER STAFF

Page 17: Tuition Registration System with vb6 codings

figure 3.3

17

REGISTRATION

TEACHER

SCHEDULE

SUBJECT COST

EXIT

Page 18: Tuition Registration System with vb6 codings

figure3.4

18

ID SEARCH

CANCEL

OK

MODIFY

DELETE

ADD

ADDRESS

PHONE NUMBER

GENDER

AGE

NAME

FIRST PREVIOUS NEXT LAST EXIT

REPORT

Page 19: Tuition Registration System with vb6 codings

figure3.5

19

MATHEMATIC

RM 90

RM 100

RM 80RM 85

BIOLOGY CHEMISTRY

PHYSICS

RM 150

ADD MATH

BACK UPDATE

Page 20: Tuition Registration System with vb6 codings

figure3.6

20

1.00PM 2.30PM 5.00PM 6.30PM 8.30

TO TO TO TO TO

2.30PM 4.00PM 6.30PM 8.00PM 10.00PM

SATURDAY MATH ADD MATH PHYSICS CHEMISTRY BIOLOGY

SUNDAY MATH ADD MATH PHYSICS CHEMISTRY BIOLOGY

1.00PM 2.30PM 5.00PM 6.30PM 8.30

TO TO TO TO TO

2.30PM 4.00PM 6.30PM 8.00PM 10.00PM

BACK UPDATE

Page 21: Tuition Registration System with vb6 codings

figure3.7

21

EXITLASTFIRST PREVIOUS NEXT

Page 22: Tuition Registration System with vb6 codings

figure3.8

22

ID

NAME

ADDRESS

PHONE NUMBER

GENDER

AGE

SEARCH

CANCEL

OK

MODIFY

DELETE

ADDSTAFF LOGIN SYSTEM

USERNAME

PASSWORD

LOGIN EXITCLEAR

Page 23: Tuition Registration System with vb6 codings

Figure3.9

23

STUDENT REGISTRATION

TEACHER REPORT

TEACHER REGISTRATION

STUDENT REPORT

EXIT

Page 24: Tuition Registration System with vb6 codings

Figure 3.10

24

Page 25: Tuition Registration System with vb6 codings

Figure 3.11

25

ZOOM

(LIST DATABASE) FOR STUDENT

Page 26: Tuition Registration System with vb6 codings

Figure 3.12

26

Page 27: Tuition Registration System with vb6 codings

Figure 3.13

27

ZOOM

(LIST DATABASE) FOR TEACHER

Page 28: Tuition Registration System with vb6 codings

figure3.14

28

TEACHER LOGIN SYSTEM

USERNAME

PASSWORD

LOGIN CLEAR EXIT

Page 29: Tuition Registration System with vb6 codings

figure3.15

29

1.00PM 2.30PM 5.00PM 6.30PM 8.30

TO TO TO TO TO

2.30PM 4.00PM 6.30PM 8.00PM 10.00PM

SATURDAY MATH ADD MATH PHYSICS CHEMISTRY BIOLOGY

1.00PM 2.30PM 5.00PM 6.30PM 8.30

TO TO TO TO TO

2.30PM 4.00PM 6.30PM 8.00PM 10.00PM

SUNDAY MATH ADD MATH PHYSICS CHEMISTRY BIOLOGY

BACK

Page 30: Tuition Registration System with vb6 codings

Chapter 4

Results and InterfacesLogging Page

This page is the first page and it is used for all users. It has admin, teacher and student

buttons. All users need user name and password to enter the system. It page have show logo.

figure 3.12

30

Page 31: Tuition Registration System with vb6 codings

Admin page

This page is use by admin and it link to another page that can choose registration, schedule,

subject cost and teacher. So this four buttons can link to what the admin want to done.

figure3.13

31

Page 32: Tuition Registration System with vb6 codings

Registration

In this registration, the admin can register the student detail by adding the information, delete

the information, modify the information and also search the information.

Figure3.14

32

Page 33: Tuition Registration System with vb6 codings

Schedule

In this page, admin can modify the schedule according to the teacher’s needs and also

student’s needs.

Figure3.15

33

Page 34: Tuition Registration System with vb6 codings

Subject cost

In this page, admin can change the value of one subject according to the amount of teacher. If

the amount of teacher increases, he will increase the cost per subject.

Figure3.16

34

Page 35: Tuition Registration System with vb6 codings

Teacher

In this page, he can register the teacher’s information. This page is like the student

registration page.

Figure3.17

35

Page 36: Tuition Registration System with vb6 codings

Teacher

This page is for teachers. They can look up the schedule that edited by the admin. And teachers cannot edit anything in this page.

Figure3.18

36

Page 37: Tuition Registration System with vb6 codings

Staff

This page is for staffs. They only can add and search the registration for student and teacher.

They also can view the report of the students and teachers.

Figure3.19

37

Page 38: Tuition Registration System with vb6 codings

38

Page 39: Tuition Registration System with vb6 codings

39

Page 40: Tuition Registration System with vb6 codings

40

Page 41: Tuition Registration System with vb6 codings

41

Page 42: Tuition Registration System with vb6 codings

System testing

Home ScreenNo. Text Description Tested Data Expected Result Pass

/ Fail Remark

1. Run Tuition System.exe.

Application runs successfully.

Pass

2. Click on “Admin” button at Home Screen form.

“Admin Login System” will appear.

Pass

3. Click on “Teacher” button at Home Screen form

“Teacher Login System” will appear.

Pass

4. Click on “Staff” button at Home Screen form.

“Staff Login System” will appear.

Pass

4. Click on “Exit” button at Home Screen form.

The system will shut down.

Pass

Admin Login SystemNo. Text Description Tested Data Expected Result Pass

/ Fail Remark

1. Click on “Login” button at Admin Login Page.

Usename:

Password:

A message box will appear.

Fail Incorrect username or password.

2. Username:saravanan

Password:

A message box will appear.

Fail Incorrect username or password.

3. Username:

Password:logka

A message box will appear.

Fail Incorrect username or password.

4. Username:saravanan

Password:logka

The system will show “Selective Section”.

Pass Access Granted !

5. Click on “Clear” button at Admin Login System .

It will clear the username/password field.

Pass The both fields will be blank.

6. Click on “Exit” button at Admin Login

The system will appear back the

Pass

42

Page 43: Tuition Registration System with vb6 codings

System. Home Screen.

Selective sectionNo. Text Description Tested Data Expected Result Pass

/ Fail Remark

1. Click on “Registration” button at Selective Section Page.

The system will show “Student Registration” page.

Pass

2. Click on “Subject Cost” button at Selective Section Page.

The system will show “Subject Cost” page.

Pass

3. Click on “Schedule” button at Selective Section Page.

The system will show “Schedule” page.

Pass

4. Click on “Teacher” button at Selective Section Page.

The system will show “Teacher” page.

Pass

5. Click on “Exit” button at Selective Section Page.

The system will appear back the Home Screen.

Pass

Student Information Via AdminNo. Text Description Tested Data Expected Result Pass

/ Fail Remark

1. Click on “Search” button at Student Registration.

Student ? = 9 A Student’s record will appear.

Pass A message box will appear and will show a detail that related to a ID number after you key in the number.

2. Click on “Add” button at Student Registration.

ID:9 The details will be add into that system.

Pass ID (Auto generated number)

Name:Nikki Jack Name (Only alphabet values)

Age:23 Age (Only number values)

Gender:Male Gender (Combo box: Male/Female)

43

Page 44: Tuition Registration System with vb6 codings

P.Number:166575423 P.Number (Only 10 digits and number values)

Address:Selangor Address (Alphabet and number values)

3. Click on “Delete” button at Student Registration.

A message box will appear.

Pass Record Deleted !

4. Click on “Modify” button at Student Registration.

ID:9 A message box will appear.

Pass Record Modified !

Name:Nikki Jackie

Age:23

Gender:Male

P.Number:166575423

Address:Selangor

5. Click on “Ok” button at Student Registration.

Add another one?

Yes or No

A message box will appear , if yes means it will allow to add another detail and if no means it won’t continue to add another detail.

Pass Record Added !

6. Click on “Cancel” button at Student Registration.

Cancel to add a record.

Pass Nothing will happend in database.

7. Click on “First” button at Student Registration.

The system will display the first record in the database.

Pass

8. Click on “Previous” button at Student Registration.

The system will display the previous records and if it reaches at first record a message box will appear.

Pass First Record !

44

Page 45: Tuition Registration System with vb6 codings

9. Click on “Next” button at Student Registration.

The system will display the next records and if it reaches at last record a message box will appear.

Pass Last Record !

10. Click on “Last” button at Student Registration.

The system will display the Last record in the database.

Pass

11. Click on “Exit” button at Student Registration.

The system will go back to the “Selective Section”.

Pass

Subject Cost Checking And Updating Session via AdminNo. Text Description Tested Data Expected Result Pass

/ Fail Remark

1. Click on “Back” button at Payment Section.

The system will go back to the “Selective Section”.

Pass

2. Click on “Modify” button at Payment Section.

The system will show the modified Payments who are the Admin would modify.

Pass

Schedule Checking and Updating SessionNo. Text Description Tested Data Expected Result Pass

/ Fail Remark

1. Click on “Back” button at Schedule.

The system will go back to the “Doctor Menu”.

Pass

2. Click on “Modify” button at Schedule.

The system will show the modified schedule who the Admin modified.

Pass

Teacher Information Via AdminNo. Text Description Tested Data Expected Result Pass Remark

45

Page 46: Tuition Registration System with vb6 codings

/ Fail

1. Click on “Search” button at Teacher Registration.

Teacher ? = 9 A Teacher’s record will appear.

Pass A message box will appear and will show a detail that related to a ID number after you key in the number.

2. Click on “Add” button at Teacher Registration.

ID:9 The details will be add into that system.

Pass ID (Auto generated number)

Name: Manisha Name (Only alphabet values)

Age:45 Age (Only number values)

Gender:Female Gender (Combo box: Male/Female)

P.Number:167465423 P.Number (Only 10 digits and number values)

Address:Selangor Address (Alphabet and number values)

3. Click on “Delete” button at Teacher Registration.

A message box will appear.

Pass Record Deleted !

4. Click on “Modify” button at Teacher Registration.

ID:9 A message box will appear.

Pass Record Modified !

Name: Manisha

Age:45

Gender:Female

P.Number:167465423

Address:Selangor

5. Click on “Ok” button at Teacher Registration.

Add another one?

Yes or No

A message box will appear , if yes means it will allow to add another detail and if no means it won’t

Pass Record Added !

46

Page 47: Tuition Registration System with vb6 codings

continue to add another detail.

6. Click on “Cancel” button at Teacher Registration.

Cancel to add a record.

Pass Nothing will happend in database.

7. Click on “First” button at Teacher Registration.

The system will display the first record in the database.

Pass

8. Click on “Previous” button at Teacher Registration.

The system will display the previous records and if it reaches at first record a message box will appear.

Pass First Record !

9. Click on “Next” button at Teacher Registration.

The system will display the next records and if it reaches at last record a message box will appear.

Pass Last Record !

10. Click on “Last” button at Teacher Registration.

The system will display the Last record in the database.

Pass

11. Click on “Exit” button at Teacher Registration.

The system will go back to the “Selective Section”.

Pass

Schedule Checking and Updating Session via Teacher (View Only)

No. Text Description Tested Data Expected Result Pass / Fail

Remark

1. Click on “Back” button at Schedule.

The system will go back to the “Staff Menu”.

Pass

Staff Menu ScreenNo. Text Description Tested Data Expected Result Pass Remark

47

Page 48: Tuition Registration System with vb6 codings

/ Fail

1. Click on “Student Registration” button at Staff Menu Screen.

The system will show “Student Registration” page via Staff.

Pass

2. Click on “Student’s Report” button at Staff Menu Screen.

The system will show “Student’s Report” page via Staff.

Pass

3. Click on “Teacher Registration” button at Staff Menu Screen.

The system will show “ Teacher Registration ” page via Staff.

Pass

4. Click on “Teacher’s Report” button at Staff Menu Screen.

The system will show “ Teacher’s Report ” page via Staff.

Pass

5. Click on “Exit” button at Home Screen.

The system will appear back the Home Screen.

Pass

48

Page 49: Tuition Registration System with vb6 codings

Student Information Via StaffNo. Text Description Tested Data Expected Result Pass

/ Fail Remark

1. Click on “Search” button at Student Registration.

Student ? = 9 A Student’s record will appear.

Pass A message box will appear and will show a detail that related to a ID number after you key in the number.

2. Click on “Add” button at Student Registration.

ID:9 The details will be add into that system.

Pass ID (Auto generated number)

Name:Nikki Jack Name (Only alphabet values)

Age:23 Age (Only number values)

Gender:Male Gender (Combo box: Male/Female)

P.Number:166575423 P.Number (Only 10 digits and number values)

Address:Selangor Address (Alphabet and number values)

3. Click on “Delete” button at Student Registration.

Doesn’t work for Staff

Pass

4. Click on “Modify” button at Student Registration.

ID:9 Doesn’t work for Staff

Pass

Name:Nikki Jackie

Age:23

Gender:Male

P.Number:166575423

Address:Selangor

49

Page 50: Tuition Registration System with vb6 codings

5. Click on “Ok” button at Student Registration.

Add another one?

Yes or No

A message box will appear , if yes means it will allow to add another detail and if no means it won’t continue to add another detail.

Pass Record Added !

6. Click on “Cancel” button at Student Registration.

Cancel to add a record.

Pass Nothing will happend in database.

7. Click on “First” button at Student Registration.

The system will display the first record in the database.

Pass

8. Click on “Previous” button at Student Registration.

The system will display the previous records and if it reaches at first record a message box will appear.

Pass First Record !

9. Click on “Next” button at Student Registration.

The system will display the next records and if it reaches at last record a message box will appear.

Pass Last Record !

10. Click on “Last” button at Student Registration.

The system will display the Last record in the database.

Pass

11. Click on “Exit” button at Student Registration.

The system will go back to the “Staff Screen Menu”.

Pass

Students report via StaffNo. Text Description Tested Data Expected Result Pass

/ Fail Remark

1. Click on “Student’s Report” button at Staff Menu.

The system show the Student’s data report and also can print.

Pass

50

Page 51: Tuition Registration System with vb6 codings

Teacher Information Via StaffNo. Text Description Tested Data Expected Result Pass

/ Fail Remark

1. Click on “Search” button at Teacher Registration.

Teacher ? = 9 A Teacher’s record will appear.

Pass A message box will appear and will show a detail that related to a ID number after you key in the number.

2. Click on “Add” button at Teacher Registration.

ID:9 The details will be add into that system.

Pass ID (Auto generated number)

Name: Manisha Name (Only alphabet values)

Age:45 Age (Only number values)

Gender:Female Gender (Combo box: Male/Female)

P.Number:167465423 P.Number (Only 10 digits and number values)

Address:Selangor Address (Alphabet and number values)

3. Click on “Delete” button at Teacher Registration.

Doesn’t work for Staff

Pass

4. Click on “Modify” button at Teacher Registration.

ID:9 Doesn’t work for Staff

Pass

Name: Manisha

Age:45

Gender:Female

P.Number:167465423

Address:Selangor

5. Click on “Ok” button at Teacher

Add another one? A message box will appear , if yes

Pass Record Added !

51

Page 52: Tuition Registration System with vb6 codings

Registration. Yes or No means it will allow to add another detail and if no means it won’t continue to add another detail.

6. Click on “Cancel” button at Teacher Registration.

Cancel to add a record.

Pass Nothing will happend in database.

7. Click on “First” button at Teacher Registration.

The system will display the first record in the database.

Pass

8. Click on “Previous” button at Teacher Registration.

The system will display the previous records and if it reaches at first record a message box will appear.

Pass First Record !

9. Click on “Next” button at Teacher Registration.

The system will display the next records and if it reaches at last record a message box will appear.

Pass Last Record !

10. Click on “Last” button at Teacher Registration.

The system will display the Last record in the database.

Pass

11. Click on “Exit” button at Teacher Registration.

The system will go back to the “Staff Menu Screen”.

Pass

Teachers report via StaffNo. Text Description Tested Data Expected Result Pass

/ Fail Remark

1. Click on “Teacher’s Report” button at Staff Menu.

The system show the Teacher’s data report and also can print.

Pass

52

Page 53: Tuition Registration System with vb6 codings

Chapter 5

Conclusion and Future Works

Achievement

Finally I done the system based on Mr.Saravanan needs. This system has all the facilities of

current situation needs. This system also can back up the file for emergency usage. This

system can record the student and teachers data, edit it, delete it and also searching the data.

In this system, the admin can view the subject cost and edit it and also he can view the

schedule and edit it. For teachers in this system, they can view the schedule only and they

cannot do other activity in it, this is for security purpose. And for the staffs, they only can add

the data of students and teachers and can view the report. In this system, each and every

person will have the username and password to login to the system. And also they cannot use

that information to other link, example like the staff cannot access to admin page with staff

password and username, it’s for security purpose.

Difficulties

I had a lot of difficulties till I finish this system. It nearly takes a month to finish this system.

The registration section is the most difficult part compare to other section in this system. For

finishing the registration system only it takes 3 weeks. But I finally finish this system

successfully, because of the support of my parents, supervisor and my friends.

Future Works

The future work might be carried from the subject cost section. Because for now the admin

doesn’t want the calculation part in that section, so after a long day when the student were

increase and also when the subject increase, then need to edit the system a bit more. Adding

the calculation part in the subject cost section.

Conclusion

Project background describes the introduction to the project as a whole. It includes the

content of the project, target users and the importance of the project. The problem statement

describes the problems related to why this project should be developed. From the problem

statements, the objectives of the project can be extracted. By replacing and improving the

53

Page 54: Tuition Registration System with vb6 codings

management information system, less manual work will be required in the process of

collecting, handling, and maintaining the data. The scopes of the project explain the boundary

of the system while the project significance deliver what the system can provide based on

developer site. The expected output reflects the system’s ability from user view. The

literature review explains where in current literature the problem was and also first

recognized as well as what provide as the foundation for the system. The methodology is

waterfall model, and based on the model, the project were done.

54

Page 55: Tuition Registration System with vb6 codings

Appendix

Source codes

Home screen

Private Sub Command1_Click()

Unload Me

Form3.Show

End Sub

Private Sub Command2_Click()

End

End Sub

Private Sub Command3_Click()

Unload Me

Form8.Show

End Sub

Private Sub Command4_Click()

Unload Me

Form10.Show

End Sub

Private Sub Form_Load()

55

Page 56: Tuition Registration System with vb6 codings

With Form1

Top = (Screen.Height - .Height) / 2

Left = (Screen.Width - .Width) / 2

End With

End Sub

Admin login system

Private Sub Command1_Click()

Call login

End Sub

Function login()

If (Text1.Text = "saravanan" And Text2.Text = "logka") Then

MsgBox "Access Granted, " & "Admin" & "!", vbInformation, "Welcome!"

Unload Me

Form4.Show

Else

MsgBox "Incorrect Username or Password", vbExclamation, "Error!"

Text1.Text = ""

Text2.Text = ""

Text1.SetFocus

End If

End Function

Private Sub Command2_Click()

Text1.Text = ""

Text2.Text = ""

56

Page 57: Tuition Registration System with vb6 codings

End Sub

Private Sub Command3_Click()

Unload Me

Form1.Show

End Sub

Private Sub Form_Load()

With Form1

Top = (Screen.Height - .Height) / 2

Left = (Screen.Width - .Width) / 2

End With

End Sub

Private Sub Text2_KeyUp(KeyCode As Integer, Shift As Integer)

If KeyCode = 13 Then

Call login

End If

End Sub

Selective section

Private Sub Command1_Click()

Unload Me

Form2.Show

End Sub

57

Page 58: Tuition Registration System with vb6 codings

Private Sub Command2_Click()

Unload Me

Form5.Show

End Sub

Private Sub Command3_Click()

Unload Me

Form6.Show

End Sub

Private Sub Command4_Click()

Unload Me

Form7.Show

End Sub

Private Sub Command5_Click()

Unload Me

Form3.Show

End Sub

Private Sub Command6_Click()

Unload Me

Form11.Show

58

Page 59: Tuition Registration System with vb6 codings

End Sub

Private Sub Form_Load()

With Form1

Top = (Screen.Height - .Height) / 3

Left = (Screen.Width - .Width) / 2

End With

End Sub

Student registration via Admin

Dim conConnection As New ADODB.Connection

Dim rstRecordSet As New ADODB.Recordset

Dim rstRecordSet2 As New ADODB.Recordset

Private Sub cmdCancel_Click()

Call reset

End Sub

Private Sub cmdOK_Click()

i = 0

i = i + 1

If txtName.Text = "" Then

MsgBox ("Text field cannot be empty!!")

Else

If txtAge.Text = "" Then

MsgBox ("Text field cannot be empty!!")

Else

If TxtPNumber.Text = "" Then

59

Page 60: Tuition Registration System with vb6 codings

MsgBox ("Text field cannot be empty!!")

Else

If TxtAddress.Text = "" Then

MsgBox ("Text field cannot be empty!!")

Else

If Combo1.Text = "" Then

MsgBox ("Text field cannot be empty!!")

Else

'rstRecordSet2.Open "INSERT INTO tblStudent VALUES ('" & txtID.Text & "', '" &

txtName.Text & "'," & Int(txtAge.Text) & ", '" & Combo1.Text & "', " & TxtPNumber.Text

& ", '" & TxtAddress.Text & "')", conConnection

rstRecordSet2.Open "INSERT INTO tblStudent (Name, Age, Gender, Phone_Number,

Address) VALUES ( '" & txtName.Text & "'," & Int(txtAge.Text) & ", '" & Combo1.Text &

"', " & TxtPNumber.Text & ", '" & TxtAddress.Text & "')", conConnection

Call refreshALL

MsgBox ("Record Added"), vbInformation, "Succesfully...!!"

lAnswer = MsgBox("Add another one?", vbYesNo)

If lAnswer = vbYes Then

Call cmdAdd_Click

Else

Call reset

End If

End If

End If

End If

End If

End If

End Sub60

Page 61: Tuition Registration System with vb6 codings

Private Sub cmdSearch_Click()

s = InputBox("Student ID?")

If Not s = "" Then

rstRecordSet2.Open "SELECT * FROM tblStudent WHERE ID = " & s & "",

conConnection

If rstRecordSet2.EOF = False Then

Call changeData(rstRecordSet2)

MsgBox "Record Found!", vbInformation, "Well Done!!"

Else

MsgBox ("Record Not Found!"), vbExclamation, "Sorry :-("

End If

rstRecordSet2.Close

End If

End Sub

Private Sub cmdAdd_Click()

cmdOK.Enabled = True

cmdCancel.Enabled = True

cmdAdd.Enabled = False

cmdDelete.Enabled = False

cmdModify.Enabled = False

cmdFirst.Enabled = False

cmdLast.Enabled = False

cmdNext.Enabled = False

cmdPrevious.Enabled = False

txtName.Text = vbNullString

txtAge.Text = vbNullString

Combo1.Text = vbNullString

TxtPNumber.Text = vbNullString

TxtAddress.Text = vbNullString

61

Page 62: Tuition Registration System with vb6 codings

txtName.SetFocus

txtID.Enabled = False

txtID.Text = ""

End Sub

Private Sub cmdDelete_Click()

rstRecordSet2.Open "DELETE FROM tblStudent WHERE ID = " & txtID.Text & "",

conConnection

Call refreshALL

MsgBox ("Record Deleted!"), vbInformation, "Dustbined Succesfully..!!!"

End Sub

Private Sub cmdModify_Click()

rstRecordSet2.Open "UPDATE tblStudent SET Name = '" & txtName.Text & "' WHERE

ID = " & txtID.Text & "", conConnection

rstRecordSet2.Open "UPDATE tblStudent SET Age = '" & txtAge.Text & "' WHERE ID =

" & txtID.Text & "", conConnection

rstRecordSet2.Open "UPDATE tblStudent SET Gender = '" & Combo1.Text & "' WHERE

ID = " & txtID.Text & "", conConnection

rstRecordSet2.Open "UPDATE tblStudent SET Phone_Number = '" & TxtPNumber.Text

& "' WHERE ID = " & txtID.Text & "", conConnection

rstRecordSet2.Open "UPDATE tblStudent SET Address = '" & TxtAddress.Text & "'

WHERE ID = " & txtID.Text & "", conConnection

Call refreshALL

MsgBox ("Record Modified!"), vbInformation, "Infromation Changed..!!!"

End Sub

Private Sub cmdFirst_Click()

rstRecordSet.MoveFirst

Call changeData(rstRecordSet)

62

Page 63: Tuition Registration System with vb6 codings

End Sub

Private Sub cmdLast_Click()

rstRecordSet.MoveLast

Call changeData(rstRecordSet)

End Sub

Private Sub cmdNext_Click()

rstRecordSet.MoveNext

If Not rstRecordSet.EOF = True Then

Call changeData(rstRecordSet)

Else

rstRecordSet.MovePrevious

MsgBox ("Last Record"), vbInformation, "No More..Sorry..!!"

End If

End Sub

Private Sub cmdPrevious_Click()

rstRecordSet.MovePrevious

If Not rstRecordSet.BOF = True Then

Call changeData(rstRecordSet)

Else

rstRecordSet.MoveNext

MsgBox ("First Record"), vbInformation, "No More..Sorry..!!"

End If

End Sub

Private Sub Combo1_KeyPress(KeyAscii As Integer)

KeyAscii = 0

63

Page 64: Tuition Registration System with vb6 codings

End Sub

Private Sub Command1_Click()

rstRecordSet.Close

conConnection.Close

Unload Me

Form4.Show

End Sub

Private Sub Command5_Click()

DataReport1.Show

End Sub

Private Sub Form_Load()

With Form1

Top = (Screen.Height - .Height) / 3

Left = (Screen.Width - .Width) / 2

End With

conConnection.Open "Provider = Microsoft.Jet.OLEDB.4.0;" & _

"Data Source = " & App.Path & "\Student_Database.mdb;" & _

"Mode = Read|Write"

Call refreshList

rstRecordSet.MoveFirst

Call changeData(rstRecordSet)

txtID.Enabled = False

Combo1.AddItem "Male"

64

Page 65: Tuition Registration System with vb6 codings

Combo1.AddItem "Female"

End Sub

Public Function changeData(rst As ADODB.Recordset)

txtID.Text = rst.Fields("ID")

txtName.Text = rst.Fields("Name")

txtAge.Text = rst.Fields("Age")

Combo1.Text = rst.Fields("Gender")

TxtPNumber.Text = rst.Fields("Phone_Number")

TxtAddress.Text = rst.Fields("Address")

End Function

Public Function refreshList()

rstRecordSet.Open "SELECT * FROM tblStudent;", conConnection, adOpenDynamic,

adLockOptimistic

While Not rstRecordSet.EOF

rstRecordSet.MoveNext

Wend

End Function

Public Function refreshALL()

rstRecordSet.Close

Call refreshList

rstRecordSet.MoveLast

Call changeData(rstRecordSet)

End Function

Private Sub reset()65

Page 66: Tuition Registration System with vb6 codings

cmdOK.Enabled = False

cmdCancel.Enabled = False

cmdAdd.Enabled = True

cmdDelete.Enabled = True

cmdModify.Enabled = True

cmdFirst.Enabled = True

cmdLast.Enabled = True

cmdNext.Enabled = True

cmdPrevious.Enabled = True

Call refreshALL

End Sub

Private Sub txtAge_KeyPress(KeyAscii As Integer)

If Not (KeyAscii = vbKeyBack Or KeyAscii = vbKeyDelete Or KeyAscii = vbKeySpace Or

(KeyAscii >= Asc("0") And KeyAscii <= Asc("9") And Len(txtAge) < 2)) Then

KeyAscii = 0

End If

End Sub

Private Sub txtName_KeyPress(KeyAscii As Integer)

If Not (KeyAscii = vbKeyBack Or KeyAscii = vbKeyDelete Or KeyAscii = vbKeySpace Or

(KeyAscii >= Asc("a") And KeyAscii <= Asc("z")) Or (KeyAscii >= Asc("A") And

KeyAscii <= Asc("Z"))) Then

KeyAscii = 0

End If

End Sub

Private Sub TxtPNumber_KeyPress(KeyAscii As Integer)

66

Page 67: Tuition Registration System with vb6 codings

If Not (KeyAscii = vbKeyBack Or KeyAscii = vbKeyDelete Or KeyAscii = vbKeySpace Or

(KeyAscii >= Asc("0") And KeyAscii <= Asc("9") And Len(TxtPNumber) < 10)) Then

KeyAscii = 0

End If

End Sub

Subject cost via Admin

Dim conConnection As New ADODB.Connection

Dim rstRecordSet As New ADODB.Recordset

Dim rstRecordSet2 As New ADODB.Recordset

Private Sub Combo1_Change()

Combo1.AddItem "150"

Combo1.AddItem "140"

Combo1.AddItem "130"

Combo1.AddItem "120"

Combo1.AddItem "110"

Combo1.AddItem "100"

End Sub

Private Sub Combo2_Change()

Combo2.AddItem "150"

Combo2.AddItem "140"

Combo2.AddItem "130"

Combo2.AddItem "120"

Combo2.AddItem "110"

Combo2.AddItem "100"

End Sub

Private Sub Combo3_Change()

67

Page 68: Tuition Registration System with vb6 codings

Combo3.AddItem "150"

Combo3.AddItem "140"

Combo3.AddItem "130"

Combo3.AddItem "120"

Combo3.AddItem "110"

Combo3.AddItem "100"

End Sub

Private Sub Combo4_Change()

Combo4.AddItem "150"

Combo4.AddItem "140"

Combo4.AddItem "130"

Combo4.AddItem "120"

Combo4.AddItem "110"

Combo4.AddItem "100"

End Sub

Private Sub Combo5_Change()

Combo5.AddItem "150"

Combo5.AddItem "140"

Combo5.AddItem "130"

Combo5.AddItem "120"

Combo5.AddItem "110"

Combo5.AddItem "100"

End Sub

Private Sub Command1_Click()

Unload Me

68

Page 69: Tuition Registration System with vb6 codings

Form4.Show

conConnection.Close

End Sub

Private Sub Command2_Click()

rstRecordSet2.Open "UPDATE tblPay SET maths = '" & Combo1.Text & "'",

conConnection

rstRecordSet2.Open "UPDATE tblPay SET addm = '" & Combo2.Text & "'",

conConnection

rstRecordSet2.Open "UPDATE tblPay SET phy = '" & Combo3.Text & "'", conConnection

rstRecordSet2.Open "UPDATE tblPay SET bio = '" & Combo4.Text & "'", conConnection

rstRecordSet2.Open "UPDATE tblPay SET chem = '" & Combo5.Text & "'",

conConnection

Call refreshALL

MsgBox ("Record Modified!"), vbInformation, "Infromation Changed..!!!"

End Sub

Private Sub Form_Load()

With Form1

Top = (Screen.Height - .Height) / 3

Left = (Screen.Width - .Width) / 2

End With

conConnection.Open "Provider = Microsoft.Jet.OLEDB.4.0;" & _

"Data Source = " & App.Path & "\Student_Database.mdb;" & _

"Mode = Read|Write"

69

Page 70: Tuition Registration System with vb6 codings

Call refreshList

rstRecordSet.MoveFirst

Call changeData(rstRecordSet)

End Sub

Public Function changeData(rst As ADODB.Recordset)

Combo1.Text = rst.Fields("maths")

Combo2.Text = rst.Fields("addm")

Combo3.Text = rst.Fields("phy")

Combo4.Text = rst.Fields("bio")

Combo5.Text = rst.Fields("chem")

End Function

Public Function refreshALL()

rstRecordSet.Close

Call refreshList

rstRecordSet.MoveLast

Call changeData(rstRecordSet)

End Function

Public Function refreshList()

rstRecordSet.Open "SELECT * FROM tblPay;", conConnection, adOpenDynamic,

adLockOptimistic

While Not rstRecordSet.EOF

rstRecordSet.MoveNext70

Page 71: Tuition Registration System with vb6 codings

Wend

End Function

Schedule via Admin

Dim conConnection As New ADODB.Connection

Dim rstRecordSet As New ADODB.Recordset

Dim rstRecordSet2 As New ADODB.Recordset

Private Sub Combo1_Change()

Combo1.AddItem "math"

Combo1.AddItem "physics"

Combo1.AddItem "add math"

Combo1.AddItem "chem"

Combo1.AddItem "bio"

End Sub

Private Sub Combo10_Change()

Combo10.AddItem "math"

Combo10.AddItem "physics"

Combo10.AddItem "add math"

Combo10.AddItem "chem"

Combo10.AddItem "bio"

End Sub

Private Sub Combo2_Change()

Combo2.AddItem "math"

Combo2.AddItem "physics"

Combo2.AddItem "add math"

Combo2.AddItem "chem"

71

Page 72: Tuition Registration System with vb6 codings

Combo2.AddItem "bio"

End Sub

Private Sub Combo3_Change()

Combo3.AddItem "math"

Combo3.AddItem "physics"

Combo3.AddItem "add math"

Combo3.AddItem "chem"

Combo3.AddItem "bio"

End Sub

Private Sub Combo4_Change()

Combo4.AddItem "math"

Combo4.AddItem "physics"

Combo4.AddItem "add math"

Combo4.AddItem "chem"

Combo4.AddItem "bio"

End Sub

Private Sub Combo5_Change()

Combo5.AddItem "math"

Combo5.AddItem "physics"

Combo5.AddItem "add math"

Combo5.AddItem "chem"

Combo5.AddItem "bio"

End Sub

72

Page 73: Tuition Registration System with vb6 codings

Private Sub Combo6_Change()

Combo6.AddItem "math"

Combo6.AddItem "physics"

Combo6.AddItem "add math"

Combo6.AddItem "chem"

Combo6.AddItem "bio"

End Sub

Private Sub Combo7_Change()

Combo7.AddItem "math"

Combo7.AddItem "physics"

Combo7.AddItem "add math"

Combo7.AddItem "chem"

Combo7.AddItem "bio"

End Sub

Private Sub Combo8_Change()

Combo8.AddItem "math"

Combo8.AddItem "physics"

Combo8.AddItem "add math"

Combo8.AddItem "chem"

Combo8.AddItem "bio"

End Sub

Private Sub Combo9_Change()

Combo9.AddItem "math"

Combo9.AddItem "physics"

73

Page 74: Tuition Registration System with vb6 codings

Combo9.AddItem "add math"

Combo9.AddItem "chem"

Combo9.AddItem "bio"

End Sub

Private Sub Command1_Click()

Unload Me

Form4.Show

conConnection.Close

End Sub

Private Sub Command2_Click()

rstRecordSet2.Open "UPDATE tblSchedule1 SET 100PMto230PM = '" & Combo1.Text &

"'", conConnection

rstRecordSet2.Open "UPDATE tblSchedule1 SET 230PMto400PM = '" & Combo2.Text &

"'", conConnection

rstRecordSet2.Open "UPDATE tblSchedule1 SET 500PMto630PM = '" & Combo3.Text &

"'", conConnection

rstRecordSet2.Open "UPDATE tblSchedule1 SET 630PMto800PM = '" & Combo4.Text &

"'", conConnection

rstRecordSet2.Open "UPDATE tblSchedule1 SET 830PMto1000PM = '" & Combo5.Text

& "'", conConnection

rstRecordSet2.Open "UPDATE tblSchedule1 SET s100PMto230PM = '" & Combo6.Text

& "'", conConnection

rstRecordSet2.Open "UPDATE tblSchedule1 SET s230PMto400PM = '" & Combo7.Text

& "'", conConnection

rstRecordSet2.Open "UPDATE tblSchedule1 SET s500PMto630PM = '" & Combo8.Text

& "'", conConnection

74

Page 75: Tuition Registration System with vb6 codings

rstRecordSet2.Open "UPDATE tblSchedule1 SET s630PMto800PM = '" & Combo9.Text

& "'", conConnection

rstRecordSet2.Open "UPDATE tblSchedule1 SET s830PMto1000PM = '" &

Combo10.Text & "'", conConnection

Call refreshALL

MsgBox ("Record Modified!"), vbInformation, "Infromation Changed..!!!"

End Sub

Private Sub Form_Load()

With Form1

Top = (Screen.Height - .Height) / 2

Left = (Screen.Width - .Width) / 3

End With

conConnection.Open "Provider = Microsoft.Jet.OLEDB.4.0;" & _

"Data Source = " & App.Path & "\Student_Database.mdb;" & _

"Mode = Read|Write"

Call refreshList

rstRecordSet.MoveFirst

Call changeData(rstRecordSet)

End Sub

Public Function changeData(rst As ADODB.Recordset)

Combo1.Text = rst.Fields("100PMto230PM")

Combo2.Text = rst.Fields("230PMto400PM")

Combo3.Text = rst.Fields("500PMto630PM")

Combo4.Text = rst.Fields("630PMto800PM")

Combo5.Text = rst.Fields("830PMto1000PM")75

Page 76: Tuition Registration System with vb6 codings

Combo6.Text = rst.Fields("s100PMto230PM")

Combo7.Text = rst.Fields("s230PMto400PM")

Combo8.Text = rst.Fields("s500PMto630PM")

Combo9.Text = rst.Fields("s630PMto800PM")

Combo10.Text = rst.Fields("s830PMto1000PM")

End Function

Private Sub Combo2_KeyPress(KeyAscii As Integer)

KeyAscii = 0

End Sub

Private Sub Combo3_KeyPress(KeyAscii As Integer)

KeyAscii = 0

End Sub

Private Sub Combo4_KeyPress(KeyAscii As Integer)

KeyAscii = 0

End Sub

Private Sub Combo5_KeyPress(KeyAscii As Integer)

76

Page 77: Tuition Registration System with vb6 codings

KeyAscii = 0

End Sub

Private Sub Combo6_KeyPress(KeyAscii As Integer)

KeyAscii = 0

End Sub

Private Sub Combo7_KeyPress(KeyAscii As Integer)

KeyAscii = 0

End Sub

Private Sub Combo8_KeyPress(KeyAscii As Integer)

KeyAscii = 0

End Sub

Private Sub Combo9_KeyPress(KeyAscii As Integer)

KeyAscii = 0

End Sub

77

Page 78: Tuition Registration System with vb6 codings

Private Sub Combo10_KeyPress(KeyAscii As Integer)

KeyAscii = 0

End Sub

Private Sub Combo1_KeyPress(KeyAscii As Integer)

KeyAscii = 0

End Sub

Public Function refreshALL()

rstRecordSet.Close

Call refreshList

rstRecordSet.MoveLast

Call changeData(rstRecordSet)

End Function

Public Function refreshList()

rstRecordSet.Open "SELECT * FROM tblSchedule1;", conConnection, adOpenDynamic,

adLockOptimistic

While Not rstRecordSet.EOF

rstRecordSet.MoveNext

Wend

End Function78

Page 79: Tuition Registration System with vb6 codings

Teacher registration via Admin

Dim conConnection As New ADODB.Connection

Dim rstRecordSet As New ADODB.Recordset

Dim rstRecordSet2 As New ADODB.Recordset

Private Sub cmdCancel_Click()

Call reset

End Sub

Private Sub cmdOK_Click()

i = 0

i = i + 1

If txtName.Text = "" Then

MsgBox ("Text field cannot be empty!!")

Else

If txtAge.Text = "" Then

MsgBox ("Text field cannot be empty!!")

Else

If TxtPNumber.Text = "" Then

MsgBox ("Text field cannot be empty!!")

Else

If TxtAddress.Text = "" Then

MsgBox ("Text field cannot be empty!!")

Else

If Combo1.Text = "" Then

MsgBox ("Text field cannot be empty!!")

Else

79

Page 80: Tuition Registration System with vb6 codings

'rstRecordSet2.Open "INSERT INTO tblTeachers VALUES ('" & txtID.Text & "', '" &

txtName.Text & "'," & Int(txtAge.Text) & ", '" & Combo1.Text & "', " & TxtPNumber.Text

& ", '" & TxtAddress.Text & "')", conConnection

rstRecordSet2.Open "INSERT INTO tblTeachers (Name, Age, Gender, Phone_Number,

Address) VALUES ( '" & txtName.Text & "'," & Int(txtAge.Text) & ", '" & Combo1.Text &

"', " & TxtPNumber.Text & ", '" & TxtAddress.Text & "')", conConnection

Call refreshALL

MsgBox ("Record Added"), vbInformation, "Succesfully...!!"

lAnswer = MsgBox("Add another one?", vbYesNo)

If lAnswer = vbYes Then

Call cmdAdd_Click

Else

Call reset

End If

End If

End If

End If

End If

End If

End Sub

Private Sub cmdSearch_Click()

s = InputBox("Student ID?")

rstRecordSet2.Open "SELECT * FROM tblTeachers WHERE ID = " & s & "",

conConnection

If rstRecordSet2.EOF = False Then

Call changeData(rstRecordSet2)

MsgBox "Record Found!", vbInformation, "Well Done!!"

Else

MsgBox ("Record Not Found!"), vbExclamation, "Sorry :-("

End If

80

Page 81: Tuition Registration System with vb6 codings

rstRecordSet2.Close

End Sub

Private Sub cmdAdd_Click()

cmdOk.Enabled = True

cmdCancel.Enabled = True

cmdAdd.Enabled = False

cmdDelete.Enabled = False

cmdModify.Enabled = False

cmdFirst.Enabled = False

cmdLast.Enabled = False

cmdNext.Enabled = False

cmdPrevious.Enabled = False

txtName.Text = vbNullString

txtAge.Text = vbNullString

Combo1.Text = vbNullString

TxtPNumber.Text = vbNullString

TxtAddress.Text = vbNullString

txtName.SetFocus

txtID.Enabled = False

txtID.Text = ""

End Sub

Private Sub cmdDelete_Click()

rstRecordSet2.Open "DELETE FROM tblTeachers WHERE ID = " & txtID.Text & "",

conConnection

Call refreshALL

MsgBox ("Record Deleted!"), vbInformation, "Dustbined Succesfully..!!!"

End Sub

81

Page 82: Tuition Registration System with vb6 codings

Private Sub cmdModify_Click()

rstRecordSet2.Open "UPDATE tblTeachers SET Name = '" & txtName.Text & "' WHERE

ID = " & txtID.Text & "", conConnection

rstRecordSet2.Open "UPDATE tblTeachers SET Age = '" & txtAge.Text & "' WHERE ID

= " & txtID.Text & "", conConnection

rstRecordSet2.Open "UPDATE tblTeachers SET Gender = '" & Combo1.Text & "'

WHERE ID = " & txtID.Text & "", conConnection

rstRecordSet2.Open "UPDATE tblTeachers SET Phone_Number = '" & TxtPNumber.Text

& "' WHERE ID = " & txtID.Text & "", conConnection

rstRecordSet2.Open "UPDATE tblTeachers SET Address = '" & TxtAddress.Text & "'

WHERE ID = " & txtID.Text & "", conConnection

Call refreshALL

MsgBox ("Record Modified!"), vbInformation, "Infromation Changed..!!!"

End Sub

Private Sub cmdFirst_Click()

rstRecordSet.MoveFirst

Call changeData(rstRecordSet)

End Sub

Private Sub cmdLast_Click()

rstRecordSet.MoveLast

Call changeData(rstRecordSet)

End Sub

Private Sub cmdNext_Click()

rstRecordSet.MoveNext

If Not rstRecordSet.EOF = True Then

Call changeData(rstRecordSet)

Else

82

Page 83: Tuition Registration System with vb6 codings

rstRecordSet.MovePrevious

MsgBox ("Last Record"), vbInformation, "No More..Sorry..!!"

End If

End Sub

Private Sub cmdPrevious_Click()

rstRecordSet.MovePrevious

If Not rstRecordSet.BOF = True Then

Call changeData(rstRecordSet)

Else

rstRecordSet.MoveNext

MsgBox ("First Record"), vbInformation, "No More..Sorry..!!"

End If

End Sub

Private Sub Combo1_KeyPress(KeyAscii As Integer)

KeyAscii = 0

End Sub

Private Sub Command1_Click()

rstRecordSet.Close

conConnection.Close

Unload Me

Form4.Show

End Sub

Private Sub Form_Load()

83

Page 84: Tuition Registration System with vb6 codings

With Form1

Top = (Screen.Height - .Height) / 3

Left = (Screen.Width - .Width) / 2

End With

conConnection.Open "Provider = Microsoft.Jet.OLEDB.4.0;" & _

"Data Source = " & App.Path & "\Student_Database.mdb;" & _

"Mode = Read|Write"

Call refreshList

rstRecordSet.MoveFirst

Call changeData(rstRecordSet)

txtID.Enabled = False

Combo1.AddItem "Male"

Combo1.AddItem "Female"

End Sub

Public Function changeData(rst As ADODB.Recordset)

txtID.Text = rst.Fields("ID")

txtName.Text = rst.Fields("Name")

txtAge.Text = rst.Fields("Age")

Combo1.Text = rst.Fields("Gender")

TxtPNumber.Text = rst.Fields("Phone_Number")

TxtAddress.Text = rst.Fields("Address")

End Function

Public Function refreshList()

84

Page 85: Tuition Registration System with vb6 codings

rstRecordSet.Open "SELECT * FROM tblTeachers;", conConnection, adOpenDynamic,

adLockOptimistic

While Not rstRecordSet.EOF

rstRecordSet.MoveNext

Wend

End Function

Public Function refreshALL()

rstRecordSet.Close

Call refreshList

rstRecordSet.MoveLast

Call changeData(rstRecordSet)

End Function

Private Sub reset()

cmdOk.Enabled = False

cmdCancel.Enabled = False

cmdAdd.Enabled = True

cmdDelete.Enabled = True

cmdModify.Enabled = True

cmdFirst.Enabled = True

cmdLast.Enabled = True

cmdNext.Enabled = True

cmdPrevious.Enabled = True

Call refreshALL

End Sub

Private Sub txtAge_KeyPress(KeyAscii As Integer)

85

Page 86: Tuition Registration System with vb6 codings

If Not (KeyAscii = vbKeyBack Or KeyAscii = vbKeyDelete Or KeyAscii = vbKeySpace Or

(KeyAscii >= Asc("0") And KeyAscii <= Asc("9") And Len(txtAge) < 2)) Then

KeyAscii = 0

End If

End Sub

Private Sub txtName_KeyPress(KeyAscii As Integer)

If Not (KeyAscii = vbKeyBack Or KeyAscii = vbKeyDelete Or KeyAscii = vbKeySpace Or

(KeyAscii >= Asc("a") And KeyAscii <= Asc("z")) Or (KeyAscii >= Asc("A") And

KeyAscii <= Asc("z"))) Then

KeyAscii = 0

End If

End Sub

Private Sub TxtPNumber_KeyPress(KeyAscii As Integer)

If Not (KeyAscii = vbKeyBack Or KeyAscii = vbKeyDelete Or KeyAscii = vbKeySpace Or

(KeyAscii >= Asc("0") And KeyAscii <= Asc("9") And Len(TxtPNumber) < 10)) Then

KeyAscii = 0

End If

End Sub

Private Sub Command2_Click()

DataReport2.Show

End Sub

Teacher’s login system

Private Sub Command1_Click()

86

Page 87: Tuition Registration System with vb6 codings

Call login

End Sub

Function login()

If (Text1.Text = "teacher" And Text2.Text = "teacher") Then

MsgBox "Access Granted, " & "Teachers" & "!", vbInformation, "Welcome!"

Unload Me

Form9.Show

Else

MsgBox "Incorrect Username or Password", vbExclamation, "Error!"

Text1.Text = ""

Text2.Text = ""

Text1.SetFocus

End If

End Function

Private Sub Command2_Click()

Text1.Text = ""

Text2.Text = ""

End Sub

Private Sub Command3_Click()

Unload Me

Form1.Show

87

Page 88: Tuition Registration System with vb6 codings

End Sub

Private Sub Form_Load()

With Form1

Top = (Screen.Height - .Height) / 2

Left = (Screen.Width - .Width) / 2

End With

End Sub

Private Sub Text2_KeyUp(KeyCode As Integer, Shift As Integer)

If KeyCode = 13 Then

Call login

End If

End Sub

Teacher schedule checking session

Dim conConnection As New ADODB.Connection

Dim rstRecordSet As New ADODB.Recordset

Dim rstRecordSet2 As New ADODB.Recordset

Private Sub Command1_Click()

Unload Me

Form8.Show

conConnection.Close

End Sub

Private Sub Form_Load()

88

Page 89: Tuition Registration System with vb6 codings

With Form1

Top = (Screen.Height - .Height) / 2

Left = (Screen.Width - .Width) / 3

End With

conConnection.Open "Provider = Microsoft.Jet.OLEDB.4.0;" & _

"Data Source = " & App.Path & "\Student_Database.mdb;" & _

"Mode = Read|Write"

Call refreshList

rstRecordSet.MoveFirst

Call changeData(rstRecordSet)

End Sub

Public Function refreshList()

rstRecordSet.Open "SELECT * FROM tblSchedule1;", conConnection, adOpenDynamic,

adLockOptimistic

While Not rstRecordSet.EOF

rstRecordSet.MoveNext

Wend

End Function

Public Function changeData(rst As ADODB.Recordset)

Text1.Text = rst.Fields("100PMto230PM")

Text2.Text = rst.Fields("230PMto400PM")89

Page 90: Tuition Registration System with vb6 codings

Text3.Text = rst.Fields("500PMto630PM")

Text4.Text = rst.Fields("630PMto800PM")

Text5.Text = rst.Fields("830PMto1000PM")

Text6.Text = rst.Fields("s100PMto230PM")

Text7.Text = rst.Fields("s230PMto400PM")

Text8.Text = rst.Fields("s500PMto630PM")

Text9.Text = rst.Fields("s630PMto800PM")

Text10.Text = rst.Fields("s830PMto1000PM")

End Function

Staff login system

Private Sub Command1_Click()

Call login

Text1.Text = ""

Text2.Text = ""

End Sub

Function login()

If (Text1.Text = "staff" And Text2.Text = "staff") Then

MsgBox "Access Granted, " & "Staff" & "!", vbInformation, "Welcome!"

Unload Me

Form11.Show

Else

MsgBox "Incorrect Username or Password", vbExclamation, "Error!"

Text1.Text = ""

Text2.Text = ""

Text1.SetFocus

End If

90

Page 91: Tuition Registration System with vb6 codings

End Function

Private Sub Command2_Click()

Text1.Text = ""

Text2.Text = ""

End Sub

Private Sub Command3_Click()

Unload Me

Form1.Show

End Sub

Private Sub Form_Load()

With Form1

Top = (Screen.Height - .Height) / 2

Left = (Screen.Width - .Width) / 2

End With

End Sub

Private Sub Text2_KeyUp(KeyCode As Integer, Shift As Integer)

If KeyCode = 13 Then

Call login

Text1.Text = ""

Text2.Text = ""

91

Page 92: Tuition Registration System with vb6 codings

End If

End Sub

Staff menu screen

Private Sub Command1_Click()

Unload Me

Form12.Show

End Sub

Private Sub Command2_Click()

DataReport1.Show

End Sub

Private Sub Command3_Click()

Unload Me

Form13.Show

End Sub

Private Sub Command4_Click()

DataReport2.Show

End Sub

Private Sub Command5_Click()

Unload Me

Form10.Show

92

Page 93: Tuition Registration System with vb6 codings

End Sub

Private Sub Form_Load()

With Form1

Top = (Screen.Height - .Height) / 2

Left = (Screen.Width - .Width) / 2

End With

End Sub

Student registration via staff

Dim conConnection As New ADODB.Connection

Dim rstRecordSet As New ADODB.Recordset

Dim rstRecordSet2 As New ADODB.Recordset

Private Sub cmdCancel_Click()

Call reset

End Sub

Private Sub cmdOK_Click()

i = 0

i = i + 1

If txtName.Text = "" Then

MsgBox ("Text field cannot be empty!!")

Else

If txtAge.Text = "" Then

MsgBox ("Text field cannot be empty!!")

Else

If TxtPNumber.Text = "" Then

MsgBox ("Text field cannot be empty!!")

93

Page 94: Tuition Registration System with vb6 codings

Else

If TxtAddress.Text = "" Then

MsgBox ("Text field cannot be empty!!")

Else

If Combo1.Text = "" Then

MsgBox ("Text field cannot be empty!!")

Else

'rstRecordSet2.Open "INSERT INTO tblStudent VALUES ('" & txtID.Text & "', '" &

txtName.Text & "'," & Int(txtAge.Text) & ", '" & Combo1.Text & "', " & TxtPNumber.Text

& ", '" & TxtAddress.Text & "')", conConnection

rstRecordSet2.Open "INSERT INTO tblStudent (Name, Age, Gender, Phone_Number,

Address) VALUES ( '" & txtName.Text & "'," & Int(txtAge.Text) & ", '" & Combo1.Text &

"', " & TxtPNumber.Text & ", '" & TxtAddress.Text & "')", conConnection

Call refreshALL

MsgBox ("Record Added"), vbInformation, "Succesfully...!!"

lAnswer = MsgBox("Add another one?", vbYesNo)

If lAnswer = vbYes Then

Call cmdAdd_Click

Else

Call reset

End If

End If

End If

End If

End If

End If

End Sub

94

Page 95: Tuition Registration System with vb6 codings

Private Sub cmdSearch_Click()

s = InputBox("Student ID?")

rstRecordSet2.Open "SELECT * FROM tblStudent WHERE ID = " & s & "",

conConnection

If rstRecordSet2.EOF = False Then

Call changeData(rstRecordSet2)

MsgBox "Record Found!", vbInformation, "Well Done!!"

Else

MsgBox ("Record Not Found!"), vbExclamation, "Sorry :-("

End If

rstRecordSet2.Close

End Sub

Private Sub cmdAdd_Click()

cmdOK.Enabled = True

cmdCancel.Enabled = True

cmdAdd.Enabled = False

cmdDelete.Enabled = False

cmdModify.Enabled = False

cmdFirst.Enabled = False

cmdLast.Enabled = False

cmdNext.Enabled = False

cmdPrevious.Enabled = False

txtName.Text = vbNullString

txtAge.Text = vbNullString

Combo1.Text = vbNullString

TxtPNumber.Text = vbNullString

TxtAddress.Text = vbNullString

txtName.SetFocus

txtID.Enabled = False

95

Page 96: Tuition Registration System with vb6 codings

txtID.Text = ""

End Sub

Private Sub cmdDelete_Click()

rstRecordSet2.Open "DELETE FROM tblStudent WHERE ID = " & txtID.Text & "",

conConnection

Call refreshALL

MsgBox ("Record Deleted!"), vbInformation, "Dustbined Succesfully..!!!"

End Sub

Private Sub cmdModify_Click()

rstRecordSet2.Open "UPDATE tblStudent SET Name = '" & txtName.Text & "' WHERE

ID = " & txtID.Text & "", conConnection

rstRecordSet2.Open "UPDATE tblStudent SET Age = '" & txtAge.Text & "' WHERE ID =

" & txtID.Text & "", conConnection

rstRecordSet2.Open "UPDATE tblStudent SET Gender = '" & Combo1.Text & "' WHERE

ID = " & txtID.Text & "", conConnection

rstRecordSet2.Open "UPDATE tblStudent SET Phone_Number = '" & TxtPNumber.Text

& "' WHERE ID = " & txtID.Text & "", conConnection

rstRecordSet2.Open "UPDATE tblStudent SET Address = '" & TxtAddress.Text & "'

WHERE ID = " & txtID.Text & "", conConnection

Call refreshALL

MsgBox ("Record Modified!"), vbInformation, "Infromation Changed..!!!"

End Sub

Private Sub cmdFirst_Click()

rstRecordSet.MoveFirst

Call changeData(rstRecordSet)

End Sub

Private Sub cmdLast_Click()

96

Page 97: Tuition Registration System with vb6 codings

rstRecordSet.MoveLast

Call changeData(rstRecordSet)

End Sub

Private Sub cmdNext_Click()

rstRecordSet.MoveNext

If Not rstRecordSet.EOF = True Then

Call changeData(rstRecordSet)

Else

rstRecordSet.MovePrevious

MsgBox ("Last Record"), vbInformation, "No More..Sorry..!!"

End If

End Sub

Private Sub cmdPrevious_Click()

rstRecordSet.MovePrevious

If Not rstRecordSet.BOF = True Then

Call changeData(rstRecordSet)

Else

rstRecordSet.MoveNext

MsgBox ("First Record"), vbInformation, "No More..Sorry..!!"

End If

End Sub

Private Sub Combo1_KeyPress(KeyAscii As Integer)

KeyAscii = 0

End Sub

97

Page 98: Tuition Registration System with vb6 codings

Private Sub Command1_Click()

rstRecordSet.Close

conConnection.Close

Unload Me

Form11.Show

End Sub

Private Sub Command5_Click()

DataReport1.Show

End Sub

Private Sub Form_Load()

With Form1

Top = (Screen.Height - .Height) / 3

Left = (Screen.Width - .Width) / 2

End With

conConnection.Open "Provider = Microsoft.Jet.OLEDB.4.0;" & _

"Data Source = " & App.Path & "\Student_Database.mdb;" & _

"Mode = Read|Write"

Call refreshList

rstRecordSet.MoveFirst

Call changeData(rstRecordSet)

txtID.Enabled = False

Combo1.AddItem "Male"

Combo1.AddItem "Female"

End Sub

98

Page 99: Tuition Registration System with vb6 codings

Public Function changeData(rst As ADODB.Recordset)

txtID.Text = rst.Fields("ID")

txtName.Text = rst.Fields("Name")

txtAge.Text = rst.Fields("Age")

Combo1.Text = rst.Fields("Gender")

TxtPNumber.Text = rst.Fields("Phone_Number")

TxtAddress.Text = rst.Fields("Address")

End Function

Public Function refreshList()

rstRecordSet.Open "SELECT * FROM tblStudent;", conConnection, adOpenDynamic,

adLockOptimistic

While Not rstRecordSet.EOF

rstRecordSet.MoveNext

Wend

End Function

Public Function refreshALL()

rstRecordSet.Close

Call refreshList

rstRecordSet.MoveLast

Call changeData(rstRecordSet)

End Function

Private Sub reset()99

Page 100: Tuition Registration System with vb6 codings

cmdOK.Enabled = False

cmdCancel.Enabled = False

cmdAdd.Enabled = True

cmdDelete.Enabled = True

cmdModify.Enabled = True

cmdFirst.Enabled = True

cmdLast.Enabled = True

cmdNext.Enabled = True

cmdPrevious.Enabled = True

Call refreshALL

End Sub

Private Sub txtAge_KeyPress(KeyAscii As Integer)

If Not (KeyAscii = vbKeyBack Or KeyAscii = vbKeyDelete Or KeyAscii = vbKeySpace Or

(KeyAscii >= Asc("0") And KeyAscii <= Asc("9") And Len(txtAge) < 2)) Then

KeyAscii = 0

End If

End Sub

Private Sub txtName_KeyPress(KeyAscii As Integer)

If Not (KeyAscii = vbKeyBack Or KeyAscii = vbKeyDelete Or KeyAscii = vbKeySpace Or

(KeyAscii >= Asc("a") And KeyAscii <= Asc("z")) Or (KeyAscii >= Asc("A") And

KeyAscii <= Asc("Z"))) Then

KeyAscii = 0

End If

End Sub

Private Sub TxtPNumber_KeyPress(KeyAscii As Integer)

100

Page 101: Tuition Registration System with vb6 codings

If Not (KeyAscii = vbKeyBack Or KeyAscii = vbKeyDelete Or KeyAscii = vbKeySpace Or

(KeyAscii >= Asc("0") And KeyAscii <= Asc("9") And Len(TxtPNumber) < 10)) Then

KeyAscii = 0

End If

End Sub

Student’s report

Data environment

Student’s report

101

Page 102: Tuition Registration System with vb6 codings

Teacher registration via Staff

Dim conConnection As New ADODB.Connection

Dim rstRecordSet As New ADODB.Recordset

Dim rstRecordSet2 As New ADODB.Recordset

Private Sub cmdCancel_Click()

Call reset

End Sub

Private Sub cmdOK_Click()

i = 0

i = i + 1102

Page 103: Tuition Registration System with vb6 codings

If txtName.Text = "" Then

MsgBox ("Text field cannot be empty!!")

Else

If txtAge.Text = "" Then

MsgBox ("Text field cannot be empty!!")

Else

If TxtPNumber.Text = "" Then

MsgBox ("Text field cannot be empty!!")

Else

If TxtAddress.Text = "" Then

MsgBox ("Text field cannot be empty!!")

Else

If Combo1.Text = "" Then

MsgBox ("Text field cannot be empty!!")

Else

'rstRecordSet2.Open "INSERT INTO tblTeachers VALUES ('" & txtID.Text & "', '" & txtName.Text & "'," & Int(txtAge.Text) & ", '" & Combo1.Text & "', " & TxtPNumber.Text & ", '" & TxtAddress.Text & "')", conConnection

rstRecordSet2.Open "INSERT INTO tblTeachers (Name, Age, Gender, Phone_Number, Address) VALUES ( '" & txtName.Text & "'," & Int(txtAge.Text) & ", '" & Combo1.Text & "', " & TxtPNumber.Text & ", '" & TxtAddress.Text & "')", conConnection

103

Page 104: Tuition Registration System with vb6 codings

Call refreshALL

MsgBox ("Record Added"), vbInformation, "Succesfully...!!"

lAnswer = MsgBox("Add another one?", vbYesNo)

If lAnswer = vbYes Then

Call cmdAdd_Click

Else

Call reset

End If

End If

End If

End If

End If

End If

End Sub

Private Sub cmdSearch_Click()

s = InputBox("Student ID?")

rstRecordSet2.Open "SELECT * FROM tblTeachers WHERE ID = " & s & "", conConnection

If rstRecordSet2.EOF = False Then

Call changeData(rstRecordSet2)

MsgBox "Record Found!", vbInformation, "Well Done!!"

Else

MsgBox ("Record Not Found!"), vbExclamation, "Sorry :-("

End If

rstRecordSet2.Close

104

Page 105: Tuition Registration System with vb6 codings

End Sub

Private Sub cmdAdd_Click()

cmdOK.Enabled = True

cmdCancel.Enabled = True

cmdAdd.Enabled = False

cmdDelete.Enabled = False

cmdModify.Enabled = False

cmdFirst.Enabled = False

cmdLast.Enabled = False

cmdNext.Enabled = False

cmdPrevious.Enabled = False

txtName.Text = vbNullString

txtAge.Text = vbNullString

Combo1.Text = vbNullString

TxtPNumber.Text = vbNullString

TxtAddress.Text = vbNullString

txtName.SetFocus

txtID.Enabled = False

txtID.Text = ""

End Sub

Private Sub cmdDelete_Click()105

Page 106: Tuition Registration System with vb6 codings

rstRecordSet2.Open "DELETE FROM tblTeachers WHERE ID = " & txtID.Text & "", conConnection

Call refreshALL

MsgBox ("Record Deleted!"), vbInformation, "Dustbined Succesfully..!!!"

End Sub

Private Sub cmdModify_Click()

rstRecordSet2.Open "UPDATE tblTeachers SET Name = '" & txtName.Text & "' WHERE ID = " & txtID.Text & "", conConnection

rstRecordSet2.Open "UPDATE tblTeachers SET Age = '" & txtAge.Text & "' WHERE ID = " & txtID.Text & "", conConnection

rstRecordSet2.Open "UPDATE tblTeachers SET Gender = '" & Combo1.Text & "' WHERE ID = " & txtID.Text & "", conConnection

rstRecordSet2.Open "UPDATE tblTeachers SET Phone_Number = '" & TxtPNumber.Text & "' WHERE ID = " & txtID.Text & "", conConnection

rstRecordSet2.Open "UPDATE tblTeachers SET Address = '" & TxtAddress.Text & "' WHERE ID = " & txtID.Text & "", conConnection

Call refreshALL

MsgBox ("Record Modified!"), vbInformation, "Infromation Changed..!!!"

End Sub

Private Sub cmdFirst_Click()

rstRecordSet.MoveFirst

Call changeData(rstRecordSet)

End Sub

Private Sub cmdLast_Click()

rstRecordSet.MoveLast

106

Page 107: Tuition Registration System with vb6 codings

Call changeData(rstRecordSet)

End Sub

Private Sub cmdNext_Click()

rstRecordSet.MoveNext

If Not rstRecordSet.EOF = True Then

Call changeData(rstRecordSet)

Else

rstRecordSet.MovePrevious

MsgBox ("Last Record"), vbInformation, "No More..Sorry..!!"

End If

End Sub

Private Sub cmdPrevious_Click()

rstRecordSet.MovePrevious

If Not rstRecordSet.BOF = True Then

Call changeData(rstRecordSet)

Else

rstRecordSet.MoveNext

MsgBox ("First Record"), vbInformation, "No More..Sorry..!!"

End If

End Sub

Private Sub Combo1_KeyPress(KeyAscii As Integer)107

Page 108: Tuition Registration System with vb6 codings

KeyAscii = 0

End Sub

Private Sub Command1_Click()

rstRecordSet.Close

conConnection.Close

Unload Me

Form11.Show

End Sub

Private Sub Form_Load()

With Form1

Top = (Screen.Height - .Height) / 3

Left = (Screen.Width - .Width) / 2

End With

conConnection.Open "Provider = Microsoft.Jet.OLEDB.4.0;" & _

"Data Source = " & App.Path & "\Student_Database.mdb;" & _

"Mode = Read|Write"

Call refreshList

rstRecordSet.MoveFirst

Call changeData(rstRecordSet)108

Page 109: Tuition Registration System with vb6 codings

txtID.Enabled = False

Combo1.AddItem "Male"

Combo1.AddItem "Female"

End Sub

Public Function changeData(rst As ADODB.Recordset)

txtID.Text = rst.Fields("ID")

txtName.Text = rst.Fields("Name")

txtAge.Text = rst.Fields("Age")

Combo1.Text = rst.Fields("Gender")

TxtPNumber.Text = rst.Fields("Phone_Number")

TxtAddress.Text = rst.Fields("Address")

End Function

Public Function refreshList()

rstRecordSet.Open "SELECT * FROM tblTeachers;", conConnection, adOpenDynamic, adLockOptimistic

While Not rstRecordSet.EOF

rstRecordSet.MoveNext

Wend

109

Page 110: Tuition Registration System with vb6 codings

End Function

Public Function refreshALL()

rstRecordSet.Close

Call refreshList

rstRecordSet.MoveLast

Call changeData(rstRecordSet)

End Function

Private Sub reset()

cmdOK.Enabled = False

cmdCancel.Enabled = False

cmdAdd.Enabled = True

cmdDelete.Enabled = True

cmdModify.Enabled = True

cmdFirst.Enabled = True

cmdLast.Enabled = True

cmdNext.Enabled = True

cmdPrevious.Enabled = True

Call refreshALL

End Sub

Private Sub txtAge_KeyPress(KeyAscii As Integer)

110

Page 111: Tuition Registration System with vb6 codings

If Not (KeyAscii = vbKeyBack Or KeyAscii = vbKeyDelete Or KeyAscii = vbKeySpace Or (KeyAscii >= Asc("0") And KeyAscii <= Asc("9") And Len(txtAge) < 2)) Then

KeyAscii = 0

End If

End Sub

Private Sub txtName_KeyPress(KeyAscii As Integer)

If Not (KeyAscii = vbKeyBack Or KeyAscii = vbKeyDelete Or KeyAscii = vbKeySpace Or (KeyAscii >= Asc("a") And KeyAscii <= Asc("z")) Or (KeyAscii >= Asc("A") And KeyAscii <= Asc("z"))) Then

KeyAscii = 0

End If

End Sub

Private Sub TxtPNumber_KeyPress(KeyAscii As Integer)

If Not (KeyAscii = vbKeyBack Or KeyAscii = vbKeyDelete Or KeyAscii = vbKeySpace Or (KeyAscii >= Asc("0") And KeyAscii <= Asc("9") And Len(TxtPNumber) < 10)) Then

KeyAscii = 0

End If

End Sub

Private Sub Command2_Click()

DataReport2.Show

111

Page 112: Tuition Registration System with vb6 codings

End Sub

Teacher’s report

Data environment

Teacher’s report

112