Sunteți pe pagina 1din 151

CHAPTER NAME

CHAPTER 1: Introduction / Objectives


1.1 Introduction
1.2 Objective of system
1.3 Limitations
1.4 Need for the proposed system
1.5 Advantages of the Project

CHAPTER 2: System Analysis


2.1 Hardware requirements
2.2 Software requirements
2.3 Front-End used Visual Basic
2.4 Back-End used MS Access
2.4.1 About Ms Access
2.4.2 Components of Access
2.5 Feasibility study
2.5.1 Technical Feasibility
2.5.2 Operational Feasibility
2.5.3 Economic Feasibility
2.6 Software life cycle model used
2.7 Reasons for choosing Waterfall model?

CHAPTER 3: System Design


3.1 System Design
3.2 Design Objectives
3.3 Flow Chart
3.4 Data Flow Diagram
3.5 ER Diagram

CHAPTER 4: Implementation and Coding


4.1 Validation Checks
4.2 Implementation
4.3 Coding
4.3.1 Code Efficiency
4.3.1 Optimization of code

CHAPTER 5: System Testing


5.1 Software Testing
5.1.1 Testing Principles
5.2 Levels of Testing
5.2.1 Functional testing
5.2.2 Structural testing
5.2.3 Unit testing
5.2.4 System testing
5.2.5 Integration testing

CHAPTER 6: Reports

Conclusion
Future Scope of the Project
References & Bibliography
Chapter 1

INTRODUCTION
1.1 INTRODUCTION

This project with the title “COACHING CENTER MANAGEMENT” has


been designed with a view to computerize the various operations that are
expected to be performed in an educational center. The main objective of the
project is to make massive operations handled fast & efficiently. The stress
has been given both to the quality & quantity. Besides, it is capable of
overcoming the various limitations associated with the cost, timeliness,
incorrectness, ambiguities, in competency, etc. which otherwise is a
common part of a general purpose software.
The software deals with the following areas:
• Admission – in this, the admission of the students is dealt with, by
allowing him/her the flexibility to choose amongst the wide variety
of the subjects & modules.
• Recruitment – in this, the recruitment of the various staff
members is manipulated, by which a list of them can be generated
at will.
• Batches – in this, the batches timings are handled according to
subjects.
• Fees – it performs fee management of the entire center, including
the generation of the defaulters’ list at will.
• Salary - it performs salary management for teachers.

Besides al these activities, a number of reporting & querying procedures


have been put, so that instant hard copy of details pertaining to any
particular department can be taken out.
1.2 Objective

The main objective of any computerized system is to minimize the manual


paper work load performed inside any company or organization. Objective
of this system is also to minimize and overcome the limitations of the
problems faced under manual system as there is lot of work processed from
both the customer and supplier side in order to make sale or purchase. So to
remove this manual workload and smooth running of business it is very
necessary to have a computerized system which is capable of processing the
business as well as capable to generate report and queries made by the
management.
This computerized system will have a good GUI which provides an ease of
support to the user to perform their work done in very less time and in an
effective manner. The application would take care of the data integrity and
validity, so that the unsuitable data would not be entered by
misapprehension. This system is also capable of generating the error free
report and fees for student and salary for management, which is very much
required while running an institute. Time to time database backup facility by
the administrator makes this system more stable while in case of Hardware
failure, natural disaster.
1.3 Limitations of the Existing System

The existing system has certain drawbacks for managing the records of the
coaching center due to which a new automated system is proposed and
hence computerization is done for the same. The following are the
drawbacks of the existing system:-

• It is not user friendly.


• Retrieval of data is not easy as well as there is no efficiency of data
which is maintained.
• The cost of maintaining the data is more as compared to cost of
maintaining the data in an automated system.
• Problem of data delicacy also arise in manually maintained data.
• Modification of data is not easy in the existing system.
• Also customers cannot register themselves in the existing system.
1.4 Need for the system

This project titled “COACHING CENTER MANAGEMENT” has been


designed to computerize all the data of the students, batches, teachers, staff,
and salary to teachers, salary of staff etc in the coaching center.

In today’s environment, the computers are being used in almost all trades
and fields. The computers are widely used to store and maintain the
databases for the people of different trades. With the help of computers, it
becomes very easy to create, maintain and update the data as well as
accessing the data becomes very easy. Also it saves lot of time of the people,
that time can be invested in other productive works to enhance one’s
business. Because of many advantages, everybody from every trade is keen
to use the computers to increase the efficiency of their work. There has been
a demand for a system that would help to maintain the database of the
coaching center also.

The proposed system was needed for computerization of various operations


to make the Coaching Center Management System for fast and easy
retrieval procedure. Thus, the proposed system includes advantages above
the existing system. The following are the merits:-
a) Computerization makes the retrieval of data easy.
b) Maintenance cost of data is less.
c) Speed of accessing data is fast.
d) It is user friendly.
Chapter 2

System Analysis
2.1 Hardware Requirements

Before running the project, please be sure that your system meets the
following requirements:

1. COMPAQ PC or 100% compatible


2. 80486 processor or higher
3. Your operating system must be one of the following:
• Windows NT
• Windows 2000
• Windows XP or later
4. 16 MB of RAM or higher
5. 4GB of hard disk space
6. VGA monitor
7. Mouse or compatible pointing device
8. Floppy drive 3.5”
9. Pen Drive

2.2 Software Requirements

Platform - Windows XP
Database - Microsoft Access 2003
Language/Front end - Visual Basic 6.0
2.3 Front-End used: Visual Basic

Introduction about Visual Basic

2.3.1 What is Visual Basic?

A programming language and environment developed by Microsoft. Based


on the BASIC language, Visual Basic was one of the first products to
provide a graphical programming environment and a paint metaphor for
developing user interfaces. Instead of worrying about syntax details, the
Visual Basic programmer can add a substantial amount of code simply by
dragging and dropping controls, such as buttons and dialog boxes and then
defining their appearance and behavior.

Visual Basic nevertheless has an object-oriented philosophy. It is sometimes


called an event-driven language because each object can react to different
events such as a mouse click.

Visual Basic (VB) is a widely used programming language developed by


Microsoft and based on earlier BASIC implementations such as
QBasic/QuickBasic.
It exists in three distinct forms:-

Visual Basic stand-alones: This is the Visual Basic development


environment used by programmers to build DOS and Windows applications.
A number of different versions are in this product line, including separate
versions for DOS and Windows.

Visual Basic for Applications (VBA): Microsoft includes VBA with many
of its Windows and Mac OS applications, notably Microsoft Word and
Microsoft Excess. VBA is a shared library that VB-aware applications can
use to augment their capabilities. With it, you can script macros that
automate tasks and even combine the functions of the programs.

Visual Basic Scripting Edition (VB Script): VBScript is a subset of Visual


Basic designed for use on the World Wide Web, offered as an alternative to
JavaScript and as a means of accessing ActiveX controls and Java applets.

2.3.2 Why do we need it?

Visual Basic suit more for applications developing than for Games
developing. You can create sophisticated games using Visual Basic, But if
you want to make a really advanced professional game like Quake 2, you
may choose other language (like C++), that would be much harder to
program with. However, Visual Basic will be probably powerful enough to
suit all your application and games programming needs.

2.3.3 The features of Visual Basic

• Many types of software like to add a word “Visual” in front of


their names, & Visual Basic is the pioneer among them. Why
do we say “Visual” to describe Basic? Because Visual Basic
provides programmers many visual tools to design windows.
These windows will be as same as the appearances when the
programs are executing.

• Visual Basic has developed to 6.0 versions up to now, it not


only inherits the features of Basic which is easy to learn, easy to
use but adds Multi-media database, the article directional
program design, ActiveX, the web page manufacturers & so on.
Thus, Visual Basic6.0 will not be done to other the tools of
developing program languages. Visual Basic6.0 has had
Chinese version. It’s more convenient for us to learn.

2.3.4 Advantages of Visual Basic:

1. It’s simple language. Things may be difficult to program with


other language, can be done in Visual Basic very easily.

2. Because Visual Basic is so popular, there are many good resources


(Books, Web sites, News groups & more) that can help you learn
the language. You can find the answers to your programming
problems much more easily than other programming languages.

3. You can find many tools (Sharewares & Freeware) on the internet
that will spare you some programming time. For example, if you
want to ping a user over the Internet in your program, Instead of
writing the ping function itself yourself, you can download a
control that does it, and use it in your program. Compare to other
languages, Visual Basic have the widest variety of tools that you
can download on the Internet and use in your programs.

2.3.5 Disadvantages of Visual Basic:

1) Visual Basic is powerful language, but it’s not suit for


programming really sophisticated games.
2) It’s much slower than other languages.
2.4 Back-End used: MS Access

2.4.1 About Ms Access


Ms-Access is a RDBMS used to store and manipulate large collection of
information of any kind. Ms Access has tool which are easy to use and
provide powerful development environment. For example access can be
used to enter and maintain student awards, inventory record of a ware house
numbers. Once the records are stored any type of query can be asked, reports
can be created and data entry forms can be designed.

2.4.2 Components of Access:


1. Database window: here all object of a database are stored in a single file
having external mdb.
2. Database and tables: database is a collection of information retained in
the form of a table. Table consists of row and column. Each table stores
information about one entry such as student customer etc each row in a table
represents a single record of an entity. Each column contains a discrete
element of information called a field. A field might be a student name,
telephone number etc.
3. Forms: Forms display a data from a table or query in the format requested
by user. The records or fields in the table are placed in the forms and can be
edited according to the requirement.
4. Queries: A query is a question asked by the user to extract information
according to his or her requirement.
5. Reports: A report displays the information in a prescribed format. Access
produces reports by incorporating graphs, charts and different styles. It can
be used to group data and show sub totals and grand totals.

6. Macros: Macros are used to automate frequently used tasks. Access macros execute
number of options such as opening files, displaying message boxes, validation of data.
2.5 Feasibility study

Before developing some feasibility study is very necessary. Not everything


imaginable is feasible, not even in software, evanescent as it may appear to
outsider. Once scope is identified, it is reasonable to ask “Can we build
software to meet this scope? Is the project feasible?” Software engineers
rush path these questions, only to become mired in a project that in doomed
from the onset. In my project software has three dimensions: Technical,
Economical and operational. The scooping is not enough. Once scope is
understood, the software team and others must work to determine if it can be
done with in the dimensions just noted. Feasibility study is also depending
on time and resources. Will the project’s time to market beat the
competition? Does the organization have the resources needed to succeed?

2.5.1 Technical feasibility

Technical feasibility centers on the exiting computer system (hardware,


software etc.) and to what extent it can support the proposed addition. For
example if the current computer is operating at 80 percent capacity - an
arbitrary ceiling- then running another application could overload the system
or require additional hardware. This involves financial considerations to
accommodate technical enhancements. If the budget serious constraints, then
the project is judged not feasible. Is a project technical feasible? If it with in
the state of art? Can defects to reduce to level matching the application
need? All these questions are study in technical feasibility. Project on the
margins of yours experience are not so easy, a team have to spend several
month discovering what the central, difficult to implement requirement of a
new application actually are. Do some of these requirements pose risks that
would make the project infeasible? Can these risks be overcome? The
feasibility team ought to carry architecture and design of the high risk
requirement to the point at which it can answer these questions. In some
cases the team gets negative answer, a reduction is requirement may be
negotiated.

2.5.2 Economical Feasibility

Economical analysis is the mist frequently used method for evaluating the
effectiveness of a candidate system. More commonly known as cost/benefit
analysis, the procedure is to determine the benefits and savings that are
expected from a candidate system and compare them with codes. In
economical feasibility we can study that, is it my software is economically
feasible? Can development is completed at a cost the software organization,
its client, or the market can afford? This study is very necessary. We can
evaluate economical feasibility of this software system that means what is
the market value of this system? If your system is economically feasible then
he is use many people and stand in market in long time. Economically
feasible system increasing her clients and market can easily afford it. When
you development feasibility of the system if the system is feasible then the
system work properly. If benefits outweigh costs, then the decision is made
to design and implement the system. Otherwise, further justification or
alterations in the proposed system will have to be made if it is to give a
chance of being approved. This is an ongoing effort that improves in
accuracy at each face of the system life cycle.

2.5.3 Operational feasibility

The systems operational feasibility depends on the system technical


feasibility. Which methods we use for developing the system and what
technique we use for developing the system. Many of the project that appear
in the newspapers a few years later as whapping failures got started this way.
Because those projects is not using appropriate methods of software
engineering. If the system is operationally feasible then he is a reliable
system and giving the correct result. When client is working with this
software system then all forms and fields are described and its database is
connect in appropriate manner.
Software system spends some extra cost, and then it isn’t economically
feasible. The software organization cost is pre-defined cost of the system we
spend in developing time.
2.6 Software Life Cycle Models (SDLC)

Software engineering is a layered technology. To solve actual problem in


industry setting, a software engineer must incorporate a development
strategy that encompass the process, the method and tools layers. This
strategy is often referred to as a Process Model or a Software Engineering
Paradigm.

There are a series of steps through which the software project progresses
during its development process. These steps together constitute the Life
Cycle Model of that project. There are a number of life cycle models, each
having its own strengths and weaknesses:

 The Waterfall Model

 The Rapid Prototyping Model

 The Incremental Model

 The Iterative Enhancement Model

The life history of each project is different. Some projects spent much time
in conceptual stage but some are developed and implemented quickly then
spend years in maintenance. So a choice needs to be made depending upon
the advantages and disadvantages of the various models and the requirement
of our project.

2.6.1 SDLC Model Applied (Waterfall Model)


Waterfall model is the simplest model with each phase having a well defined
starting and ending point, with identifiable deliveries to the next phase.
The model consists of six distinct stages, namely:
1. Requirement Analysis Phase

The problem is specified along with the desired service objectives


(goals) also the constraints are identified.

2. Specification Phase

The system specification is produced from the detailed definition


requirement analysis phase. This document should clearly define the
product “to do’s”

3. System and Software Design Phase

The system specifications are translated into a software


representation. The software engineer at this stage is concerned with:
 Data Structure

 Software Architecture

 Algorithmic detail, and

 Interface representations
The hardware requirements are also determined at this stage along
with a picture of the overall system architecture. By the end of this
stage the software engineer should be able to identify the relationship
between the hardware, software and the associated interfaces. Any
faults in the specification should ideally not be passed ‘down stream’.

4. Implementation and Testing Phase

The designs are translated into the software domain also detailed
documentation from the design phase can significantly reduce the
coding effort. Testing at this stage focuses on making sure that any
errors are identified and that the software meets its required
specification.

5. Integration and System Testing Phase

All the program units are integrated and tested to ensure that the
complete system meets the software requirements. After this stage the
software is delivered to the customer. The software product is
delivered to the client for acceptance testing.

6. Maintenance Phase

This is usually the longest and the last stage of the software. In this
phase the software is updated to meet the changing customer needs,
ability to accommodate changes in the external environment, correct
errors and oversights previously undetected in the testing phases,
enhancing the efficiency of the software.

2.7 Reasons for choosing waterfall model

• In this model, a detailed checking is done at each and every step by


software Quality Assurance (SQA) group and also by the clients. That
is why it involves less risk of rejection by clients.

• It is very easy to understand and implement.

• It is documentation driven, that is documentation is produced at every


stage.

• Testing is inherent to every phase of the waterfall model. So there is


no need for a separate testing phase.

• The feed back loops in this model allow for corrections to be


incorporated into the model. For example a problem in the design
phase requires a ‘revisit’ to the specifications phase. When changes
are made to any phase, the relevant documentation should be updated
to reflect that change.
Chapter 3

Design of the System

3.1 SYSTEM DESIGN

Design is a highly significant phase in software development where the


designer plans “how” a software system should be produced in order to male
it functional, reliable and reasonably easy to understand, modify and
maintain. Designing a software results in software design document (SDD).
Gather data or user requirement

Analyze the requirement data

Validate the design


against the
requirement Obtain answers to
requirement questions

Conceive the high level design

Refine and document the design

Design Framework
3.2 Design Objectives

Goals in mind while designing the system.


1. To reduce the manual work to be done
2. To avoid errors inherent making the output inconsistent and incorrect
3. To make the system completely menu driven and user friendly.
4. To design the system so that even non-programmers can use the system
effectively and system should act as a catalyst in achieving objectives.
5. To improve the management of permanent information of the company by
keeping it in properly structured tables.
6. To provide the facility to modify any records whenever required.
7. To query a particular record or all records is provided.
8. To design the system so that the reports for different forms can be
obtained.
3.4 Data F

Start

Menu
No

If choice=
Input Cho
No

If choice=

If choice
No

No
If choice=

If choice
No
I

Vi

If
M

Input
If
Vi

Input
Vi

M
If ch

Input
If ch
Vi

Input
Vi

M
If ch

Input
If ch
Vi

Input

If ch

If ch
Q

If ch
Vi

Input

If ch

If ch
Q

If ch
3.4 Data Flow Diagrams

LEVEL 0 STUDENTS DFD

STUDENT
M

LEVEL 1 DFD
INFO
QUERIES RETRIVAL
MENU
PROCEDURE

LEVEL 0 TEACHERS DFD


STUDENT
STUDENT
MENU INFO

MANAGEMENT
LEVEL 2 DFD OF TRANSACTIO

SEAR C H F OR
SEARCH INFO STUDENT
MENU
RETRIVAL

PROCEDURE SEAR CH FOR


TEAC HER

IVED
C E
RE
TIO
LEVEL 2PDFD
TRANSACTION
LOGIN
TR ANSAC AYM
E
N MENU
SA
LA
RY

STUDENT ADD
STUDENT
MENU INFO M
O
D
MANAGMENT
DE
L
ET

ADD
E
3.5 ER Diagrams dob
address
gender
dob address l_name
resi_pho
gender l_name
f_name
f_name
resi_pho mob_pho
stud_id
teach_id
mob_pho school
Teacher Teaches
Student
Salary class

qualification

Pay

Studies
Takes in
salary
total_amt

serial_no Fee
cheque_no

stud_id
pay_id

teach_id type
batch_id
Payments f_date
batch_id

pay_date
batch_id
amount
amount
teach_id

subject Batches valid_upto

time
join_date

hours days
Chapter 4

Coding
LOGIN
Private Sub cmdok_Click()
Dim variable1 As String, at As String
at = Dir(App.Path & "\log.dat", vbNormal)
If at = "" Then
Open App.Path & "\log.dat" For Output As #1
Print #1, "top"
Print #1, "0" 'student
Print #1, "0" 'batch
Print #1, "0" 'teacher
Print #1, "0" 'staff
Print #1, "0" 'fee
Close #1
End If
Open App.Path & "\log.dat" For Input As #1
Input #1, variable1
Close #1

Static i As Integer
If Text1.Text = variable1 Then
Unload Me
main_m.Show
Else
MsgBox "Wrong Password", vbOKOnly + vbCritical, "Coaching centre"
Text1.Text = ""
End If
If i = 2 Then
Unload Me
Exit Sub
End If
i=i+1
End Sub

Private Sub cmdcancel_Click()


Unload Me
End Sub

MAIN FORM
Public closechec As Boolean
Private Sub about_Click()
abot.Show 1
End Sub
Private Sub backup_Click()
backp.Show 1
End Sub

Public Sub Batch_Click()


side.Show
side.Left = 0
side.Top = 0
side.chec = 2
side.l_1.Caption = "BATCH"
side.s_1.Caption = "NEW"
side.s_2.Caption = "ADD"
side.s_3.Caption = "DELETE"
side.s_1.Visible = True
side.s_2.Visible = True
side.s_3.Visible = True
side.s_4.Visible = False
side.f_1.Visible = False
End Sub

Private Sub clo_Click()


Unload Me
End Sub

Private Sub exit_Click()


Unload Me
End Sub

Private Sub help_Click()


CommonDialog1.HelpCommand = &H3&
CommonDialog1.HelpFile = App.Path & "\HELP_CC.hlp"
CommonDialog1.ShowHelp
End Sub

Private Sub MDIForm_Activate()


Dim checpath As String
Dim datpath As String
datpath = App.Path + "/database/stud_data.mdb"
checpath = Dir(datpath, vbNormal)
If checpath = "" Then
MsgBox "Error, database file not found " & datpath, vbOKOnly +
vbCritical, "coaching centre"
Unload Me
End If
End Sub
Private Sub MDIForm_MouseDown(Button As Integer, Shift As Integer, X
As Single, Y As Single)
If Button = vbRightButton Then
PopupMenu foot
End If
End Sub

Private Sub Mdiform_QueryUnload(Cancel As Integer, UnloadMode As


Integer)
Dim strmsg As String
strmsg = "Are you Sure, You want's to Close Coaching Centre"

If closechec = True Then


MsgBox "please close all forms", vbOKOnly + vbInformation, "coaching
center"
Cancel = True
Exit Sub
End If

If MsgBox(strmsg, vbQuestion + vbYesNo + vbDefaultButton2,


"coaching center") = vbYes Then
Call MDIForm_Unload(1)
Else: Cancel = True
End If
End Sub

Private Sub MDIForm_Unload(Cancel As Integer)


Unload Me
End Sub

Private Sub pass_c_Click()


pass.Show 1
End Sub

Public Sub quries_Click()


side.Show
side.Left = 0
side.Top = 0
side.chec = 6
side.l_1.Caption = "QUERIES"
side.s_1.Caption = "STUDENT"
side.s_2.Caption = "BATCH"
side.s_3.Caption = "TEACHER"
side.s_4.Caption = "STAFF"
side.s_1.Visible = True
side.s_2.Visible = True
side.s_3.Visible = True
side.s_4.Visible = True
side.f_1.Visible = False
End Sub

Public Sub report_Click()


side.Show
side.Left = 0
side.Top = 0
side.chec = 7
side.l_1.Caption = "REPORTS"
side.s_1.Caption = "STUDENT"
side.s_2.Caption = "BATCH"
side.s_3.Caption = "TEACHER"
side.s_4.Caption = "STAFF"
side.s_1.Visible = True
side.s_2.Visible = True
side.s_3.Visible = True
side.s_4.Visible = True
side.f_1.Visible = False
End Sub

Public Sub staff_Click()


side.Show
side.Left = 0
side.Top = 0
side.chec = 4
side.l_1.Caption = "STAFF"
side.s_1.Caption = "ADD"
side.s_2.Caption = "MODIFY"
side.s_3.Caption = "DELETE"
side.s_1.Visible = True
side.s_2.Visible = True
side.s_3.Visible = True
side.s_4.Visible = False
side.f_1.Visible = False
End Sub

Public Sub stu_Click()


side.Show
side.Left = 0
side.Top = 0
side.chec = 1
side.l_1.Caption = "STUDENT"
side.s_1.Caption = "ADD"
side.s_2.Caption = "MODIFY"
side.s_3.Caption = "DELETE"
side.s_1.Visible = True
side.s_2.Visible = True
side.s_3.Visible = True
side.s_4.Visible = False
side.f_1.Visible = False
End Sub

Public Sub Teach_Click()


side.Show
side.Left = 0
side.Top = 0
side.chec = 3
side.l_1.Caption = "TEACHER"
side.s_1.Caption = "ADD"
side.s_2.Caption = "MODIFY"
side.s_3.Caption = "DELETE"
side.s_1.Visible = True
side.s_2.Visible = True
side.s_3.Visible = True
side.s_4.Visible = False
side.f_1.Visible = False
End Sub

Public Sub trans_Click()


side.Show
side.Left = 0
side.Top = 0
side.chec = 5
side.l_1.Caption = "TRANSACTION"
side.s_1.Caption = "FEE"
side.s_2.Caption = "SALARY"
side.s_1.Visible = True
side.s_2.Visible = True
side.s_3.Visible = False
side.s_4.Visible = False
side.f_1.Visible = False
End Sub

SIDEBAR
Public chec As Integer, ta As Integer

Private Function da(a As Integer) As String


Select Case a
Case 1: da = "Sunday"
Case 2: da = "Monday"
Case 3: da = "Tuesday"
Case 4: da = "Wednesday"
Case 5: da = "Thusday"
Case 6: da = "Friday"
Case 7: da = "Saturday"
End Select
End Function

Private Sub toolb()


main_m.stu.Enabled = False
main_m.batch.Enabled = False
main_m.Teach.Enabled = False
main_m.staff.Enabled = False
main_m.trans.Enabled = False
main_m.quries.Enabled = False
main_m.report.Enabled = False
main_m.pass_c.Enabled = False
main_m.backup.Enabled = False
main_m.about.Enabled = False
main_m.exit.Enabled = False
End Sub

Private Sub toole()


main_m.stu.Enabled = True
main_m.batch.Enabled = True
main_m.Teach.Enabled = True
main_m.staff.Enabled = True
main_m.trans.Enabled = True
main_m.quries.Enabled = True
main_m.report.Enabled = True
main_m.pass_c.Enabled = True
main_m.backup.Enabled = True
main_m.about.Enabled = True
main_m.exit.Enabled = True
Label3.Visible = False
End Sub

Private Sub oop()


f_1.Visible = True
s_1.Visible = False
s_2.Visible = False
s_3.Visible = False
s_4.Visible = False
main_m.closechec = True
End Sub

Public Sub f_1_Click()


main_m.closechec = False
Call toole
f_1.Visible = False
If ta = 11 Then
Unload a_Student
ElseIf ta = 21 Then
Unload n_batch
ElseIf ta = 31 Then
Unload a_teach
ElseIf ta = 41 Then
Unload a_staff
ElseIf ta = 51 Then
Unload fee
ElseIf ta = 61 Then
Unload q_stu
ElseIf ta = 71 Then
Unload r_stu
ElseIf ta = 81 Then
Unload pass
ElseIf ta = 12 Then
Unload e_stu
ElseIf ta = 22 Then
Unload e_batch
ElseIf ta = 32 Then
Unload e_teach
ElseIf ta = 42 Then
Unload e_staff
ElseIf ta = 52 Then
Unload salary
ElseIf ta = 62 Then
Unload q_batch
ElseIf ta = 72 Then
Unload r_batch
ElseIf ta = 13 Then
Unload d_stu
ElseIf ta = 23 Then
Unload d_batch
ElseIf ta = 33 Then
Unload d_teach
ElseIf ta = 43 Then
Unload d_staff
ElseIf ta = 53 Then
Unload q_teach
ElseIf ta = 14 Then
Unload q_staff
ElseIf ta = 24 Then
Unload r_staff
ElseIf ta = 63 Then
Unload r_teach
End If
If chec = 1 Then
main_m.stu_Click
ElseIf chec = 2 Then
main_m.Batch_Click
ElseIf chec = 3 Then
main_m.Teach_Click
ElseIf chec = 4 Then
main_m.staff_Click
ElseIf chec = 5 Then
main_m.trans_Click
ElseIf chec = 6 Then
main_m.quries_Click
ElseIf chec = 7 Then
main_m.report_Click
End If
End Sub

Private Sub Form_Load()


Dim a As Date
a = DateAdd("n", 5, Now)
Label1.Caption = DateTime.Date$
Label2.Caption = da(DateTime.Weekday(a, vbUseSystemDayOfWeek =
vbSunday))
Timer1.Enabled = True
End Sub

Private Sub Label1_Click()


Timer1.Enabled = True
End Sub

Private Sub s_1_Click()


Label3.Visible = True
If chec = 1 Then
a_Student.Show
a_Student.Top = 0
a_Student.Left = 1900
a_Student.Height = 10450
a_Student.Width = 13390
Label3.Caption = "A D D S T U D E N T"
Call oop
ta = 11
ElseIf chec = 2 Then
n_batch.Show
n_batch.Top = 0
n_batch.Left = 1900
n_batch.Height = 10450
n_batch.Width = 13390
Label3.Caption = "N E W B A T C H"
Call oop
ta = 21
ElseIf chec = 3 Then
a_teach.Show
a_teach.Top = 0
a_teach.Left = 1900
a_teach.Height = 10450
a_teach.Width = 13390
Label3.Caption = "A D D T E A C H E R"
Call oop
ta = 31
ElseIf chec = 4 Then
a_staff.Show
a_staff.Top = 0
a_staff.Left = 1900
a_staff.Height = 10450
a_staff.Width = 13390
Label3.Caption = "A D D S T A F F"
Call oop
ta = 41
ElseIf chec = 5 Then
fee.Show
fee.Top = 0
fee.Left = 1900
fee.Height = 10450
fee.Width = 13390
Label3.Caption = "F E E"
Call oop
ta = 51
ElseIf chec = 6 Then
q_stu.Show
q_stu.Top = 0
q_stu.Left = 1900
q_stu.Height = 10450
q_stu.Width = 13390
Label3.Caption = "Q U E R Y S T U D E N T"
Call oop
ta = 61
ElseIf chec = 7 Then
r_stu.Show
r_stu.Top = 0
r_stu.Left = 1900
r_stu.Height = 10450
r_stu.Width = 13390
Label3.Caption = "R E P O R T S T U D E N T"
Call oop
ta = 71
End If
Call toolb
End Sub

Private Sub s_2_Click()


Label3.Visible = True
If chec = 1 Then
e_stu.Show
e_stu.Top = 0
e_stu.Left = 1900
e_stu.Height = 10450
e_stu.Width = 13390
Call oop
Label3.Caption = "E D I T S T U D E N T"
ta = 12
ElseIf chec = 2 Then
e_batch.Show
e_batch.Top = 0
e_batch.Left = 1900
e_batch.Height = 10450
e_batch.Width = 13390
Call oop
Label3.Caption = "E D I T B A T C H"
ta = 22
ElseIf chec = 3 Then
e_teach.Show
e_teach.Top = 0
e_teach.Left = 1900
e_teach.Height = 10450
e_teach.Width = 13390
Label3.Caption = "E D I T T E A C H E R"
Call oop
ta = 32
ElseIf chec = 4 Then
e_staff.Show
e_staff.Top = 0
e_staff.Left = 1900
e_staff.Height = 10450
e_staff.Width = 13390
Label3.Caption = "E D I T S T A F F"
Call oop
ta = 42
ElseIf chec = 5 Then
salary.Show
salary.Top = 0
salary.Left = 1900
salary.Height = 10450
salary.Width = 13390
Label3.Caption = "S A L A R Y"
Call oop
ta = 52
ElseIf chec = 6 Then
q_batch.Show
q_batch.Top = 0
q_batch.Left = 1900
q_batch.Height = 10450
q_batch.Width = 13390
Label3.Caption = "Q U E R Y B A T C H"
Call oop
ta = 62
ElseIf chec = 7 Then
r_batch.Show
r_batch.Top = 0
r_batch.Left = 1900
r_batch.Height = 10450
r_batch.Width = 13390
Label3.Caption = "R E P O R T B A T C H"
Call oop
ta = 72
End If
Call toolb
End Sub

Private Sub s_3_Click()


Label3.Visible = True
If chec = 1 Then
d_stu.Show
d_stu.Top = 0
d_stu.Left = 1900
d_stu.Height = 10450
d_stu.Width = 13390
Call oop
Label3.Caption = "D E L E T E S T U D E N T"
ta = 13
ElseIf chec = 2 Then
d_batch.Show
d_batch.Top = 0
d_batch.Left = 1900
d_batch.Height = 10450
d_batch.Width = 13390
Label3.Caption = "D E L E T E B A T C H"
Call oop
ta = 23
ElseIf chec = 3 Then
d_teach.Show
d_teach.Top = 0
d_teach.Left = 1900
d_teach.Height = 10450
d_teach.Width = 13390
Label3.Caption = "D E L E T E T E A C H E R"
Call oop
ta = 33
ElseIf chec = 4 Then
d_staff.Show
d_staff.Top = 0
d_staff.Left = 1900
d_staff.Height = 10450
d_staff.Width = 13390
Label3.Caption = "D E L E T E S T A F F"
Call oop
ta = 43
ElseIf chec = 6 Then
q_teach.Show
q_teach.Top = 0
q_teach.Left = 1900
q_teach.Height = 10450
q_teach.Width = 13390
Label3.Caption = "Q U E R Y T E A C H E R"
Call oop
ta = 53
ElseIf chec = 7 Then
r_teach.Show
r_teach.Top = 0
r_teach.Left = 1900
r_teach.Height = 10450
r_teach.Width = 13390
Label3.Caption = "R E P O R T T E A C H E R"
Call oop
ta = 63
End If
Call toolb
End Sub

Private Sub s_4_Click()


Label3.Visible = True
If chec = 6 Then
q_staff.Show
q_staff.Top = 0
q_staff.Left = 1900
q_staff.Height = 10450
q_staff.Width = 13390
Label3.Caption = "Q U E R Y S T A F F"
Call oop
ta = 14
ElseIf chec = 7 Then
r_staff.Show
r_staff.Top = 0
r_staff.Left = 1900
r_staff.Height = 10450
r_staff.Width = 13390
Label3.Caption = "R E P O R T S T A F F"
Call oop
ta = 24
End If
Call toolb
End Sub

Private Sub Timer1_Timer()


Label4.Caption = Time$
End Sub

ADD STUDENT
Dim WithEvents ad As Recordset, db As Connection, a As Integer, i As
Integer

Private Sub st_1_Click()


st_3.Visible = True
st_2.Visible = True
st_1.Visible = False
End Sub

Private Sub st_2_Click()


st_3.Visible = False
st_2.Visible = False
st_1.Visible = True
End Sub

Private Sub st_3_Click()


st_3.Visible = False
st_2.Visible = False
st_1.Visible = True
End Sub

Private Sub Combo1_Click()


Text1(9).Text = Combo1.Text
End Sub

Private Sub Combo2_Click()


Text1(10).Text = Combo2.Text + "/" + Combo3.Text + "/" +
Combo4.Text
End Sub

Private Sub Combo3_Click()


Text1(10).Text = Combo2.Text + "/" + Combo3.Text + "/" +
Combo4.Text
End Sub

Private Sub Combo4_Click()


Text1(10).Text = Combo2.Text + "/" + Combo3.Text + "/" +
Combo4.Text
End Sub

Private Sub cmdnew_Click()


Adodc1.Recordset.AddNew
Open App.Path & "\log.dat" For Input As #1
For i = 1 To 2
Input #1, a
Next i
Close #1
Text1(0).Text = "S" & a + 1
cmdnew.Visible = False
cmdsave.Visible = True
cmdcancel.Visible = True
End Sub

Private Sub cmdsave_Click()


For i = 0 To 10
If Text1(i).Text = "" Then
MsgBox "Empty", vbOKOnly + vbCritical, "coaching centre"
Exit Sub
End If
Next i
Set ad = New Recordset
ad.Open "select stud_id from q_chec_stud where f_name='" &
Text1(1).Text & "' and l_name='" & Text1(2).Text & "'", db,
adOpenStatic, adLockOptimistic
If Not ad.RecordCount = 0 Then
MsgBox "Already exists", vbOKOnly + vbInformation, "coaching center"
Exit Sub
End If
Adodc1.Recordset.Update
Open App.Path & "\log.dat" For Output As #1
For i = 1 To 2
Print #1, a + 1
Next
Close #1
cmdnew.Visible = True
cmdsave.Visible = False
cmdcancel.Visible = False
End Sub

Private Sub cmdcancel_Click()


Adodc1.Recordset.CancelUpdate
cmdnew.Visible = True
cmdsave.Visible = False
cmdcancel.Visible = False
End Sub

Private Sub Form_Load()


Adodc1.Recordset.AddNew
Open App.Path & "\log.dat" For Input As #1
For i = 1 To 2
Input #1, a
Next i
Close #1
Text1(0).Text = "S" & a + 1
Dim path_d As String
path_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" &
App.Path & "\database\stud_data.mdb;"
Set db = New Connection
db.Open path_d

End Sub

Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)


If Index = 7 Or Index = 8 Then
If KeyAscii < 48 Or KeyAscii > 57 Then
If Not KeyAscii = 8 Then KeyAscii = 0
End If
End If
End Sub

EDIT STUDENT
Dim WithEvents ad As Recordset, db As Connection, i As Integer

Private Sub cmdmov_Click(Index As Integer)


If Index = 1 Then
If Not ad.EOF Then ad.MoveNext
If ad.EOF And ad.RecordCount > 0 Then ad.MoveLast
Else
If Not ad.BOF Then ad.MovePrevious
If ad.BOF And ad.RecordCount > 0 Then ad.MoveFirst
End If
End Sub

Private Sub cmdcancel_Click()


ad.CancelUpdate
cmdsave.Enabled = False
cmdcancel.Enabled = False
End Sub

Private Sub cmdsearch_Click()


If Text1.Text = "" Then
MsgBox "Empty", vbOKOnly + vbCritical, "coaching centre"
Text1.SetFocus
Exit Sub
End If
Set ad = New Recordset
Select Case Combo1.Text
Case "ID"
ad.Open "Select * from student where stud_id='" & Text1.Text & "'",
db, adOpenStatic, adLockOptimistic
Case "Name"
ad.Open "Select * from student where f_name='" & Text1.Text & "'",
db, adOpenStatic, adLockOptimistic
Case "School"
ad.Open "Select * from student where school='" & Text1.Text & "'", db,
adOpenStatic, adLockOptimistic
Case "Class"
ad.Open "Select * from student where class='" & Text1.Text & "'", db,
adOpenStatic, adLockOptimistic
End Select
If ad.RecordCount = 0 Then
MsgBox "Not Found", vbOKOnly + vbInformation, "coaching centre"
Text1.SetFocus
Exit Sub
ElseIf ad.RecordCount > 1 Then
cmdmov(0).Visible = True
cmdmov(1).Visible = True
Else
cmdmov(0).Visible = False
cmdmov(1).Visible = False
End If
Dim ta As TextBox
For Each ta In Me.tex
Set ta.DataSource = ad
Next
cmdsave.Enabled = True
cmdcancel.Enabled = True
End Sub

Public Sub cmdsave_Click()


For i = 0 To 10
If tex(i).Text = "" Then
MsgBox "Empty", vbOKOnly + vbCritical, "coaching centre"
Exit Sub
End If
Next i
ad.Update
cmdsave.Enabled = False
cmdcancel.Enabled = False
End Sub

Private Sub Form_Load()


Dim path_d As String
path_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" &
App.Path & "\database\stud_data.mdb;"
Set db = New Connection
db.Open path_d
End Sub

Private Sub Text1_Change()


If Text1.Text = "" Then
cmdsearch.Enabled = False
Else
cmdsearch.Enabled = True
End If
End Sub

DELETE STUDENT
Dim WithEvents ad As Recordset, db As Connection, i As Integer

Private Sub cmdmov_Click(Index As Integer)


If Index = 0 Then
If Not ad.BOF Then ad.MovePrevious
If ad.BOF And ad.RecordCount > 0 Then ad.MoveFirst
Else
If Not ad.EOF Then ad.MoveNext
If ad.EOF And ad.RecordCount > 0 Then ad.MoveLast
End If
End Sub

Private Sub cmddelete_Click()


Dim a As Integer
a = MsgBox("DELETE ?", vbYesNo + vbQuestion, "coaching center")
If a = 6 Then
ad.Delete
For i = 0 To 10
tex(i).Text = ""
Next i
a = CInt(Mid(tex(0).Text, 2, Len(tex(0).Text)))
Open App.Path & "\log.dat" For Output As #1
For i = 1 To 2
Print #1, a - 1
Next
Close #1
cmddelete.Enabled = False
cmdcancel.Enabled = False
End If
End Sub
Private Sub cmdcancel_Click()
cmddelete.Enabled = False
cmdcancel.Enabled = False
End Sub

Private Sub Form_Load()


Dim path_d As String
path_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" &
App.Path & "\database\stud_data.mdb;"
Set db = New Connection
db.Open path_d
End Sub

Private Sub cmdsearch_Click()


If Text1.Text = "" Then Exit Sub
Set ad = New Recordset
Select Case Combo1.Text
Case "ID"
ad.Open "Select * from student where stud_id='" & Text1.Text & "'",
db, adOpenStatic, adLockOptimistic
Case "Name"
ad.Open "Select * from student where f_name='" & Text1.Text & "'",
db, adOpenStatic, adLockOptimistic
Case "School"
ad.Open "Select * from student where school='" & Text1.Text & "'", db,
adOpenStatic, adLockOptimistic
Case "Class"
ad.Open "Select * from student where class='" & Text1.Text & "'", db,
adOpenStatic, adLockOptimistic
End Select
If ad.RecordCount = 0 Then
Exit Sub
ElseIf ad.RecordCount > 1 Then
cmdmov(0).Visible = True
cmdmov(1).Visible = True
Else
cmdmov(0).Visible = False
cmdmov(1).Visible = False
End If
Dim ta As TextBox
For Each ta In Me.tex
Set ta.DataSource = ad
Next
cmddelete.Enabled = True
cmdcancel.Enabled = True
End Sub
Private Sub Text1_Change()
If Text1.Text = "" Then
cmdsearch.Enabled = False
Else
cmdsearch.Enabled = True
End If
End Sub

NEW BATCH
Dim db As Connection, WithEvents ad As Recordset, a As Integer, i As
Integer

Private Sub Calendar1_Click()


Text1(7).Text = Format$(Calendar1.Value, "dd/mm/yyyy")
Calendar1.Visible = False
End Sub

Private Sub Combo1_Click()


Text1(3).Text = Combo1.Text
End Sub

Private Sub Combo2_Click()


Text1(5).Text = Combo2.Text
End Sub

Private Sub Combo3_Click()


Text1(4).Text = Combo3.Text
End Sub

Private Sub Combo4_Click()


Text1(1).Text = Combo4.Text
End Sub

Private Sub Combo5_Click()


Text1(9).Text = Combo5.Text
End Sub

Private Sub cmdnew_Click()


Adodc1.Recordset.AddNew
Open App.Path & "\log.dat" For Input As #1
For i = 1 To 3
Input #1, a
Next i
Close #1
Text1(0).Text = "B" & a + 1
cmdnew.Visible = False
cmdsave.Visible = True
cmdcancel.Visible = True
End Sub

Private Sub cmdsave_Click()


For i = 0 To 8
If Text1(i).Text = "" Then
MsgBox "Empty", vbOKOnly + vbCritical, "coaching center"
Exit Sub
End If
Next
Adodc1.Recordset.Update
Open App.Path & "\log.dat" For Output As #1
For i = 1 To 3
Print #1, a + 1
Next
Close #1
cmdnew.Visible = True
cmdsave.Visible = False
cmdcancel.Visible = False
End Sub

Private Sub cmdcancel_Click()


Adodc1.Recordset.CancelUpdate
cmdnew.Visible = True
cmdsave.Visible = False
cmdcancel.Visible = False
End Sub

Private Sub cmdsearch_Click()


Dim lit As ListItem
ListView1.ListItems.Clear
Set ad = New Recordset
ad.Open "select teach_id,f_name,l_name,qualification from q_teacher",
db, adOpenStatic, adLockOptimistic
If ad.RecordCount = 0 Then Exit Sub
For i = 1 To ad.RecordCount
Set lit = ListView1.ListItems.Add
ListView1.ListItems(i).Text = ad.Fields(0).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(1).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(2).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(3).Value
ad.MoveNext
Next
ListView1.Visible = True
End Sub

Private Sub Form_Load()


Adodc1.Recordset.AddNew
Open App.Path & "\log.dat" For Input As #1
For i = 1 To 3
Input #1, a
Next i
Close #1
Text1(0).Text = "B" & a + 1
Text1(10).Text = 0
Text1(6).Text = Format$(Date$, "dd/mm/yyyy")
Dim path_d As String
path_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" &
App.Path & "\database\stud_data.mdb;"
Set db = New Connection
db.Open path_d
ListView1.View = lvwReport
ListView1.ColumnHeaders.Add 1, "ID", "ID"
ListView1.ColumnHeaders(1).Width = 500
ListView1.ColumnHeaders.Add 2, "f_name", "F_Name"
ListView1.ColumnHeaders.Add 3, "l_name", "L_Name"
ListView1.ColumnHeaders.Add 4, "qualification", "Qualification"
End Sub

Private Sub ListView1_Click()


Text1(2).Text = ListView1.SelectedItem
ListView1.Visible = False
End Sub

Private Sub Text1_Click(Index As Integer)


If Index = 7 Then
Calendar1.Visible = True
End If
If Index = 8 Then
If KeyAscii < 48 Or KeyAscii > 57 Then
If Not KeyAscii = 8 Then KeyAscii = 0
End If
End If
End Sub

Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)


If Index = 9 Or Index = 8 Then
If KeyAscii < 48 Or KeyAscii > 57 Then KeyAscii = 0
End If
End Sub

EDIT BATCH
Dim WithEvents ad As Recordset, ad1 As Recordset, ad2 As Recordset,
total_stu As Integer, db As Connection

Private Sub cmdid_Click()


Dim i As Integer
List1.Clear
Set ad = New Recordset
ad.Open "select stud_id from q_stud", db, adOpenStatic,
adLockOptimistic
If ad.RecordCount = 0 Then Exit Sub
For i = 1 To ad.RecordCount
List1.AddItem ad.Fields(0).Value
ad.MoveNext
Next
List1.Visible = True
End Sub

Private Sub cmdsearch1_Click()


If Text1.Text = "" Then Exit Sub
Set ad = New Recordset
ad.Open "select f_name,l_name,address,father,class,school from
q_stud where stud_id='" & Text1.Text & "'", db, adOpenStatic,
adLockOptimistic
Dim te As TextBox
For Each te In Me.Text2
Set te.DataSource = ad
Next
Text4(0).Text = Text1.Text
End Sub

Private Sub cmdsearch2_Click()


ListView1.ListItems.Clear
Dim lv As ListItem, cl As ColumnHeader, i As Integer
If Text3.Text = "" Then Exit Sub
Set ad2 = New Recordset
ad2.Open "select * from batch where subject='" & Text3.Text & "'", db,
adOpenStatic, adLockOptimistic
If Not ad2.RecordCount = 0 Then
For i = 1 To ad2.RecordCount
Set lv = ListView1.ListItems.Add
ListView1.ListItems(i).Text = ad2.Fields(0).Value
ListView1.ListItems(i).ListSubItems.Add , , ad2.Fields(1).Value
ListView1.ListItems(i).ListSubItems.Add , , ad2.Fields(2).Value
ListView1.ListItems(i).ListSubItems.Add , , ad2.Fields(3).Value
ListView1.ListItems(i).ListSubItems.Add , , ad2.Fields(4).Value
ListView1.ListItems(i).ListSubItems.Add , , ad2.Fields(5).Value
ListView1.ListItems(i).ListSubItems.Add , , ad2.Fields(6).Value
ListView1.ListItems(i).ListSubItems.Add , , ad2.Fields(7).Value
ListView1.ListItems(i).ListSubItems.Add , , ad2.Fields(8).Value
ListView1.ListItems(i).ListSubItems.Add , , ad2.Fields(9).Value
ListView1.ListItems(i).ListSubItems.Add , , ad2.Fields(10).Value
ad2.MoveNext
Next
End If
End Sub

Private Sub cmdadd_Click()


ad2.Fields(10).Value = total_stu + 1
ad2.Update
Adodc1.Recordset.Update
cmdadd.Enabled = False
cmdcancel.Enabled = False
End Sub

Private Sub cmdcancel_Click()


Adodc1.Recordset.CancelUpdate
cmdadd.Enabled = False
cmdcancel.Enabled = False
End Sub

Private Sub Form_Load()


Adodc1.Recordset.AddNew
Dim path_d As String
path_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" &
App.Path & "\database\stud_data.mdb;"
Set db = New Connection
db.Open path_d
ListView1.View = lvwReport
ListView1.ColumnHeaders.Add 1, "Batch_ID", "ID"
ListView1.ColumnHeaders(1).Width = 500
ListView1.ColumnHeaders.Add 2, "subject", "Subject"
ListView1.ColumnHeaders.Add 3, "teach_id", "Teacher ID"
ListView1.ColumnHeaders.Add 4, "days", "Days"
ListView1.ColumnHeaders(4).Width = 700
ListView1.ColumnHeaders.Add 5, "time", "Time"
ListView1.ColumnHeaders(5).Width = 700
ListView1.ColumnHeaders.Add 6, "hour", "Hours"
ListView1.ColumnHeaders(6).Width = 700
ListView1.ColumnHeaders.Add 7, "join_date", "Create On"
ListView1.ColumnHeaders.Add 8, "valid_upto", "Valid Upto"
ListView1.ColumnHeaders.Add 9, "amount", "Amount"
ListView1.ColumnHeaders.Add 10, "max_limit", "Max"
ListView1.ColumnHeaders(10).Width = 700
ListView1.ColumnHeaders.Add 11, "no_stud", "No. of Stud"
ListView1.ColumnHeaders(11).Width = 1000
End Sub

Private Sub List1_Click()


Text1.Text = List1.Text
List1.Visible = False
End Sub

Private Sub List1_LostFocus()


Text1.Text = List1.Text
List1.Visible = False
End Sub

Private Sub ListView1_dblClick()


Set ad1 = New Recordset
ad1.Open "select * from q_add_s_b where stud_id='" & Text1.Text & "'
and batch_id='" & ListView1.SelectedItem & "'", db, adOpenStatic,
adLockOptimistic
If Not ad1.RecordCount = 0 Then
MsgBox "Already Add", vbOKOnly + vbInformation, "coaching center"
Exit Sub
End If
Set ad2 = New Recordset
ad2.Open "select * from batch where batch_id='" &
ListView1.SelectedItem & "'", db, adOpenStatic, adLockOptimistic
If ad2.Fields(9).Value = ad2.Fields(10).Value Then
MsgBox "Batch is full", vbOKOnly + vbInformation, "coaching center"
Exit Sub
End If
total_stu = ad2.Fields(10).Value
Text4(1).Text = ListView1.SelectedItem
cmdadd.Enabled = True
cmdcancel.Enabled = True
End Sub
DELETE BATCH
Dim WithEvents ad As Recordset, ad1 As Recordset, db As Connection

Private Sub cmddelete_Click()


Dim a As Integer, i As Integer
ad.Delete
ad1.Delete
a = CInt(Mid(Text1(0).Text, 2, Len(Text1(0).Text)))
Open App.Path & "\log.dat" For Output As #1
For i = 1 To 3
Print #1, a - 1
Next
Close #1
cmddelete.Enabled = False
cmdcancel.Enabled = False
End Sub

Private Sub cmdcancel_Click()


cmddelete.Enabled = False
cmdcancel.Enabled = False
End Sub

Private Sub cmdsearch_Click()


Dim lit As ListItem, i As Integer
ListView1.ListItems.Clear
If Text2.Text = "" Then Exit Sub
Set ad = New Recordset
Select Case Combo1.Text
Case "ID"
ad.Open "select * from batch where batch_id='" & Text2.Text & "'", db,
adOpenStatic, adLockOptimistic
End Select
Dim te As TextBox
For Each te In Me.Text1
Set te.DataSource = ad
Next
Set ad1 = New Recordset
ad1.Open "select stud_id,f_name,l_name,address,father,class,school
from q_d_batch where batch_id='" & Text2.Text & "'", db,
adOpenStatic, adLockOptimistic
If ad1.RecordCount = 0 Then Exit Sub
For i = 1 To ad1.RecordCount
Set lit = ListView1.ListItems.Add
ListView1.ListItems(i).Text = ad1.Fields(0).Value
ListView1.ListItems(i).ListSubItems.Add , , ad1.Fields(1).Value
ListView1.ListItems(i).ListSubItems.Add , , ad1.Fields(2).Value
ListView1.ListItems(i).ListSubItems.Add , , ad1.Fields(3).Value
ListView1.ListItems(i).ListSubItems.Add , , ad1.Fields(4).Value
ListView1.ListItems(i).ListSubItems.Add , , ad1.Fields(5).Value
ListView1.ListItems(i).ListSubItems.Add , , ad1.Fields(6).Value
ad1.MoveNext
Next
Set ad1 = New Recordset
ad1.Open "select * from stud_batch where batch_id='" & Text2.Text &
"'", db, adOpenStatic, adLockOptimistic
cmddelete.Enabled = True
cmdcancel.Enabled = True
End Sub

Private Sub Form_Load()


Dim path_d As String
Set db = New Connection
path_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" &
App.Path & "\database\stud_data.mdb;"
db.Open path_d
ListView1.View = lvwReport
ListView1.ColumnHeaders.Add 1, "ID", "ID"
ListView1.ColumnHeaders(1).Width = 500
ListView1.ColumnHeaders.Add 2, "f_name", "F_Name"
ListView1.ColumnHeaders.Add 3, "l_name", "L_Name"
ListView1.ColumnHeaders.Add 4, "address", "Address"
ListView1.ColumnHeaders.Add 5, "father", "Father's Name"
ListView1.ColumnHeaders.Add 6, "class", "Class"
ListView1.ColumnHeaders.Add 7, "school", "School"
End Sub

Private Sub Text2_Change()


If Text2.Text = "" Then
cmdsearch.Enabled = False
Else
cmdsearch.Enabled = True
End If
End Sub

ADD TEACHER
Dim WithEvents ad As Recordset, db As Connection, a As Integer, i As
Integer
Private Sub Combo1_Click()
Text1(4).Text = Combo1.Text
End Sub

Private Sub Combo2_Click()


Text1(4).Text = Combo2.Text + "/" + Combo3.Text + "/" +
Combo4.Text
End Sub

Private Sub Combo3_Click()


Text1(4).Text = Combo2.Text + "/" + Combo3.Text + "/" +
Combo4.Text
End Sub

Private Sub Combo4_Click()


Text1(4).Text = Combo2.Text + "/" + Combo3.Text + "/" +
Combo4.Text
End Sub

Private Sub cmdnew_Click()


Adodc1.Recordset.AddNew
Open App.Path & "\log.dat" For Input As #1
For i = 1 To 4
Input #1, a
Next i
Close #1
Text1(0).Text = "T" & a + 1
cmdnew.Visible = False
cmdsave.Visible = True
cmdcancel.Visible = True
End Sub

Private Sub cmdsave_Click()


Dim i As Integer
For i = 0 To 9
If Text1(i).Text = "" Then
MsgBox "empty", vbOKOnly + vbCritical, "coaching center"
Exit Sub
End If
Next i
Set ad = New Recordset
ad.Open "select teach_id from q_chec_teach where f_name='" &
Text1(1).Text & "' and l_name='" & Text1(2).Text & "'", db,
adOpenStatic, adLockOptimistic
If Not ad.RecordCount = 0 Then
MsgBox "Already exists", vbOKOnly + vbInformation, "coaching center"
Exit Sub
End If
Adodc1.Recordset.Update
Open App.Path & "\log.dat" For Output As #1
For i = 1 To 4
Print #1, a + 1
Next
Close #1
cmdnew.Visible = True
cmdsave.Visible = False
cmdcancel.Visible = False
End Sub

Private Sub cmdcancel_Click()


Adodc1.Recordset.CancelUpdate
cmdnew.Visible = True
cmdsave.Visible = False
cmdcancel.Visible = False
End Sub

Private Sub Form_Load()


Adodc1.Recordset.AddNew
Open App.Path & "\log.dat" For Input As #1
For i = 1 To 4
Input #1, a
Next i
Close #1
Text1(0).Text = "T" & a + 1
Dim path_d As String
path_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" &
App.Path & "\database\stud_data.mdb;"
Set db = New Connection
db.Open path_d
End Sub

Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)


If Index = 6 Or Index = 7 Then
If KeyAscii < 48 Or KeyAscii > 57 Then
If Not KeyAscii = 8 Then KeyAscii = 0
End If
End If
End Sub
EDIT TEACHER
Dim WithEvents ad As Recordset, db As Connection, i As Integer

Private Sub cmdupdate_Click()


Dim i As Integer
For i = 0 To 10
If Text1(i).Text = "" Then
MsgBox "Empty", vbOKOnly + vbCritical, "coaching centre"
Exit Sub
End If
Next i
ad.UpdateBatch adAffectAll
cmdupdate.Enabled = False
cmdcancel.Enabled = False
End Sub

Private Sub cmdcancel_Click()


ad.CancelUpdate
cmdupdate.Enabled = False
cmdcancel.Enabled = False
End Sub

Private Sub cmdsearch_Click()


Set ad = New Recordset
If Text2.Text = "" Then Exit Sub
Select Case Combo1.Text
Case "ID":
ad.Open "Select * from teacher where teach_id='" & Text2.Text & "'",
db, adOpenStatic, adLockOptimistic
Case "NAME":
ad.Open "Select * from teacher where f_name='" & Text2.Text & "'",
db, adOpenStatic, adLockOptimistic
End Select
If ad.RecordCount = 0 Then
MsgBox "Not Found", vbOKOnly + vbInformation, "coaching centre"
Text1(1).SetFocus
Exit Sub
ElseIf ad.RecordCount > 1 Then
cmdmov(0).Visible = True
cmdmov(1).Visible = True
Else
cmdmov(0).Visible = False
cmdmov(1).Visible = False
End If
Dim te As TextBox
For Each te In Me.Text1
Set te.DataSource = ad
Next
cmdupdate.Enabled = True
cmdcancel.Enabled = True
End Sub

Private Sub cmdmov_Click(Index As Integer)


If Index = 0 Then
If Not ad.BOF Then ad.MovePrevious
If ad.BOF And ad.RecordCount > 0 Then ad.MoveFirst
Else
If Not ad.EOF Then ad.MoveNext
If ad.EOF And ad.RecordCount > 0 Then ad.MoveLast
End If
End Sub

Private Sub Form_Load()


Dim path_d As String
path_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" &
App.Path & "\database\stud_data.mdb;"
Set db = New Connection
db.Open path_d
End Sub

Private Sub Text2_Change()


If Text2.Text = "" Then
cmdsearch.Enabled = False
Else
cmdsearch.Enabled = True
End If
End Sub

DELETE TEACHER
Dim WithEvents ad As Recordset, db As Connection, i As Integer

Private Sub cmddelete_Click()


Dim a As Integer
a = MsgBox("DELETE ?", vbYesNo + vbQuestion, "coaching center")
If a = 6 Then
ad.Delete
a = CInt(Mid(Text1(0).Text, 2, Len(Text1(0).Text)))
Open App.Path & "\log.dat" For Output As #1
For i = 1 To 4
Print #1, a - 1
Next
Close #1
cmddelete.Enabled = False
cmdcancel.Enabled = False
End If
End Sub

Private Sub cmdcancel_Click()


cmddelete.Enabled = False
cmdcancel.Enabled = False
End Sub

Private Sub cmdsearch_Click()


If Text2.Text = "" Then Exit Sub
Set ad = New Recordset
Select Case Combo1.Text
Case "ID":
ad.Open "select * from teacher where teach_id='" + Text2.Text + "'",
db, adOpenStatic, adLockOptimistic
Case "NAME":
ad.Open "select * from teacher where f_name='" + Text2.Text + "'",
db, adOpenStatic, adLockOptimistic
End Select
If ad.RecordCount = 0 Then
MsgBox "Not Found", vbOKOnly + vbInformation, "coaching centre"
Text1(1).SetFocus
Exit Sub
ElseIf ad.RecordCount > 1 Then
cmdmov(0).Visible = True
cmdmov(1).Visible = True
Else
cmdmov(0).Visible = False
cmdmov(1).Visible = False
End If
Dim te As TextBox
For Each te In Me.Text1
Set te.DataSource = ad
Next
cmddelete.Enabled = True
cmdcancel.Enabled = True
End Sub

Private Sub cmdmov_Click(Index As Integer)


If Index = 0 Then
If Not ad.BOF Then ad.MovePrevious
If ad.BOF And ad.RecordCount > 0 Then ad.MoveFirst
Else
If Not ad.EOF Then ad.MoveNext
If ad.EOF And ad.RecordCount > 0 Then ad.MoveLast
End If
End Sub

Private Sub Form_Load()


Dim path_d As String
path_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" &
App.Path & "\database\stud_data.mdb;"
Set db = New Connection
db.Open path_d
End Sub

Private Sub Text2_Change()


If Text2.Text = "" Then
cmdsearch.Enabled = False
Else
cmdsearch.Enabled = True
End If
End Sub

ADD STAFF
Dim db As Connection, WithEvents ad As Recordset, a As Integer, i As
Integer

Private Sub Combo2_Click()


Text1(4).Text = Combo2.Text + "/" + Combo3.Text + "/" +
Combo4.Text
End Sub

Private Sub Combo3_Click()


Text1(4).Text = Combo2.Text + "/" + Combo3.Text + "/" +
Combo4.Text
End Sub

Private Sub Combo4_Click()


Text1(4).Text = Combo2.Text + "/" + Combo3.Text + "/" +
Combo4.Text
End Sub
Private Sub Combo5_Click()
Text1(9).Text = Combo5.Text
End Sub

Private Sub cmdnew_Click()


Adodc1.Recordset.AddNew
Open App.Path & "\log.dat" For Input As #1
For i = 1 To 5
Input #1, a
Next i
Close #1
Text1(0).Text = "St" & a + 1
cmdnew.Visible = False
cmdsave.Visible = True
cmdcancel.Visible = True
End Sub

Private Sub cmdsave_Click()


For i = 0 To 8
If Text1(i).Text = "" Then
MsgBox "empty", vbOKOnly + vbCritical, "coaching center"
Exit Sub
End If
Next
Set ad = New Recordset
ad.Open "select staff_id from q_chec_staff where f_name='" &
Text1(1).Text & "' and l_name='" & Text1(2).Text & "'", db,
adOpenStatic, adLockOptimistic
If Not ad.RecordCount = 0 Then
MsgBox "Already exists", vbOKOnly + vbInformation, "coaching center"
Exit Sub
End If
Adodc1.Recordset.Update
Open App.Path & "\log.dat" For Output As #1
For i = 1 To 5
Print #1, a + 1
Next
Close #1
cmdnew.Visible = True
cmdsave.Visible = False
cmdcancel.Visible = False
End Sub

Private Sub cmdcancel_Click()


Adodc1.Recordset.CancelUpdate
cmdnew.Visible = True
cmdsave.Visible = False
cmdcancel.Visible = False
End Sub

Private Sub Form_Load()


Adodc1.Recordset.AddNew
Open App.Path & "\log.dat" For Input As #1
For i = 1 To 5
Input #1, a
Next i
Close #1
Text1(0).Text = "St" & a + 1
Dim path_d As String
path_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" &
App.Path & "\database\stud_data.mdb;"
Set db = New Connection
db.Open path_d
End Sub

Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)


If Index = 6 Or Index = 7 Or Index = 8 Then
If KeyAscii < 48 Or KeyAscii > 57 Then
If Not KeyAscii = 8 Then KeyAscii = 0
End If
End If
End Sub

EDIT STAFF
Dim WithEvents ad As Recordset, db As Connection, i As Integer

Private Sub cmdupdate_Click()


Dim i As Integer
For i = 0 To 8
If Text1(i).Text = "" Then
MsgBox "empty", vbOKOnly + vbCritical, "coaching center"
Exit Sub
End If
Next
ad.UpdateBatch
cmdupdate.Enabled = False
cmdcancel.Enabled = False
End Sub
Private Sub cmdcancel_Click()
ad.CancelUpdate
cmdupdate.Enabled = False
cmdcancel.Enabled = False
End Sub

Private Sub cmdsearch_Click()


Set ad = New Recordset
If Text2.Text = "" Then Exit Sub
Select Case Combo1.Text
Case "ID":
ad.Open "Select * from staff where staff_id='" & Text2.Text & "'", db,
adOpenStatic, adLockOptimistic
Case "NAME":
ad.Open "Select * from staff where f_name='" & Text2.Text & "'", db,
adOpenStatic, adLockOptimistic
End Select
If ad.RecordCount = 0 Then
MsgBox "Not Found", vbOKOnly + vbInformation, "coaching centre"
Text1(1).SetFocus
Exit Sub
ElseIf ad.RecordCount > 1 Then
cmdmov(0).Visible = True
cmdmov(1).Visible = True
Else
cmdmov(0).Visible = False
cmdmov(1).Visible = False
End If
Dim te As TextBox
For Each te In Me.Text1
Set te.DataSource = ad
Next
cmdupdate.Enabled = True
cmdcancel.Enabled = True
End Sub

Private Sub cmdmov_Click(Index As Integer)


If Index = 0 Then
If Not ad.BOF Then ad.MovePrevious
If ad.BOF And ad.RecordCount > 0 Then ad.MoveFirst
Else
If Not ad.EOF Then ad.MoveNext
If ad.EOF And ad.RecordCount > 0 Then ad.MoveLast
End If
End Sub
Private Sub Form_Load()
Dim path_d As String
path_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" &
App.Path & "\database\stud_data.mdb;"
Set db = New Connection
db.Open path_d
End Sub

Private Sub Text2_Change()


If Text2.Text = "" Then
cmdsearch.Enabled = False
Else
cmdsearch.Enabled = True
End If
End Sub

DELETE STAFF
Dim WithEvents ad As Recordset, db As Connection, i As Integer

Private Sub cmdsearch_Click()


If Text2.Text = "" Then Exit Sub
Set ad = New Recordset
Select Case Combo1.Text
Case "ID":
ad.Open "select * from staff where staff_id='" + Text2.Text + "'", db,
adOpenStatic, adLockOptimistic
Case "NAME":
ad.Open "select * from staff where f_name='" + Text2.Text + "'", db,
adOpenStatic, adLockOptimistic
End Select
If ad.RecordCount = 0 Then
MsgBox "Not Found", vbOKOnly + vbInformation, "coaching centre"
Text1(1).SetFocus
Exit Sub
ElseIf ad.RecordCount > 1 Then
cmdmov(0).Visible = True
cmdmov(1).Visible = True
Else
cmdmov(0).Visible = False
cmdmov(1).Visible = False
End If
Dim te As TextBox
For Each te In Me.Text1
Set te.DataSource = ad
Next
cmddelete.Enabled = True
cmdcancel.Enabled = True
End Sub

Private Sub cmddelete_Click()


Dim a As Integer
a = MsgBox("DELETE ?", vbYesNo + vbQuestion, "coaching center")
If a = 6 Then
ad.Delete
a = CInt(Mid(Text1(0).Text, 2, Len(Text1(0).Text)))
Open App.Path & "\log.dat" For Output As #1
For i = 1 To 5
Print #1, a - 1
Next
Close #1
cmddelete.Enabled = False
cmdcancel.Enabled = False
End If
End Sub

Private Sub cmdcancel_Click()


cmddelete.Enabled = False
cmdcancel.Enabled = False
End Sub

Private Sub cmdmov_Click(Index As Integer)


If Index = 0 Then
If Not ad.BOF Then ad.MovePrevious
If ad.BOF And ad.RecordCount > 0 Then ad.MoveFirst
Else
If Not ad.EOF Then ad.MoveNext
If ad.EOF And ad.RecordCount > 0 Then ad.MoveLast
End If
End Sub

Private Sub Form_Load()


Dim path_d As String
path_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" &
App.Path & "\database\stud_data.mdb;"
Set db = New Connection
db.Open path_d
End Sub

Private Sub Text2_Change()


If Text2.Text = "" Then
cmdsearch.Enabled = False
Else
cmdsearch.Enabled = True
End If
End Sub

FEE
Dim WithEvents ad As Recordset, ad1 As Recordset, a As Integer, db As
Connection, i As Integer

Private Sub Combo1_Click()


Set ad = New Recordset
ad.Open "select batch_id,amount from q_s_bat where subject='" &
Combo1.Text & "'", db, adOpenStatic, adLockOptimistic
Dim tt As TextBox
For Each tt In Me.Text2
Set tt.DataSource = ad
Next
End Sub

Private Sub Combo2_Click()


Text3(5).Text = Combo2.Text
If Combo2.Text = "CHEQUE" Then
Text3(6).Visible = True
Label4.Visible = True
Else
Text3(6).Visible = False
Label4.Visible = False
End If
End Sub

Private Sub cmdsearch_Click()


Combo1.Clear
Set ad = New Recordset
If Text4.Text = "" Then Exit Sub
ad.Open "select stud_id,f_name,l_name,address,class,school from
q_stud where stud_id='" & Text4.Text & "'", db, adOpenStatic,
adLockOptimistic
Dim te As TextBox
For Each te In Me.Text1
Set te.DataSource = ad
Next
Set ad = New Recordset
ad.Open "select subject from q_s_bat where stud_id='" & Text4.Text &
"'", db, adOpenStatic, adLockOptimistic
If Not ad.RecordCount = 0 Then
For i = 1 To ad.RecordCount
Combo1.AddItem ad.Fields(0).Value
ad.MoveNext
Next
End If
End Sub

Private Sub cmdfee_Click()


If Combo1.Text = "" Then Exit Sub
Set ad = New Recordset
Set ad1 = New Recordset
ad.Open "select total_amt from q_fee_check where stud_id='" &
Text4.Text & "' and batch_id ='" & Text2(0).Text & "'", db,
adOpenStatic, adLockOptimistic
If ad.RecordCount = 0 Then
Adodc1.Recordset.AddNew
Open App.Path & "\log.dat" For Input As #1
For i = 1 To 6
Input #1, a
Next i
Close #1
Text3(0).Text = "F" & a + 1
Text3(1).Text = Text1(0).Text
Text3(2).Text = Text2(0).Text
Text3(3).Text = Format$(Date$, "mm/dd/yyyy")
Text3(4).Text = Text2(1).Text
Text3(5).Text = Combo2.Text
Combo1.Locked = True
cmdfee.Enabled = False
cmdsave.Visible = True
cmdcancel.Visible = True
Text3(3).Enabled = True
Combo2.Enabled = True
Exit Sub
Else
MsgBox "Paid", vbOKOnly + vbInformation, "coaching center"
Text3(3).Enabled = False
Combo2.Enabled = False
Exit Sub
End If
End Sub
Private Sub cmdsave_Click()
Adodc1.Recordset.Update
Open App.Path & "\log.dat" For Output As #1
For i = 1 To 6
Print #1, a + 1
Next
Close #1
Combo1.Locked = False
cmdfee.Enabled = True
cmdsave.Visible = False
cmdcancel.Visible = False
End Sub

Private Sub cmdcancel_Click()


Combo1.Locked = False
cmdfee.Enabled = True
cmdsave.Visible = False
cmdcancel.Visible = False
Adodc1.Recordset.CancelUpdate
End Sub

Private Sub cmdall_Click()


Dim liv As ListItem
ListView1.ListItems.Clear
Set ad = New Recordset
ad.Open "select stud_id,f_name,l_name,class from q_stud", db,
adOpenStatic, adLockOptimistic
If ad.RecordCount = 0 Then Exit Sub
For i = 1 To ad.RecordCount
Set lit = ListView1.ListItems.Add
ListView1.ListItems(i).Text = ad.Fields(0).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(1).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(2).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(3).Value
ad.MoveNext
Next
ListView1.Visible = True
End Sub

Private Sub Form_Load()


Dim path_d As String
path_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" &
App.Path & "\database\stud_data.mdb;"
Set db = New Connection
db.Open path_d
ListView1.View = lvwReport
ListView1.ColumnHeaders.Add 1, "ID", "ID"
ListView1.ColumnHeaders(1).Width = 500
ListView1.ColumnHeaders.Add 2, "f_name", "F_Name"
ListView1.ColumnHeaders.Add 3, "l_name", "L_Name"
ListView1.ColumnHeaders.Add 4, "class", "Class"
End Sub

Private Sub ListView1_Click()


Text4.Text = ListView1.SelectedItem
ListView1.Visible = False
End Sub

SALARY
Dim WithEvents ad As Recordset, db As Connection, a As Integer, i As
tnteger

Private Sub Combo1_Click()


Dim amt As Integer, stu As Integer, sal As Integer, tot As Integer
Set ad = New Recordset
ad.Open "select batch_id,valid_upto,amount,no_stud from q_batch
where subject='" & Combo1.Text & "'", db, adOpenStatic,
adLockOptimistic
If Not ad.RecordCount = 0 Then
Dim te As TextBox
For Each te In Me.Text2
Set te.DataSource = ad
Next
End If
Text5(1).Text = Text3.Text
Text5(2).Text = Text2(0).Text
amt = Int(Text2(2).Text)
stu = Int(Text2(3).Text)
sal = amt * stu
tot = sal * (60 / 100)
Text5(4).Text = tot
End Sub

Private Sub Combo2_Click()


If Combo2.Text = "TEACHERS" Then
For i = 0 To 3
Text1(i).Visible = True
Text2(i).Visible = True
Next
Text5(0).Visible = True
Text5(3).Visible = True
Text5(4).Visible = True
Combo1.Visible = True
Label5.Caption = "Teacher Details"
Label6.Visible = True
Label6.Caption = "Batch Details"
For i = 0 To 4
Text6(i).Visible = False
Next
Text4(0).Visible = False
Text4(2).Visible = False
Text4(3).Visible = False
For i = 0 To 11
Label1(i).Visible = True
Next
For i = 0 To 7
Label2(i).Visible = False
Next
ElseIf Combo2.Text = "STAFF" Then
For i = 0 To 3
Text1(i).Visible = False
Text2(i).Visible = False
Next
Text5(0).Visible = False
Text5(3).Visible = False
Text5(4).Visible = False
Combo1.Visible = False
Label5.Caption = "Staff Details"
Label6.Visible = False
For i = 0 To 4
Text6(i).Visible = True
Next
Text4(0).Visible = True
Text4(2).Visible = True
Text4(3).Visible = True
For i = 0 To 11
Label1(i).Visible = False
Next
For i = 0 To 7
Label2(i).Visible = True
Next
End If
End Sub

Private Sub cmdsearch_Click()


If Combo2.Text = "TEACHERS" Then
Combo1.Clear
If Text3.Text = "" Then Exit Sub
Set ad = New Recordset
ad.Open "select f_name,l_name,address,qualification from q_teacher
where teach_id='" & Text3.Text & "'", db, adOpenStatic,
adLockOptimistic
Dim te As TextBox
For Each te In Me.Text1
Set te.DataSource = ad
Next
ad.Close
Set ad = New Recordset
ad.Open "select subject from q_bat_teach where teach_id='" &
Text3.Text & "'", db, adOpenStatic, adLockOptimistic
If ad.RecordCount = 0 Then Exit Sub
For i = 1 To ad.RecordCount
Combo1.AddItem ad.Fields(0).Value
ad.MoveNext
Next
Else
Set ad = New Recordset
ad.Open "select f_name,l_name,address,salary,designation from
q_staff where staff_id='" & Text3.Text & "'", db, adOpenStatic,
adLockOptimistic
If ad.RecordCount = 0 Then Exit Sub
For Each te In Me.Text6
Set te.DataSource = ad
Next
Text4(1).Text = Text3.Text
Text4(2).Text = Format$(Date$, "dd/mm/yyyy")
Text4(3).Text = Format$(Date$, "mm")
End If
cmdsave.Enabled = True
cmdcancel.Enabled = True
End Sub

Private Sub cmdsave_Click()


If Combo2.Text = "TEACHERS" Then
Adodc1.Recordset.Update
ElseIf Combo2.Text = "STAFF" Then
Adodc2.Recordset.Update
End If
Open App.Path & "\log.dat" For Output As #1
For i = 1 To 7
Print #1, a + 1
Next
Close #1
cmdsave.Enabled = False
cmdcancel.Enabled = False
End Sub

Private Sub cmdcancel_Click()


Adodc1.Recordset.CancelUpdate
Adodc2.Recordset.CancelUpdate
cmdsave.Enabled = False
cmdcancel.Enabled = False
End Sub

Private Sub Form_Load()


Adodc1.Recordset.AddNew
Adodc2.Recordset.AddNew
Open App.Path & "\log.dat" For Input As #1
For i = 1 To 7
Input #1, a
Next i
Close #1
Text5(0).Text = "P" & a + 1
Text4(0).Text = "P" & a + 1
Dim path_d As String
path_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" &
App.Path & "\database\stud_data.mdb;"
Set db = New Connection
db.Open path_d
Text5(3).Text = Format$(Date$, "dd/mm/yyyy")
End Sub

QUERY STUDENT
Dim WithEvents ad As Recordset, WithEvents ad1 As Recordset, db As
Connection, i As Integer

Private Sub list_fun(st As String)


Dim lit As ListItem
ListView1.ListItems.Clear
Set ad = New Recordset
Select Case st
Case "all":
ad.Open "select stud_id,f_name,l_name,class,school from q_stud", db,
adOpenStatic, adLockOptimistic
Case "all_b":
ad.Open "select stud_id,f_name,l_name,class,school,batch_id from
q_s_b", db, adOpenStatic, adLockOptimistic
Case "NAME"
ad.Open "select stud_id,f_name,l_name,class,school,batch_id from
q_s_b where f_name='" & Text2.Text & "'", db, adOpenStatic,
adLockOptimistic
Case "BATCH ID"
ad.Open "select stud_id,f_name,l_name,class,school,batch_id from
q_s_b where batch_id='" & Text2.Text & "'", db, adOpenStatic,
adLockOptimistic
End Select
If ad.RecordCount = 0 Then Exit Sub
For i = 1 To ad.RecordCount
Set lit = ListView1.ListItems.Add
ListView1.ListItems(i).Text = ad.Fields(0).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(1).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(2).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(3).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(4).Value
If st = "all_b" Then
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(5).Value
End If
ad.MoveNext
Next
ListView1.Visible = True
Exit Sub
End Sub

Private Sub Combo1_Click()


If Not Combo1.Text = "ID" Then
ListView1.Visible = True
Else
ListView1.Visible = False
End If
End Sub

Private Sub cmdall_Click()


List1.Clear
ListView1.ListItems.Clear
Combo2.Clear
Dim lit As ListItem
Dim i As Integer
Set ad = New Recordset
If Combo1.Text = "ID" Then
ad.Open "select stud_id from q_stud", db, adOpenStatic,
adLockOptimistic
If ad.RecordCount = 0 Then Exit Sub
For i = 1 To ad.RecordCount
List1.AddItem ad.Fields(0).Value
ad.MoveNext
Next
cmdall.Visible = False
cmdsearch.Visible = False
List1.Visible = True
End If
If Combo1.Text = "NAME" Or Combo1.Text = "CLASS" Or Combo1.Text
= "SCHOOL" Then
Call list_fun("all")
ElseIf Combo1.Text = "BATCH" Then
Call list_fun("all_b")
End If
End Sub

Private Sub cmdsearch_Click()


ListView1.ListItems.Clear
Dim lit As ListItem
Set ad = New Recordset
Set ad1 = New Recordset
If Text2.Text = "" Then Exit Sub
Select Case Combo1.Text
Case "ID":
ad.Open "select * from q_stud where stud_id='" + Text2.Text + "'", db,
adOpenStatic, adLockOptimistic
Case "NAME"
ad.Open "select * from q_stud where f_name='" + Text2.Text + "'", db,
adOpenStatic, adLockOptimistic
Case "BATCH ID"
ad.Open "select * from q_batch_stud where batch_id='" + Text2.Text +
"'", db, adOpenStatic, adLockOptimistic
End Select
If ad.RecordCount = 0 Then
MsgBox "not found", vbOKOnly + vbInformation, "coaching center"
Exit Sub
ElseIf ad.RecordCount > 1 Then
Call list_fun(Combo1.Text)
Exit Sub
End If
Dim te As TextBox
For Each te In Me.Text1
Set te.DataSource = ad
Next

End Sub

Private Sub Form_Load()


Dim path_d As String
path_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" &
App.Path & "\database\stud_data.mdb;"
Set db = New Connection
db.Open path_d
ListView1.View = lvwReport
ListView1.ColumnHeaders.Add 1, "ID", "ID"
ListView1.ColumnHeaders(1).Width = 500
ListView1.ColumnHeaders.Add 2, "f_name", "F_Name"
ListView1.ColumnHeaders.Add 3, "l_name", "L_Name"
ListView1.ColumnHeaders.Add 4, "class", "Class"
ListView1.ColumnHeaders.Add 5, "School", "School"
ListView1.ColumnHeaders.Add 6, "Batch_id", "Batch ID"
End Sub

Private Sub List1_Click()


Text2.Text = List1.Text
List1.Visible = False
cmdall.Visible = True
cmdsearch.Visible = True
End Sub

Private Sub ListView1_dblClick()


Set ad = New Recordset
ad.Open "select * from q_stud where stud_id='" +
ListView1.SelectedItem.Text + "'", db, adOpenStatic, adLockOptimistic
If ad.RecordCount = 0 Then Exit Sub
Dim te As TextBox
For Each te In Me.Text1
Set te.DataSource = ad
Next
Combo2.Clear
Set ad1 = New Recordset
ad1.Open "select subject from q_s_bat where stud_id='" +
ListView1.SelectedItem + "'", db, adOpenStatic, adLockOptimistic
For i = 1 To ad1.RecordCount
Combo2.AddItem ad1.Fields(0).Value
ad1.MoveNext
Next
End Sub
QUERY BATCH
Dim WithEvents ad As Recordset, db As Connection, i As Integer

Private Sub list_fun(st As String)


Dim lit As ListItem
ListView1.ListItems.Clear
Set ad = New Recordset
Select Case st
Case "all":
ad.Open "select batch_id,subject,teach_id,valid_upto,max_limit,no_stud
from q_batch", db, adOpenStatic, adLockOptimistic
Case "SUBJECT"
ad.Open "select batch_id,subject,teach_id,valid_upto,max_limit,no_stud
from q_batch where subject='" & Text2.Text & "'", db, adOpenStatic,
adLockOptimistic
Case "TEACHER":
ad.Open "select batch_id,subject,teach_id,valid_upto,max_limit,no_stud
from q_batch where teach_id='" & Text2.Text & "'", db, adOpenStatic,
adLockOptimistic
Case "DAYS"
ad.Open "select batch_id,subject,teach_id,valid_upto,max_limit,no_stud
from q_batch where days='" & Text2.Text & "'", db, adOpenStatic,
adLockOptimistic
Case "TIMING"
ad.Open "select batch_id,subject,teach_id,valid_upto,max_limit,no_stud
from q_batch where time='" & Text2.Text & "'", db, adOpenStatic,
adLockOptimistic
Case "HOURS":
ad.Open "select batch_id,subject,teach_id,valid_upto,max_limit,no_stud
from q_batch where hours='" & Text2.Text & "'", db, adOpenStatic,
adLockOptimistic
Case "EXPIRED ON"
ad.Open "select batch_id,subject,teach_id,valid_upto,max_limit,no_stud
from q_batch where valid_upto='" & Text2.Text & "'", db,
adOpenStatic, adLockOptimistic
End Select
If ad.RecordCount = 0 Then Exit Sub
For i = 1 To ad.RecordCount
Set lit = ListView1.ListItems.Add
ListView1.ListItems(i).Text = ad.Fields(0).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(1).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(2).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(3).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(4).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(5).Value
ad.MoveNext
Next
End Sub

Private Sub cmdsearch_Click()


If Text2.Text = "" Then Exit Sub
ListView1.ListItems.Clear
Set ad = New Recordset
Select Case Combo1.Text
Case "ID":
ad.Open "select * from q_batch where batch_id='" & Text2.Text & "'",
db, adOpenStatic, adLockOptimistic
Case "SUBJECT"
ad.Open "select * from q_batch where subject='" & Text2.Text & "'",
db, adOpenStatic, adLockOptimistic
Case "TEACHER":
ad.Open "select * from q_batch where teach_id='" & Text2.Text & "'",
db, adOpenStatic, adLockOptimistic
Case "DAYS"
ad.Open "select * from q_batch where subject='" & Text2.Text & "'",
db, adOpenStatic, adLockOptimistic
Case "TIMING"
ad.Open "select * from q_batch where time='" & Text2.Text & "'", db,
adOpenStatic, adLockOptimistic
Case "HOURS":
ad.Open "select * from q_batch where hours='" & Text2.Text & "'", db,
adOpenStatic, adLockOptimistic
Case "EXPIRED ON"
ad.Open "select * from q_batch where valid_upto='" & Text2.Text & "'",
db, adOpenStatic, adLockOptimistic
End Select
If ad.RecordCount = 0 Then Exit Sub
If ad.RecordCount > 1 Then
list_fun (Combo1.Text)
Exit Sub
End If
Dim te As TextBox
For Each te In Me.Text1
Set te.DataSource = ad
Next
End Sub

Private Sub cmdall_Click()


ListView1.ListItems.Clear
Call list_fun("all")
End Sub

Private Sub Form_Load()


Dim path_d As String
path_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" &
App.Path & "\database\stud_data.mdb;"
Set db = New Connection
db.Open path_d
ListView1.View = lvwReport
ListView1.ColumnHeaders.Add 1, "ID", "ID"
ListView1.ColumnHeaders(1).Width = 500
ListView1.ColumnHeaders.Add 2, "subject", "Subject"
ListView1.ColumnHeaders.Add 3, "teach_id", "Teach Id"
ListView1.ColumnHeaders.Add 4, "valid_upto", "Expired On"
ListView1.ColumnHeaders.Add 5, "max", "Max Size"
ListView1.ColumnHeaders.Add 6, "no_stu", "No of Student"
End Sub

Private Sub ListView1_dblClick()


Set ad = New Recordset
ad.Open "select * from q_batch where batch_id='" &
ListView1.SelectedItem & "'", db, adOpenStatic, adLockOptimistic
If ad.RecordCount = 0 Then Exit Sub
Dim te As TextBox
For Each te In Me.Text1
Set te.DataSource = ad
Next
End Sub

QUERY TEACHER
Dim db As Connection, WithEvents ad As Recordset, i As Integer

Private Sub list_fun(st As String)


Dim lit As ListItem
ListView1.ListItems.Clear
Set ad = New Recordset
If st = "all" Then
ad.Open "select teach_id,f_name,l_name,qualification from q_teacher",
db, adOpenStatic, adLockOptimistic
Else
ad.Open "select teach_id,f_name,l_name,qualification from q_teacher
where " & st & " ='" + Text2.Text + "'", db, adOpenStatic,
adLockOptimistic
End If
For i = 1 To ad.RecordCount
Set lit = ListView1.ListItems.Add
ListView1.ListItems(i).Text = ad.Fields(0).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(1).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(2).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(3).Value
ad.MoveNext
Next
End Sub

Private Sub combo_fun()


Set ad = New Recordset
ad.Open "select batch_id,subject from q_bat_teach where teach_id='"
& Text1(0).Text & "'", db, adOpenStatic, adLockOptimistic
If ad.RecordCount = 0 Then
Command3.Visible = False
Combo2.Visible = False
Combo3.Visible = False
Label11.Visible = False
Label12.Visible = False
Exit Sub
Else
Command3.Visible = True
Combo2.Visible = True
Combo3.Visible = True
Label11.Visible = True
Label12.Visible = True
End If
Combo2.Clear
Combo3.Clear
For i = 1 To ad.RecordCount
Combo2.AddItem ad.Fields(1).Value
Combo3.AddItem ad.Fields(0).Value
ad.MoveNext
Next
End Sub

Private Sub Combo1_Click()


If Combo1.Text = "ID" Or Combo1.Text = "BATCH" Then
ListView1.Visible = False
Else
ListView1.Visible = True
End If
End Sub

Private Sub cmdall_Click()


List1.Clear
Set ad = New Recordset
If Combo1.Text = "ID" Then
ad.Open "select teach_id from q_teacher", db, adOpenStatic,
adLockOptimistic
For i = 1 To ad.RecordCount
List1.AddItem ad.Fields(0).Value
ad.MoveNext
Next
cmdall.Visible = False
List1.Visible = True
ElseIf Combo1.Text = "NAME" Then
Call list_fun("all")
End If
End Sub

Private Sub cmdsearch_Click()


Dim st As String
Set ad = New Recordset
If Text2.Text = "" Then Exit Sub
If Combo1.Text = "ID" Then
ad.Open "select * from q_teacher where teach_id='" + Text2.Text +
"'", db, adOpenStatic, adLockOptimistic
ElseIf Combo1.Text = "NAME" Then
ad.Open "select * from q_teacher where f_name='" + Text2.Text + "'",
db, adOpenStatic, adLockOptimistic
ElseIf Combo1.Text = "QUALIFICATION" Then
ad.Open "select * from q_teacher where qualification='" + Text2.Text
+ "'", db, adOpenStatic, adLockOptimistic
ElseIf Combo1.Text = "BATCH" Then
ad.Open "select * from q_teach_batch where batch_id='" + Text2.Text
+ "'", db, adOpenStatic, adLockOptimistic
End If
If Combo1.Text = "NAME" Then
st = "f_name"
ElseIf Combo1.Text = "QUALIFICATION" Then
st = "qualification"
End If
If ad.RecordCount = 0 Then
Exit Sub
ElseIf ad.RecordCount > 1 Then
Call list_fun(st)
Exit Sub
End If
Dim te As TextBox
For Each te In Me.Text1
Set te.DataSource = ad
Next
Call combo_fun
End Sub

Private Sub Command3_Click()


Set ad = New Recordset
ad.Open "select pay_id,pay_date,salary_amt from q_sal_teach where
teach_id='" & Text1(0).Text & "' and batch_id='" & Combo3.Text & "'",
db, adOpenStatic, adLockOptimistic
If ad.RecordCount = 0 Then
MsgBox "PAID", vbOKOnly + vbInformation, "coaching center"
For i = 0 To 2
Text3(i).Visible = False
Next
Label13.Visible = False
Label14.Visible = False
Label15.Visible = False
Exit Sub
Else
Dim te As TextBox
For Each te In Me.Text3
Set te.DataSource = ad
Next
For i = 0 To 2
Text3(i).Visible = True
Next
Label13.Visible = True
Label14.Visible = True
Label15.Visible = True
End If
End Sub

Private Sub Form_Load()


Dim path_d As String
path_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" &
App.Path & "\database\stud_data.mdb;"
Set db = New Connection
db.Open path_d
ListView1.View = lvwReport
ListView1.ColumnHeaders.Add 1, "ID", "ID"
ListView1.ColumnHeaders(1).Width = 500
ListView1.ColumnHeaders.Add 2, "f_name", "F_Name"
ListView1.ColumnHeaders.Add 3, "l_name", "L_Name"
ListView1.ColumnHeaders.Add 4, "qualification", "Qualification"
End Sub

Private Sub List1_Click()


Text2.Text = List1.Text
List1.Visible = False
cmdall.Visible = True
End Sub

Private Sub ListView1_dblClick()


Set ad = New Recordset
ad.Open "select * from q_teacher where teach_id='" +
ListView1.SelectedItem + "'", db, adOpenStatic, adLockOptimistic
If ad.RecordCount = 0 Then Exit Sub
Dim te As TextBox
For Each te In Me.Text1
Set te.DataSource = ad
Next
Call combo_fun
End Sub

QUERY STAFF
Dim db As Connection, WithEvents ad As Recordset, i As Integer

Private Sub list_fun(st As String)


Dim lit As ListItem
ListView1.ListItems.Clear
Set ad = New Recordset
Select Case st
Case "all":
ad.Open "select staff_id,f_name,l_name,address,designation from
q_staff", db, adOpenStatic, adLockOptimistic
Case "NAME":
ad.Open "select staff_id,f_name,l_name,address,designation from
q_staff where f_name='" & Text2.Text & "'", db, adOpenStatic,
adLockOptimistic
Case "DESIGNATION":
ad.Open "select staff_id,f_name,l_name,address,designation from
q_staff where designation='" & Text2.Text & "'", db, adOpenStatic,
adLockOptimistic
End Select
For i = 1 To ad.RecordCount
Set lit = ListView1.ListItems.Add
ListView1.ListItems(i).Text = ad.Fields(0).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(1).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(2).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(3).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(4).Value
ad.MoveNext
Next
End Sub

Private Sub cmdall_Click()


Call list_fun("all")
End Sub

Private Sub cmdsearch_Click()


Dim i As Integer, lit As ListItem, st As String
ListView1.ListItems.Clear
If Text2.Text = "" Then Exit Sub
Set ad = New Recordset
If Combo1.Text = "ID" Then
ad.Open "select * from q_staff where staff_id='" & Text2.Text & "'", db,
adOpenStatic, adLockOptimistic
ElseIf Combo1.Text = "NAME" Then
ad.Open "select * from q_staff where f_name='" & Text2.Text & "'", db,
adOpenStatic, adLockOptimistic
st = "NAME"
ElseIf Combo1.Text = "DESIGNATION" Then
ad.Open "select * from q_staff where designation='" & Text2.Text &
"'", db, adOpenStatic, adLockOptimistic
st = "DESIGNATION"
End If
If ad.RecordCount = 0 Then
Exit Sub
ElseIf ad.RecordCount > 1 Then
Call list_fun(st)
Exit Sub
End If
Dim te As TextBox
For Each te In Me.Text1
Set te.DataSource = ad
Next
End Sub

Private Sub Form_Load()


Dim path_d As String
path_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" &
App.Path & "\database\stud_data.mdb;"
Set db = New Connection
db.Open path_d
ListView1.View = lvwReport
ListView1.ColumnHeaders.Add 1, "ID", "ID"
ListView1.ColumnHeaders(1).Width = 500
ListView1.ColumnHeaders.Add 2, "f_name", "F_Name"
ListView1.ColumnHeaders.Add 3, "l_name", "L_Name"
ListView1.ColumnHeaders.Add 4, "address", "Address"
ListView1.ColumnHeaders.Add 5, "designation", "Designation"
End Sub

Private Sub ListView1_dblClick()


Set ad = New Recordset
ad.Open "select * from q_staff where staff_id='" &
ListView1.SelectedItem & "'", db, adOpenStatic, adLockOptimistic
If ad.RecordCount = 0 Then Exit Sub
Dim te As TextBox
For Each te In Me.Text1
Set te.DataSource = ad
Next
End Sub

STUDENT REPORTS
Dim WithEvents ad As Recordset, db As Connection, i As Integer

Private Sub Combo1_Click()


If Combo1.Text = "ID" Then
cmdall.Visible = False
cmdgenerate.Visible = True
Else
cmdall.Visible = True
cmdgenerate.Visible = False
End If
End Sub

Private Sub cmdgenerate_Click()


If Text1.Text = "" Then Exit Sub
If Combo1.Text = "ID" Then
datae.stu_pro (Text1.Text)
stud_profile.Show
End If
End Sub

Private Sub cmdall_Click()


Dim i As Integer
Dim lv As ListItem
Set ad = New Recordset
ad.Open "select stud_id,f_name,l_name,class,school from student", db,
adOpenStatic, adLockOptimistic
If ad.RecordCount = 0 Then Exit Sub
For i = 1 To ad.RecordCount
Set lv = ListView1.ListItems.Add
ListView1.ListItems(i).Text = ad.Fields(0).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(1).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(2).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(3).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(4).Value
ad.MoveNext
Next
ListView1.Enabled = True
End Sub

Private Sub cmdsearch_Click()


Dim i As Integer
Dim lv As ListItem
Set ad = New Recordset
Select Case Combo1.Text
Case "NAME":
ad.Open "select stud_id,f_name,l_name,class,school from student
where f_name='" & Text1.Text & "'", db, adOpenStatic,
adLockOptimistic
Case "CLASS"
ad.Open "select stud_id,f_name,l_name,class,school from student
where class='" & Text1.Text & "'", db, adOpenStatic, adLockOptimistic
Case "SCHOOL"
ad.Open "select stud_id,f_name,l_name,class,school from student
where school='" & Text1.Text & "'", db, adOpenStatic,
adLockOptimistic
End Select
If ad.RecordCount = 0 Then Exit Sub
For i = 1 To ad.RecordCount
Set lv = ListView1.ListItems.Add
ListView1.ListItems(i).Text = ad.Fields(0).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(1).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(2).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(3).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(4).Value
ad.MoveNext
Next
ListView1.Enabled = True
End Sub

Private Sub cmdclass_Click()


If Text2.Text = "" Then Exit Sub
datae.Class (Text2.Text)
class_stud.Show
End Sub

Private Sub cmdallstud_Click()


all_stu.Show
End Sub

Private Sub cmdschoolstud_Click()


If Text3.Text = "" Then Exit Sub
datae.school (Text3.Text)
school_stu.Show
End Sub

Private Sub Form_Load()


Dim path_d As String
path_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" &
App.Path & "\database\stud_data.mdb;"
Set db = New Connection
db.Open path_d
ListView1.View = lvwReport
ListView1.ColumnHeaders.Add 1, "ID", "ID"
ListView1.ColumnHeaders(1).Width = 500
ListView1.ColumnHeaders.Add 2, "f_name", "F_Name"
ListView1.ColumnHeaders.Add 3, "l_name", "L_Name"
ListView1.ColumnHeaders.Add 4, "class", "Class"
ListView1.ColumnHeaders.Add 5, "School", "School"
End Sub

Private Sub ListView1_dblClick()


datae.stu_pro (ListView1.SelectedItem.Text)
stud_profile.Show
End Sub

BATCH REPORTS
Dim db As Connection, WithEvents ad As Recordset
Private Sub Combo1_Click()
If Combo1.Text = "ID" Then
cmdsearch.Visible = False
cmdgenerate.Visible = True
Else
cmdgenerate.Visible = False
cmdsearch.Visible = True
End If
End Sub

Private Sub cmdgenerate_Click()


If Text1.Text = "" Then Exit Sub
If Combo1.Text = "ID" Then
datae.batch_detail (Text1.Text)
batch_d.Show
End If
End Sub

Private Sub cmdsearch_Click()


Dim i As Integer, lit As ListItem
ListView1.ListItems.Clear
If Text1.Text = "" Then Exit Sub
Set ad = New Recordset
Select Case Combo1.Text
Case "SUBJECT"
ad.Open "select batch_id,subject,teach_id,valid_upto,max_limit,no_stud
from q_batch where subject='" & Text1.Text & "'", db, adOpenStatic,
adLockOptimistic
Case "TEACHER":
ad.Open "select batch_id,subject,teach_id,valid_upto,max_limit,no_stud
from q_batch where teach_id='" & Text1.Text & "'", db, adOpenStatic,
adLockOptimistic
Case "DAYS"
ad.Open "select batch_id,subject,teach_id,valid_upto,max_limit,no_stud
from q_batch where days='" & Text1.Text & "'", db, adOpenStatic,
adLockOptimistic
Case "TIMING"
ad.Open "select batch_id,subject,teach_id,valid_upto,max_limit,no_stud
from q_batch where time='" & Text1.Text & "'", db, adOpenStatic,
adLockOptimistic
Case "HOURS":
ad.Open "select batch_id,subject,teach_id,valid_upto,max_limit,no_stud
from q_batch where hours='" & Text1.Text & "'", db, adOpenStatic,
adLockOptimistic
Case "EXPIRED ON"
ad.Open "select batch_id,subject,teach_id,valid_upto,max_limit,no_stud
from q_batch where valid_upto='" & Text1.Text & "'", db,
adOpenStatic, adLockOptimistic
End Select
If ad.RecordCount = 0 Then Exit Sub
For i = 1 To ad.RecordCount
Set lit = ListView1.ListItems.Add
ListView1.ListItems(i).Text = ad.Fields(0).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(1).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(2).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(3).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(4).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(5).Value
ad.MoveNext
Next
ListView1.Enabled = True
End Sub

Private Sub cmdallbatch_Click()


all_batch.Show
End Sub

Private Sub cmdsubbatch_Click()


If Text2.Text = "" Then Exit Sub
datae.subject (Text2.Text)
batch_sub.Show
End Sub

Private Sub cmdteachbatch_Click()


If Text3.Text = "" Then Exit Sub
datae.teach_id (Text3.Text)
batch_teach.Show
End Sub

Private Sub Form_Load()


Dim path_d As String
path_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" &
App.Path & "\database\stud_data.mdb;"
Set db = New Connection
db.Open path_d
ListView1.View = lvwReport
ListView1.ColumnHeaders.Add 1, "ID", "ID"
ListView1.ColumnHeaders(1).Width = 500
ListView1.ColumnHeaders.Add 2, "subject", "Subject"
ListView1.ColumnHeaders.Add 3, "teach_id", "Teach Id"
ListView1.ColumnHeaders.Add 4, "valid_upto", "Expired On"
ListView1.ColumnHeaders.Add 5, "max", "Max Size"
ListView1.ColumnHeaders.Add 6, "no_stu", "No of Student"
End Sub

Private Sub ListView1_dblClick()


datae.batch_detail (ListView1.SelectedItem)
batch_d.Show
End Sub

TEACHER REPORTS
Dim WithEvents ad As Recordset, db As Connection

Private Sub Combo1_Click()


If Combo1.Text = "ID" Then
cmdsearch.Visible = False
cmdgenerate.Visible = True
Else
cmdsearch.Visible = True
cmdgenerate.Visible = False
End If
End Sub

Private Sub cmdgenerate_Click()


If Text1.Text = "" Then Exit Sub
If Combo1.Text = "ID" Then
datae.teacher_pro (Text1.Text)
teach_pro.Show
End If
End Sub

Private Sub cmdsearch_Click()


Dim lit As ListItem, i As Integer
ListView1.ListItems.Clear
Set ad = New Recordset
If Combo1.Text = "NAME" Then
ad.Open "select * from q_teacher where f_name='" + Text1.Text + "'",
db, adOpenStatic, adLockOptimistic
ElseIf Combo1.Text = "QUALIFICATION" Then
ad.Open "select * from q_teacher where qualification='" + Text1.Text
+ "'", db, adOpenStatic, adLockOptimistic
ElseIf Combo1.Text = "BATCH" Then
ad.Open "select * from q_teach_batch where batch_id='" + Text1.Text
+ "'", db, adOpenStatic, adLockOptimistic
ElseIf Combo1.Text = "SUBJECT" Then
ad.Open "select * from q_teach_batch where subject='" + Text1.Text +
"'", db, adOpenStatic, adLockOptimistic
End If
If ad.RecordCount = 0 Then Exit Sub
For i = 1 To ad.RecordCount
Set lit = ListView1.ListItems.Add
ListView1.ListItems(i).Text = ad.Fields(0).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(1).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(2).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(3).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(4).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(5).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(6).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(7).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(8).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(9).Value
ad.MoveNext
Next
ListView1.Enabled = True
End Sub

Private Sub cmdallteach_Click()


all_teach.Show
End Sub

Private Sub cmdqualif_Click()


If Text2.Text = "" Then Exit Sub
datae.teach_qual (Text2.Text)
teach_qual.Show
End Sub

Private Sub cmdsubjteach_Click()


If Text3.Text = "" Then Exit Sub
datae.teach_subj (Text3.Text)
teach_sub.Show
End Sub

Private Sub Form_Load()


Dim path_d As String
path_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" &
App.Path & "\database\stud_data.mdb;"
Set db = New Connection
db.Open path_d
ListView1.View = lvwReport
ListView1.ColumnHeaders.Add 1, "ID", "ID"
ListView1.ColumnHeaders(1).Width = 500
ListView1.ColumnHeaders.Add 2, "f_name", "F_Name"
ListView1.ColumnHeaders.Add 3, "l_name", "L_Name"
ListView1.ColumnHeaders.Add 4, "address", "Address"
ListView1.ColumnHeaders.Add 2, "gender", "Gender"
ListView1.ColumnHeaders.Add 3, "dob", "DOB"
ListView1.ColumnHeaders.Add 4, "father", "Father's Name"
ListView1.ColumnHeaders.Add 2, "resi_pho", "Resi Pho"
ListView1.ColumnHeaders.Add 3, "mibile", "Mobile"
ListView1.ColumnHeaders.Add 4, "qualification", "Qualification"
End Sub

Private Sub ListView1_dblClick()


datae.teacher_pro (ListView1.SelectedItem)
teach_pro.Show
End Sub

STAFF REPORTS
Dim WithEvents ad As Recordset, db As Connection

Private Sub Combo1_Click()


If Combo1.Text = "ID" Then
cmdsearch.Visible = False
cmdgenerate.Visible = True
Else
cmdsearch.Visible = True
cmdgenerate.Visible = False
End If
End Sub

Private Sub cmdgenerate_Click()


If Text1.Text = "" Then Exit Sub
If Combo1.Text = "ID" Then
datae.staff_profile (Text1.Text)
staff_pro.Show
End If
End Sub

Private Sub cmdsearch_Click()


Dim lit As ListItem, i As Integer
ListView1.ListItems.Clear
Set ad = New Recordset
If Combo1.Text = "NAME" Then
ad.Open "select * from q_staff where f_name='" & Text1.Text & "'", db,
adOpenStatic, adLockOptimistic
ElseIf Combo1.Text = "DESIGNATION" Then
ad.Open "select * from q_staff where designation='" & Text1.Text &
"'", db, adOpenStatic, adLockOptimistic
End If
If ad.RecordCount = 0 Then Exit Sub
For i = 1 To ad.RecordCount
Set lit = ListView1.ListItems.Add
ListView1.ListItems(i).Text = ad.Fields(0).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(1).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(2).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(3).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(4).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(5).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(6).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(7).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(8).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(9).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(10).Value
ad.MoveNext
Next
ListView1.Enabled = True
End Sub

Private Sub cmdallstaff_Click()


If Text2.Text = "" Then Exit Sub
datae.st_designation (Text2.Text)
staf_desig.Show
End Sub

Private Sub cmddesig_Click()


all_staff.Show
End Sub

Private Sub Form_Load()


Dim path_d As String
path_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" &
App.Path & "\database\stud_data.mdb;"
Set db = New Connection
db.Open path_d
ListView1.View = lvwReport
ListView1.ColumnHeaders.Add 1, "ID", "ID"
ListView1.ColumnHeaders(1).Width = 500
ListView1.ColumnHeaders.Add 2, "f_name", "F_Name"
ListView1.ColumnHeaders.Add 3, "l_name", "L_Name"
ListView1.ColumnHeaders.Add 4, "address", "Address"
ListView1.ColumnHeaders.Add 5, "gender", "Gender"
ListView1.ColumnHeaders.Add 6, "dob", "DOB"
ListView1.ColumnHeaders.Add 7, "father", "Father's Name"
ListView1.ColumnHeaders.Add 8, "resi", "Resi Phone"
ListView1.ColumnHeaders.Add 9, "mob", "Mobile"
ListView1.ColumnHeaders.Add 10, "salary", "Salary"
ListView1.ColumnHeaders.Add 11, "designation", "Designation"
End Sub

Private Sub ListView1_dblClick()


datae.staff_profile (ListView1.SelectedItem)
staff_pro.Show
End Sub
Snapshots

LOGIN SCREEN
MAIN MENU
STUDENT SIDEBAR
BATCH SIDEBAR
TEACHER SIDEBAR
STAFF SIDEBAR
TRANSACTION SIDEBAR
QUERIES SIDEBAR
REPORTS SIDEBAR
PASSWORD SCREEN
DATABASE SCREEN
ADD STUDENT
EDIT STUDENT
DELETE STUDENT
NEW BATCH
EDIT BATCH
DELETE BATCH
ADD TEACHER
EDIT TEACHER
DELETE TEACHER
ADD STAFF
EDIT STAFF
DELETE STAFF
FEE
SALARY
QUERY STUDENT
QUERY BATCH
QUERY TEACHER
QUERY STAFF
STUDENT REPORTS
BATCH REPORTS
TEACHER REPORTS
STAFF REPORTS
Chapter 5

Testing & Test Result


5.1 Software Testing

Software testing is a critical element of software quality assurance and


represents the ultimate review of specification, design and code generation.
It is the process of executing program with the intention of finding errors.
However, testing cannot show the absence of errors, it can only show that
errors are present. According to this definition, there is a fundamental entity
‘errors are present within the software under test’. Software testing is
becoming so increasingly important in the earlier part of software life cycle,
aiming to discover errors before they are deeply embedded within the
systems.

5.1.1 Why should we test?

Although software testing is itself an expensive activity, yet launching of


software without testing may lead to cost potentially much higher than that
of testing, specially in systems where human safety is involved.

In most systems, however, it is the cost factor which plays a major role. It is
both that driving force and limiting factor as well. In the software life cycle
the earlier the errors are discovered and removed, the lower is the cost of
their removal. The most damaging errors are those, which are not discovered
during the testing process and therefore remain when the system ‘goes live’.
5.1.2 What should we test?

The essence of software testing is to determine a set of test cases for the item
being tested. A test case has an identity, and is associated with program
behavior. A good test case is one that has a high probability of finding an as
yet discovered error. A successful test case unearths an undiscovered error.
A test case has a set of inputs, a list of expected outputs. Inputs are of two
types- pre conditions and the actual inputs that are identified by some testing
methods. Expected outputs are also of two types- post conditions and actual
outputs.

5.1.3 Testing Principles

1) All tests should be traceable to customer requirements.


2) Test should be planned long before testing begins.
3) Testing should begin “in the small” and progress toward testing “in
the large”.
4) Exhaustive testing is not possible.
5) To be most effective, testing should be conducted by an independent
third party.
5.2 Testing criteria

5.2.1 Functional testing

Testing based on the functionality of the program is known as functional


testing. Thus, functional testing refers to testing, which involves only
observing the output for certain input values. There is no need to analyze the
code, which produces the output. Therefore, functional testing is also
referred to black box testing, which contents of the black box are not
known. Functionality of the black box is understood completely in terms of
its inputs & outputs as shown in fig below. Here we are interested in
functionality rather than internal structure of the code.

System
Input test Output test
under
data data
test

Functional testing can be done in the following ways:-


1. Boundary value analysis.
2. Equivalence class testing.
3. Decision table testing.
4. Cause effect graphing technique.

5.2.2 Structural testing


Structural testing permits us to examine the internal structure of the
program. Here, we do not pay attention to specifications. Therefore, it is also
known as white box testing. The knowledge to the internal structure of the
code can be used to find the number of test cases required to guarantee a
given level of test coverage.

Structural testing can be performed in following ways:-


1. Path testing.
2. Graph testing.
3. Data flow testing.
4. Mutation testing.

5.2.3 Unit testing

Testing in general cannot be expected to catch every error in the program.


The same is true for unit testing. By definition, it only tests the functionality
of the units themselves. Therefore, it may not catch integration errors,
performance problems or other system-wide issues. In addition, for any non-
trivial system, it is not feasible to anticipate and test all possible inputs to the
program unit under study. Unit testing is more effective if it is used in
conjunction with other software testing activities.

It is unrealistic to test all possible input combinations for any non-trivial


piece of software. Like all forms of software testing, unit tests can only show
the presence of errors; it cannot show the absence of errors.

To obtain the intended benefits from unit testing, a rigorous sense of


discipline is needed throughout the software development process. It is
essential to keep careful records, not only of the tests that have been
performed, but also of all changes that have been made to the source code of
this or any other unit in the software. Use of a version control system is
essential. If a later version of the unit fails a particular test that it had
previously passed, the version-control software can provide a list of the
source code changes (if any) that have been applied to the unit since that
time.

5.2.4 System testing

System testing of software is testing conducted on a complete, integrated


system to evaluate the system's compliance with its specified requirements.
System testing falls within the scope of black box testing, and as such,
should require no knowledge of the inner design of the code or logic.

As a rule, system testing takes, as its input, all of the "integrated" software
components that have successfully passed integration testing and also the
software system itself integrated with any applicable hardware system(s).
The purpose of integration testing is to detect any inconsistencies between
the software units that are integrated together (called assemblages) or
between any of the assemblages and the hardware. System testing is a more
limiting type of testing; it seeks to detect defects both within the "inter-
assemblages" and also within the system as a whole.

5.2.5 Integration testing

Integration testing (sometimes called Integration and Testing, abbreviated


I&T) is the phase of software testing in which individual software modules
are combined and tested as a group. It follows unit testing and precedes
system testing.

Integration testing takes as its input modules that have been unit tested,
groups them in larger aggregates, applies tests defined in an integration test
plan to those aggregates, and delivers as its output the integrated system
ready for system testing.

The purpose of integration testing is to verify functional, performance and


reliability requirements placed on major design items. These "design items",
i.e. assemblages (or groups of units), are exercised through their interfaces
using black box testing, success and error cases being simulated via
appropriate parameter and data inputs. Simulated usage of shared data areas
and inter-process communication is tested and individual subsystems are
exercised through their input interface. Test cases are constructed to test that
all components within assemblages interact correctly, for example across
procedure calls or process activations, and this is done after testing
individual modules, i.e. unit testing.
Chapter 6

REPORTS
Student Report
List of Students
Conclusion
This project is use to meet the requirement of the institute. It has been
developed using Microsoft visual basic 6.0 and Microsoft Access keeping in
mind the specification of the system. All the expectation of institution is
met.
All the problem that were listed in the problem definition have been
corrected and certain extra features have been added to make sure changes
can be incorporated to the system at latter stages.
Overall the project teaches us the essential skills like:
1. Using system analysis and design techniques like data flow diagram in
designing the system.
2. Understanding Microsoft visual basic 6.0 and Microsoft Access.
Future Scope of the Project

The future scope of the application is very vast, the project may include the
graphical tools, charts graph etc. which can give a visual effect & one can
easily find out one of the things at just one view only.

This application is very useful for any organization, which can be access on
the intranet. All the project details are stored in the database & displays to
the manager very easily, by which he or she can manage his task & team
members very easily.

This project maintains huge database; the user has to take the large database
like SQL server or Oracle.
BIBLOGRAPHY

Names of some of the books / publications referred to are mentioned:

Name of the Author: K.K. AGGARWAL


Name of the Book: SOFTWARE ENGINEERING
Publisher: NEW AGE INTERNATIONAL PUBLISHERS

Name of the Author: PRESSMAN


Name of the Book: SOFTWARE ENGINEERING
Publisher: WILSON PUBLICATIONS

Name of the Author: EVANGELOS PETRONTSOS


Name of the Book: MASTERING VB 6
Publisher: BPB PUBLICATIONS

Name of the Author: SUSAN SALES HARKINS


Name of the Book: USING MS ACCESS 2000
Publisher: PRENTICE HALL INDIA
Name of the Author: STEVEN HOLZNER
Name of the Book: VISUAL BASIC 6 PROGRAMMING
Publisher: DREAMTECH PRESS

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