Praveen Kumar V
Praveen Kumar V
Praveen Kumar V
SUBMITTED BY:
BIDARAHALLI, BANGALORE - 49
DECLARATION
“MS. RAJI PAUL T”, Lecturer, Department of Bachelor of Computer Application and this
report does not form any part of any previous dissertations or reports previously submitted to
this University or any other Universities for the award of degree or diploma.
Name:
We take this opportunity to express our deep sense of gratitude to our founder Chairman
Dr. Venkatapathi S.M
We express our sincere thanks to our respected Principal, Prof. Dr. Roopa T N, Director of
East Point College of Higher Education and Prof. Chaya Devi H B, HOD of Management
Science for providing all necessary help during our project work.
We would like to thank my friends, staff and all other who have directly and indirectly helped
me in the successful completion of this project.
Date:
Place: Bangalore
Name:
1 INTRODUCTION 1-4
3 INTRODUCTION TO SOFTWARE 11 - 12
ENGINEERING
6 E – R DIAGRAMS 19 - 23
1
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
PROJECT INTRODUCTION
Payroll system is the heart of any human resource system of an organization. The
solution has to take care of the calculation of salary as per rules of the company, income
tax calculation and various deductions to be done from the salary including statutory
deductions like Income tax and provident fund deductions. It has to generate pay-slip,
cheque summary and MIS reports.
It is understood that we are tired of managing thousand of odd papers, pay slips, payroll
reports, and salary details and so on. Imagine that we have a payroll processing system
which will generate our pay slips and payroll reports within seconds. We can help others
automated your payroll system by developing a customized payroll application that suits
your specific requirements.
Purpose:
Main aim of developing Employee Payroll Management is to provide an easy way not
only to automate all functionalities involved managing leaves and Payroll for the
employees of Company, but also to provide full functional reports to management of
Company with the details about usage of leave facility.
We are committed to bring the best way of management in the various forms of EPM.
We understand that EPM in not a product to be sold, it is a tool to manage the inner
operation of Company related to employee leave and Payroll.
2
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Scope:
This Application works in Multiple PC’s installed on multiple Computers but sharing
same database by which users of different department can use it sitting at different
locations simultaneously.
But in future we can make the Application where the database will be hosted in order to
manage the all departments which will be located in different places and by keeping
domain of Application as Online.
Benefits:
3
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Hardware:
RAM: 4 GB
Hard Disk: 1 TB
Keypad: DELL
Mouse: DELL
Software:
Application Software:
Data Base:
4
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
5
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
A database is a collection of data as well as programs required to manage that data. The
data is stored in a tabular format, across rows and columns, in much the same way as in
the spread sheet. The difference lies in the fact that a Database Management System takes
care of complex calculations storing and other tasks that perhaps could not be performed
using a spread sheet.
Moreover most DBMS provide security for the data within the database. Complex
validations can also be taken care of by a DBMS, to ensure that entered into system is
valid.
We describe that the need for storing data within tables. In this context we briefly
outlined the evolution of the database. In this session, we deal with how to identify the
tables and the fields needed in application. We have user look at tables and related topics
such as data types and constraints. By the end of this session, we will have gone through
the steps involved in the creation of tables.
6
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
* Login
* COMPANY MASTER
Company
Branch
Department
Designation
Grade
* EMPLOYEE
Employee Details
* LEAVE
Leave Master
Leave Availed
* LOAN
Loan Master
Loan Availed
* SALARY
Payroll Generation
7
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
In the session above, we already worked with identifying the tables and fields that fit into
each of this table. In the session that follow, we shall have a look at the data types, field
size and some of the constraints that can be enforced in MS Access XP.
The field name, field size, constraints and other properties comprise the “Structure” of
the table. It forms the basis on which data will be entered and maintained. This can be
considered as ‘Conceptual view’ to a table in a relational database. Visual DBMS like
MS Access provide a view called the ‘design view’ to enable users to create and modify
the structure of a table. For a person who used a non-Visual DBMS.
Data type
In different types of data items and corresponding field names have to be defined at the
time of creating the table.
This data type is used to store a combination of characters and numeric data. In
some RDBMS, alphanumeric data type can be of two types. One having fixed size
and the other having a variable size.
In MS-Access, the alphanumeric data type is referred to as the ‘text data type’
And is of variable length. It can hold up to a maximum of 255 characters.
8
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
a) Numeric:
The numeric data type is used to store numbers. Most RDBMS have several
subcategories for the number data type. Each of these could be data types in them.
The most common among these are:
Numeric Description
b) Date/time:
This data type is common to most RDMS, and is used to store date and time and
stores time. Again, the format a date is stored differs depending on the RDBMS.
c) Boolean:
d) Memo:
Some RDBMS, like MS-Access also provide a data type for storing data that exceeds the
amount that can be stored in a ‘text’ field. As discussed earlier, a ‘text’ field in MS-
9
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Access can store up to 255 characters. To store anything that exceeds that, a memo data
type can be used. This data type allows the user to store up to 64000 characters.
Enforcing Constraints
A ‘Primary key’ constraint is one, which ensures that the user does not enter duplicate
values in the field or set of field on which the constraint is enforced.
A ‘Primary key’ constraint when placed on a field, or combination of fields, makes that
particular field or set of fields as the ‘Primary key’.
Check Constraints
Most RDBMS automatically validate value based on a field’s data type, i.e, text value is
not allowed into a date or numeric field. Some validation rules or ‘check constraints’ that
check the entering the database.
DEFAULT CONSTRAINT
This constraint is used to specify a value that will be displayed and stored in a
field by default, in case the user does not enter any value.
10
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
11
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Problem analysis.
System requirements specification.
12
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
13
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Computer
System
Engineering
Software
Requirement
Analysis
Software
Design
14
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
15
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Introduction to VB6.0:
Visual Basic is a programming language and a powerful front end tools for developing
windows applications, as the name suggests, programming with Visual Basics is
accomplished visually. Visual basic is a graphical user interface (GUI). Visual Basic is a
programming language with the inbuilt ability to create user interface quickly and easily.
While writing the program, you are able to see how your program will look during your
run time. This is the great advantage over the other programming languages. In visual
basic you have available tool box of these elements. You can create a new window called
Forms. Programmers, creates the GUI by selecting an object, setting the object properties
to define the object appearance like colour, size, images, etc., and behaviour and writes
code that responds to a particular event that occurs in the interface. These program work
on the text mode using the extended character set to give the user the feeling of a
graphical environment. Visual Basic made programming under the GUI environment
easy and fast.
Feasibility Analysis
It is highly feasible as it provides all the employee management process in an easier
method by saving the lot of time and also it provides cost effective solution.
Economic Feasibility
The system is economically acceptable as it provides a cost effective solution because,
the developer of the system take very few risks. The benefits from the system outs
number of cost.
Technical Feasibility
The system is technically acceptable as it can be used in all employee organization.
Where it automates the annual activities.
16
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Operational Feasibilities
The user who has basic knowledge can operate the software.
Environment
The software is developed on VISUAL BASIC 6.0 as the front-end tool and MS-
ACCESS-XP and back end tool under the MS-WINDOWS XP platform as an operating
system.
Software specification
The software should be in a position to maintain all the required details.
The software should be readable, understandable and upgradeable.
The software must work on a variety of hardware’s.
Features of software
The software is simple yet efficient.
The minimum configuration required is a 286 machine.
It is user friendly.
The software is very successful.
Current dates, time and other details of different levels are automatically
generated by the system.
It is because it restricts more acceptation part from the user side.
The software itself generates most of all the acceptation part.
17
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Design Constraints:
18
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
19
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
LOGIN DETAILS:
USERNAME PASSWORD
Cancel
DEPARTMENT DETAILS:
DEPT
NAME
20
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
COMPANY DETAILS:
COMPANY
NAME ADDRESS
CODE
E-MAIL DATE OF
WEBSITE COMMENC
E
BRANCH DETAILS:
COMPANY
CODE ADDRESS
BRANCH
CODE
E-MAIL DATE OF
WEBSITE COMMENC
E
21
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
GRADE DETAILS:
GRADE
NAME
DESIGNATION DETAILS:
DESG.
NAME
22
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
EMPLOYEE DETAILS:
NAME
FATHER
PHONE NAME
E-MAIL DATE OF
DOB JOINING
LOAN DETAILS:
TYPE
AMOUNT
AMOUNT REPAID
AVAILAED
BALANCE
DATE INSTALMENTS
AMOUNT
REPAID
23
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
24
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
LOGIN FORM:
Dim s1 As String
Dim s2 As String
Private Sub cmdcancel_Click()
Unload Me
End Sub
25
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
COMPANY:
Option Explicit
Dim enableflag As Integer
'-------add record to the table---------
Private Sub cmdadd_Click()
Dim code, str, num, alp As String
Dim i, K As Integer
Call clear_all(Me) 'procedure in module
cmdadd.Enabled = False
cmddel.Enabled = False
cmdedit.Enabled = False
cmdExit.Enabled = False
cmdfirst.Enabled = False
cmdnext.Enabled = False
cmdprev.Enabled = False
cmdlast.Enabled = False
cmdsave.Enabled = True
cmdcancel.Enabled = True
' for automatic generation of branch code:user's choice
If cmp.EOF = cmp.BOF And cmp.RecordCount < 1 Then
chkcode:
code = InputBox("Please enter the company code (like CMP10):", "Payroll : Branch
Code Generation")
K = Len(code)
If K > 10 Then
MsgBox "You have entered a value of more than 10 character length" & Chr(13) &
"Please enter only less than 10 characters", vbCritical, "Payroll : Data entry error"
GoTo chkcode
End If
26
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
For i = K To 1 Step -1
str = Mid(code, i, 1)
If IsNumeric(str) <> True Then
alp = Mid(code, 1, i)
num = Mid(code, i + 1)
Exit For
End If
Next i
If num = "" Then
MsgBox "Invalid value for company code, Please enter like 'BRH10'. ", , "Payroll:Branch
Details"
GoTo chkcode
Else
txt_cmpcode = code
End If
If enableflag = 2 Then
Call txtcmb_disable(Me) 'module procedure
enableflag = 1
End If
txt_cmpname.SetFocus
Else
cmp.MoveLast
code = cmp(0)
K = Len(code)
For i = K To 1 Step -1
str = Mid(code, i, 1)
If IsNumeric(str) <> True Then
alp = Mid(code, 1, i)
num = Mid(code, i + 1)
27
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Exit For
End If
Next i
If enableflag = 2 Then
Call txtcmb_disable(Me) 'module procedure
enableflag = 1
End If
txt_cmpcode = alp & (CInt(num) + 1)
txt_cmpcode.SetFocus
End If
cmp.AddNew
End Sub
'----cancel updations-----------
Private Sub cmdcancel_Click()
cmp.CancelUpdate
MsgBox "Update cancelled"
Call chk_displayrec
cmdadd.Enabled = True
cmddel.Enabled = True
cmdedit.Enabled = True
cmdExit.Enabled = True
cmdfirst.Enabled = True
cmdnext.Enabled = True
cmdprev.Enabled = True
cmdlast.Enabled = True
cmdsave.Enabled = False
cmdcancel.Enabled = False
cmp.MoveFirst
Call get_cmpdata
28
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
cmdadd.SetFocus
If enableflag = 1 Then
Call txtcmb_disable(Me) 'module procedure
enableflag = 2
End If
End Sub
'-------delete a record ------------
Private Sub cmddel_Click()
Dim i As Integer
If txt_cmpcode.Text = "" Or txt_cmpname.Text = "" Then
MsgBox "No record found to delete. " & Chr(13) & "To delete, first select a record.",
vbCritical, "Payroll : Delete error"
Exit Sub
End If
i = MsgBox("Delete this record ? ", vbYesNo, "Payroll:company Details")
If i = vbYes Then
cmp.Delete
MsgBox "Record Deleted", , "Payroll"
Call clear_all(Me)
If cmp.RecordCount < 1 Then
MsgBox "Zero records in the table now. " & Chr(13) & "If required start entering
records now", vbInformation, "Payroll : Data Entry"
Call disableall(Me)
cmdadd.Enabled = True
cmdExit.Enabled = True
Else
Call chk_displayrec
End If
End If
29
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
End Sub
'------edit record----------
Private Sub cmdedit_Click()
cmdadd.Enabled = False
cmddel.Enabled = False
cmdedit.Enabled = False
cmdExit.Enabled = False
cmdfirst.Enabled = False
cmdnext.Enabled = False
cmdprev.Enabled = False
cmdlast.Enabled = False
cmdsave.Enabled = True
cmdcancel.Enabled = True
If cmp.EOF Then
cmp.MovePrevious
ElseIf cmp.BOF Then
cmp.MoveNext
End If
cmp.Edit
Call get_cmpdata
If enableflag = 2 Then
Call txtcmb_disable(Me) 'module procedure
enableflag = 1
End If
txt_cmpname.SetFocus
End Sub
'-------closing the form--------
Private Sub cmdexit_Click()
30
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Unload cmpdetails
'Call menu_disable
End Sub
'-----move to the first record-----------
31
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Exit Sub
err_movnext:
MsgBox "Zero records in the Company Details Table", vbInformation, "Payroll : Data
Entry Error"
End Sub
'-----------move to the previous record--------
Private Sub cmdprev_Click()
On Error GoTo err_movprev
cmp.MovePrevious
If cmp.BOF Then
MsgBox "Current record is the First record"
cmp.MoveNext
Call get_cmpdata
Exit Sub
End If
Call get_cmpdata
Exit Sub
err_movprev:
MsgBox "Zero records in the Company Details Table", vbInformation, "Payroll : Data
Entry Error"
End Sub
'--------save record---------------
Private Sub cmdsave_Click()
32
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
'Call chk_nullvalue(txt_cmpname)
If txt_cmpname.Text = "" Then
MsgBox "Company name cannot be null." & Chr(13) & "Enter the company name and
then Click on Save.", vbCritical, "Payroll : Data entry error"
txt_cmpname.SetFocus
Exit Sub
End If
cmdadd.Enabled = True
cmddel.Enabled = True
cmdedit.Enabled = True
cmdExit.Enabled = True
cmdfirst.Enabled = True
cmdnext.Enabled = True
cmdprev.Enabled = True
cmdlast.Enabled = True
cmdsave.Enabled = False
cmdcancel.Enabled = False
Call put_cmpdata
cmp.Update
If enableflag = 1 Then
Call txtcmb_disable(Me) 'module procedure
enableflag = 2
End If
Call chk_displayrec
End Sub
'default settings in form load
33
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
cmdExit.Enabled = True
Exit Sub
Else
cmdcancel.Enabled = False
cmdsave.Enabled = False
enableflag = 1
Call txtcmb_disable(Me) 'module procedure
enableflag = 2
Call chk_displayrec
End If
Me.Top = 750
Me.Left = 2200
txt_addr1.Text = ""
txt_addr2.Text = ""
txt_addr3.Text = ""
txt_cmpcode.Text = ""
txt_cmpname.Text = ""
txt_email.Text = ""
34
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
txt_fax.Text = ""
txt_pincode.Text = ""
txt_tel1.Text = ""
txt_tel2.Text = ""
txt_web.Text = ""
'Call menu_disable
End Sub
'to extract values from the database
txt_addr2 = cmp(3)
txt_addr3 = cmp(4)
txt_pincode = cmp(5)
txt_tel1 = cmp(6)
txt_tel2 = cmp(7)
txt_fax = cmp(8)
txt_email = cmp(9)
txt_web = cmp(10)
TxtDate.Text = cmp(11)
End Sub
'to append values to the database
Public Sub put_cmpdata()
cmp(0) = UCase(txt_cmpcode)
cmp(1) = UCase(txt_cmpname)
cmp(2) = UCase(txt_addr1)
cmp(3) = UCase(txt_addr2)
35
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
cmp(4) = UCase(txt_addr3)
cmp(5) = Val(txt_pincode)
cmp(6) = UCase(txt_tel1)
cmp(7) = UCase(txt_tel2)
cmp(8) = UCase(txt_fax)
cmp(9) = txt_email
cmp(10) = txt_web
cmp(11) = Format(TxtDate.Text, "dd/mm/yy")
End Sub
36
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
BRANCH:
Option Explicit
Dim enableflag As Integer
'------add records to the table-------
Private Sub cmdadd_Click()
Dim code, str, num, alp As String
Dim i, K As Integer
Call clear_all(Me) 'procedure in module
cmdadd.Enabled = False
cmddel.Enabled = False
cmdedit.Enabled = False
cmdExit.Enabled = False
cmdfirst.Enabled = False
cmdnext.Enabled = False
cmdprev.Enabled = False
cmdlast.Enabled = False
cmdsave.Enabled = True
cmdcancel.Enabled = True
If enableflag = 2 Then
Call txtcmb_disable(Me) 'module procedure
enableflag = 1
End If
' for automatic generation of branch code:user's choice
If brh.EOF = brh.BOF And brh.RecordCount < 1 Then
chkcode:
code = InputBox("Please enter the branch code (like BRH10):", "Payroll : Branch Code
Generation")
K = Len(code)
For i = K To 1 Step -1
37
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
str = Mid(code, i, 1)
If IsNumeric(str) <> True Then
alp = Mid(code, 1, i)
num = Mid(code, i + 1)
Exit For
End If
Next i
If num = "" Then
MsgBox "Invalid value for branch code, Please enter like 'BRH10'. ", , "Payroll:Branch
Details"
GoTo chkcode
Else
txt_brhcode = code
End If
Else
brh.MoveLast
code = brh(0)
K = Len(code)
For i = K To 1 Step -1
str = Mid(code, i, 1)
If IsNumeric(str) <> True Then
alp = Mid(code, 1, i)
num = Mid(code, i + 1)
Exit For
End If
Next i
txt_brhcode = alp & (CInt(num) + 1)
txt_brhname.SetFocus
End If
brh.AddNew
38
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
End Sub
'----cancel updations-----------
Private Sub cmdcancel_Click()
brh.CancelUpdate
MsgBox "Update cancelled"
Call chk_displayrec
cmdadd.Enabled = True
cmddel.Enabled = True
cmdedit.Enabled = True
cmdExit.Enabled = True
cmdfirst.Enabled = True
cmdnext.Enabled = True
cmdprev.Enabled = True
cmdlast.Enabled = True
cmdsave.Enabled = False
cmdcancel.Enabled = False
39
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
If i = vbYes Then
If Combo1.Text = "" Or txt_brhcode.Text = "" Then
MsgBox "No record found to delete. " & Chr(13) & "To delete, first select a record.",
vbCritical, "Payroll : Delete error"
Exit Sub
End If
brh.Delete
MsgBox "Record Deleted", , "Payroll"
Call clear_all(Me) 'procedure in module
If brh.RecordCount < 1 And brh.BOF = brh.EOF Then
MsgBox "Zero records in the table now. " & Chr(13) & "If required start entering
records now", vbInformation, "Payroll : Data Entry"
Call norec_action
Else
Call chk_displayrec
End If
End If
End Sub
'--------edit values in the record----------
Private Sub cmdedit_Click()
cmdadd.Enabled = False
cmddel.Enabled = False
cmdedit.Enabled = False
cmdExit.Enabled = False
cmdfirst.Enabled = False
cmdnext.Enabled = False
cmdprev.Enabled = False
cmdlast.Enabled = False
cmdsave.Enabled = True
cmdcancel.Enabled = True
40
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
brh.Edit
Call get_brhdata
If enableflag = 2 Then
Call txtcmb_disable(Me) 'module procedure
enableflag = 1
End If
End Sub
'-------exit from the form--------
Private Sub cmdexit_Click()
Call menu_disable
Unload brhdetails
End Sub
'--move to the first record-------
Private Sub cmdfirst_Click()
On Error GoTo err_movfirst
brh.MoveFirst
Call get_brhdata
Exit Sub
err_movfirst:
MsgBox "Zero records in the Branch Details Table", vbInformation, "Payroll : Data
Entry Error"
End Sub
'-----move to the last record-----
Private Sub cmdlast_Click()
On Error GoTo err_movlast
brh.MoveLast
Call get_brhdata
Exit Sub
err_movlast:
41
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
MsgBox "Zero records in the Branch Details Table", vbInformation, "Payroll : Data
Entry Error"
End Sub
'----move to the next record--------
Private Sub cmdnext_Click()
On Error GoTo err_movnext
brh.MoveNext
If brh.EOF Then
MsgBox "Current record is the last record", , "Payroll"
brh.MovePrevious
Call get_brhdata
Exit Sub
End If
Call get_brhdata
Exit Sub
err_movnext:
MsgBox "Zero records in the Branch Details Table", vbInformation, "Payroll : Data
Entry Error"
End Sub
'---move to the previous record-----
Private Sub cmdprev_Click()
On Error GoTo err_movprev
brh.MovePrevious
If brh.BOF = True Then
MsgBox "Current record is the First record", , "Payroll"
brh.MoveNext
Call get_brhdata
Exit Sub
End If
Call get_brhdata
42
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Exit Sub
err_movprev:
MsgBox "Zero records in the Branch Details Table", vbInformation, "Payroll : Data
Entry Error"
End Sub
'------save records to the table-------
Private Sub cmdsave_Click()
If txt_brhname.Text = "" Then
MsgBox "Branch name cannot be empty." & Chr(13) & "First enter the branch name and
then click on Save. ", vbCritical, "Payroll : Data entry error"
txt_brhname.SetFocus
Exit Sub
End If
If Combo1.Text = "" Or Combo1.ListIndex = 0 Then
MsgBox "Company code is either empty or you have selected the heading. " & Chr(13)
& "Select a Company code and name.", vbCritical, "Payroll : Data entry error"
Combo1.Text = ""
Combo1.SetFocus
Exit Sub
End If
cmdadd.Enabled = True
cmddel.Enabled = True
cmdedit.Enabled = True
cmdExit.Enabled = True
cmdfirst.Enabled = True
cmdnext.Enabled = True
cmdprev.Enabled = True
cmdlast.Enabled = True
cmdsave.Enabled = False
cmdcancel.Enabled = False
43
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Call put_brhdata
brh.Update
Call chk_displayrec
If enableflag = 1 Then
Call txtcmb_disable(Me) 'module procedure
enableflag = 2
End If
End Sub
44
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Else
Call chk_displayrec
End If
txt_brhcode.Enabled = False
cmdsave.Enabled = False
cmdcancel.Enabled = False
enableflag = 1
'set flag value for enabling text boxes
Call txtcmb_disable(Me) 'module procedure
enableflag = 2
Call get_cmpcode 'get company code from company table
End If
Call menu_disable
txt_addr1.Text = ""
txt_addr2.Text = ""
txt_addr3.Text = ""
txt_brhcode.Text = ""
txt_brhname.Text = ""
txt_email.Text = ""
txt_fax.Text = ""
txt_pin.Text = ""
txt_tel.Text = ""
txt_web.Text = ""
txt_dateofcomm.Text = ""
Combo1 = ""
End Sub
'-------append values to the table--------------
Public Sub get_brhdata()
With brh
txt_brhcode = .Fields(0)
45
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Combo1.Text = .Fields(1)
txt_brhname = .Fields(2)
txt_addr1 = .Fields(3)
txt_addr2 = .Fields(4)
txt_addr3 = .Fields(5)
txt_pin = .Fields(6)
txt_tel = .Fields(7)
txt_fax = .Fields(8)
txt_email = .Fields(9)
txt_web = .Fields(10)
txt_dateofcomm = .Fields(11)
End With
End Sub
'----append values to the fields in the table---------
Public Sub put_brhdata()
Dim str, str1, lval As String
Dim i As Integer
'-------------extract cmpcode from combobox text value
str = Combo1.Text
For i = 1 To Len(str) Step 1
str1 = Mid(str, i, 1)
If str1 = " " Then
lval = Left(str, i - 1)
Exit For
End If
Next
With brh
Fields(0) = UCase(txt_brhcode)
If lval = "" Then
Fields(1) = UCase(str)
46
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Else
.Fields(1) = UCase(lval)
End If
.Fields(2) = UCase(txt_brhname)
.Fields(3) = UCase(txt_addr1)
.Fields(4) = UCase(txt_addr2)
.Fields(5) = UCase(txt_addr3)
.Fields(6) = Val(txt_pin)
.Fields(7) = UCase(txt_tel)
.Fields(8) = UCase(txt_fax)
.Fields(9) = UCase(txt_email)
.Fields(10) = UCase(txt_web)
.Fields(11) = Format(txt_dateofcomm.Text, "dd/mm/yy")
End With
End Sub
47
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
cmdfirst.Enabled = False
cmdprev.Enabled = False
cmdnext.Enabled = False
cmdlast.Enabled = False
End Sub
Private Sub txt_dateofcomm_LostFocus()
If IsDate(txt_dateofcomm.Text) = False Then
MsgBox "You have entered a wrong value for date." & Chr(13) & "Valid date
format :'dd/mm/yy'", vbCritical, "Payroll : Data entry error"
txt_dateofcomm.Text = ""
txt_dateofcomm.SetFocus
End If
End Sub
48
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
DEPARTMENT:
Option Explicit
Dim enableflag As Integer
'------add records to table -----
Private Sub cmdadd_Click()
Dim code, str1, str2, num As String
Dim i, K As Integer
cmdadd.Enabled = False
cmddel.Enabled = False
cmdedit.Enabled = False
cmdExit.Enabled = False
cmdfirst.Enabled = False
cmdnext.Enabled = False
cmdprev.Enabled = False
cmdlast.Enabled = False
cmdsave.Enabled = True
cmdcancel.Enabled = True
If enableflag = 2 Then
Call txtcmb_disable(Me) 'module procedure
enableflag = 1
End If
'generate next / new department code
If dpt.EOF = dpt.BOF And dpt.RecordCount < 1 Then
inputagain:
49
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
50
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
51
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
cmddel.Enabled = False
cmdedit.Enabled = False
cmdExit.Enabled = False
cmdfirst.Enabled = False
cmdnext.Enabled = False
cmdprev.Enabled = False
cmdlast.Enabled = False
cmdsave.Enabled = True
cmdcancel.Enabled = True
dpt.Edit
Call get_dptdata
If enableflag = 2 Then
Call txtcmb_disable(Me) 'module procedure
enableflag = 1
End If
End Sub
'---------exit form----------
Private Sub cmdexit_Click()
Unload deptdetails
Call menu_disable
End Sub
52
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
MsgBox "Zero records in the Department Details Table", vbInformation, "Payroll : Data
Entry Error"
End Sub
53
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
54
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
cmdprev.Enabled = True
cmdlast.Enabled = True
cmdsave.Enabled = False
cmdcancel.Enabled = False
Call put_dptdata
dpt.Update
Call chk_displayrec
If enableflag = 1 Then
Call txtcmb_disable(Me) 'module procedure
enableflag = 2
End If
End Sub
Private Sub Combo1_LostFocus()
If Combo1.ListIndex = 0 Or Combo1.Text = "" Then
MsgBox "You have not selected the company code or you have selected the heading." &
Chr(13) & "Select the values and not the heading.", vbCritical, "Payroll :Data entry error"
Combo1.Text = ""
Combo1.SetFocus
End If
End Sub
55
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
56
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
brh.MoveFirst
Combo1.AddItem "Branch Code Name"
Do While brh.EOF = False
Combo1.AddItem brh.Fields(0) & " " & brh.Fields(2)
brh.MoveNext
Loop
End Sub
'-------get dept details from dept table ------
Public Sub get_dptdata()
With dpt
txt_dptcode = .Fields(0)
Combo1.Text = .Fields(1)
txt_dptname = .Fields(2)
End With
End Sub
'--------put dept details from dept table -------
Public Sub put_dptdata()
Dim str, str1, str2 As String
Dim i As Integer
'---------to extract branch code from the combo box
str = Combo1.Text
For i = 1 To Len(str) Step 1
str1 = Mid(str, i, 1)
If str1 = " " Then
str2 = Left(str, i)
Exit For
End If
Next
With dpt
.Fields(0) = UCase(txt_dptcode)
57
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
58
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
59
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
DESGANATION:
Option Explicit
Dim enableflag As Integer
'-------add records to the database-----------
Private Sub cmdadd_Click()
Dim code, str, alpa, num As String
Dim i, K As Integer
If enableflag = 2 Then
Call txtcmb_disable(Me) 'Procedure in module
enableflag = 1
End If
Call clear_all(Me) 'Procedure in module
cmdadd.Enabled = False
cmdedit.Enabled = False
cmddel.Enabled = False
cmdExit.Enabled = False
cmdfirst.Enabled = False
cmdnext.Enabled = False
cmdprev.Enabled = False
cmdlast.Enabled = False
cmdsave.Enabled = True
cmdcancel.Enabled = True
'generate new / next designation code
If dsg.EOF = dsg.BOF And dsg.RecordCount < 1 Then
inputagain:
code = InputBox("Please input a starting Designation code:(like A1)", "Designation
details:Code Generation")
For i = Len(code) To 1 Step -1
str = Mid(code, i, 1)
60
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
61
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
enableflag = 2
End If
dsg.CancelUpdate
MsgBox "Update cancelled. "
Call chk_displayrec
cmdadd.Enabled = True
cmdedit.Enabled = True
cmddel.Enabled = True
cmdExit.Enabled = True
cmdfirst.Enabled = True
cmdnext.Enabled = True
cmdprev.Enabled = True
cmdlast.Enabled = True
cmdsave.Enabled = False
cmdcancel.Enabled = False
End Sub
'---------delete the records in the database---------
Private Sub cmddel_Click()
Dim i As Integer
i = MsgBox("Delete this record ? ", vbQuestion + vbYesNo, "Payroll")
If i = vbYes Then
If Combo1.Text = "" Or txt_dsgcode.Text = "" Then
MsgBox "No record found to delete. " & Chr(13) & "To delete, first select a record.",
vbCritical, "Payroll : Delete error"
Exit Sub
End If
dsg.Delete
Call clear_all(Me) 'procedure in module
If dsg.RecordCount < 1 Or dsg.EOF = dsg.BOF Then
MsgBox "Zero records in the table now. If required, you can add records now"
62
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Call norec_action
Exit Sub
Else
Call chk_displayrec
End If
End If
End Sub
'---------edit the records in the database------------
Private Sub cmdedit_Click()
Call getdata
If enableflag = 2 Then
Call txtcmb_disable(Me) 'module procedure
enableflag = 1
End If
dsg.Edit
cmdadd.Enabled = False
cmdedit.Enabled = False
cmddel.Enabled = False
cmdExit.Enabled = False
cmdfirst.Enabled = False
cmdnext.Enabled = False
cmdprev.Enabled = False
cmdlast.Enabled = False
cmdsave.Enabled = True
cmdcancel.Enabled = True
End Sub
Private Sub cmdexit_Click()
Call menu_disable
Unload Me
End Sub
63
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
64
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
End If
Exit Sub
err_movnext:
MsgBox "Zero records in the Designation Details Table", vbInformation, "Payroll : Data
Entry Error"
End Sub
65
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
End If
cmdadd.Enabled = True
cmdedit.Enabled = True
cmddel.Enabled = True
cmdExit.Enabled = True
cmdfirst.Enabled = True
cmdnext.Enabled = True
cmdprev.Enabled = True
cmdlast.Enabled = True
cmdsave.Enabled = False
cmdcancel.Enabled = False
Call putdata
dsg.Update
If enableflag = 1 Then
Call txtcmb_disable(Me) 'module procedure
enableflag = 2
End If
Call chk_displayrec
End Sub
66
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
67
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Call menu_disable
txt_dsgcode.Text = ""
txt_dsgname.Text = ""
Combo1 = ""
End Sub
'------------append values from backend to the form ------
Public Sub getdata()
With dsg
txt_dsgcode.Text = .Fields(0)
Combo1.Text = .Fields(1)
txt_dsgname.Text = .Fields(2)
End With
End Sub
'-----fetch values from the backend to the textboxes----------
Public Sub putdata()
Dim i As Integer
Dim str, str1, str2 As String
str = Combo1.Text
For i = 1 To Len(str) Step 1
str1 = Mid(str, i, 1)
If str1 = " " Then
str2 = Left(str, i)
Exit For
End If
Next i
With dsg
.Fields(0) = UCase(txt_dsgcode.Text)
If str2 = "" Then
.Fields(1) = UCase(str)
Else
68
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
.Fields(1) = UCase(str2)
End If
.Fields(2) = UCase(txt_dsgname.Text)
End With
End Sub
'---get department code from dept table
Public Sub getdeptinfo()
dpt.MoveFirst
Combo1.AddItem "Department.Code Name"
Do While dpt.EOF = False
Combo1.AddItem (dpt(0) & " " & dpt(2))
dpt.MoveNext
Loop
End Sub
69
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Call getdata
End If
End Sub
70
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
GRADE:
Option Explicit
Dim enableflag As Integer
71
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
For i = K To 1 Step -1
str1 = Mid(code, i, 1)
If IsNumeric(str1) <> True Then
str2 = Left(code, i)
num = Mid(code, i + 1)
Exit For
End If
Next
If num = "" Then
MsgBox "Invalid Grade code. Please enter like : G1", , "Payroll:Grade Details"
GoTo inputagain
Else
txt_grdcode = code
End If
Else
grd.MoveLast
code = grd.Fields(0)
K = Len(code)
For i = K To 1 Step -1
str1 = Mid(code, i, 1)
If IsNumeric(str1) <> True Then
str2 = Left(code, i)
num = Mid(code, i + 1)
Exit For
End If
Next
txt_grdcode = str2 & (CInt(num) + 1)
End If
grd.AddNew
72
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
End Sub
grd.CancelUpdate
MsgBox "Update cancelled"
Call chk_displayrec
cmdadd.Enabled = True
cmddel.Enabled = True
cmdedit.Enabled = True
cmdExit.Enabled = True
cmdfirst.Enabled = True
cmdnext.Enabled = True
cmdprev.Enabled = True
cmdlast.Enabled = True
cmdsave.Enabled = False
cmdcancel.Enabled = False
If enableflag = 1 Then
Call txtcmb_disable(Me) 'procedure in module
enableflag = 2
End If
End Sub
If i = vbYes Then
If Combo1.Text = "" Or txt_grdname.Text = "" Then
73
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
MsgBox "No record found to delete. " & Chr(13) & "To delete, first select a record.",
vbCritical, "Payroll : Delete error"
Exit Sub
End If
grd.Delete
MsgBox "Record Deleted."
Call clear_all(Me)
If grd.BOF = grd.EOF Or grd.RecordCount < 1 Then
MsgBox "Zero records in the table now. " & Chr(13) & "If required start entering
records now", vbInformation, "Payroll : Data Entry"
Call norec_action
Else
Call chk_displayrec
End If
End If
End Sub
cmdsave.Enabled = True
cmdcancel.Enabled = True
74
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
If enableflag = 2 Then
Call txtcmb_disable(Me) 'procedure in module
enableflag = 1
End If
End Sub
MsgBox "Zero records in the Grade Details Table", vbInformation, "Payroll : Data Entry
Error"
End Sub
75
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Call getdata
End If
Exit Sub
76
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
err_movprev:
MsgBox "Zero records in the Grade Details Table", vbInformation, "Payroll : Data Entry
Error"
End Sub
End If
Call chk_displayrec
End Sub
77
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
'====if brh contains 0 records then only add and exit buttons should be
enabled========
If grd.RecordCount < 1 Then
Call norec_action
78
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Else
Call chk_displayrec
enableflag = 1
Call txtcmb_disable(Me) 'procedure in module
enableflag = 2
txt_grdcode.Enabled = False
cmdsave.Enabled = False
cmdcancel.Enabled = False
End If
End If
Call menu_disable
txt_grdcode.Text = ""
txt_grdname.Text = ""
Combo1 = ""
End Sub
With grd
txt_grdcode = .Fields(0)
Combo1.Text = .Fields(1)
txt_grdname = .Fields(2)
79
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
End With
End Sub
80
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
cmdcancel.Enabled = False
cmdfirst.Enabled = False
cmdprev.Enabled = False
cmdnext.Enabled = False
cmdlast.Enabled = False
End Sub
Public Sub chk_displayrec()
If grd.RecordCount > 0 Or grd.BOF <> grd.EOF Then
grd.MoveFirst
Call getdata
End If
End Sub
81
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
EMPLOYEE:
Option Explicit
Dim enableflag As Integer
Dim cmb_enable As Integer
Dim cmdval As Integer 'status of request generated by employee personal
Dim edit_sal_status As Integer
salary_master.cmdokay.Enabled = True
salary_master.cmdExit.Enabled = False
salary_master.cleardata
salary_master.tgross.Text = 0
sal_mast.AddNew
salary_master.tbasic.SetFocus
ElseIf cmdval = 0 Then
'viewing employee records, salary master to be opened for viewing
Set sal_mast = db.OpenRecordset("select * from salary_master where emp_code = '" &
txt_empcode.Text & "'", dbOpenDynaset)
salary_master.cmdokay.Enabled = False
salary_master.cmdExit.Enabled = True
salary_master.getdata
salary_master.enabletxt
salary_master.cmdExit.SetFocus
ElseIf cmdval = 2 Then
82
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
salary_master.cmdokay.Enabled = True
salary_master.cmdExit.Enabled = False
salary_master.getdata
sal_mast.Delete
End If
End Sub
'------add record (s) to the database--------
Private Sub cmdadd_Click()
Dim code, str, num, alp As String
Dim i, K As Integer
'-------------
cmdval = 1
Call clear_all(Me) 'procedure in module
cmdadd.Enabled = False
cmddel.Enabled = False
83
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
cmdedit.Enabled = False
cmdExit.Enabled = False
cmdfirst.Enabled = False
cmdnext.Enabled = False
cmdprev.Enabled = False
cmdlast.Enabled = False
cmdsave.Enabled = True
cmdcancel.Enabled = True
If enableflag = 2 Then
Call txt_disable(Me) 'procedure in module
Call combo_enable
enableflag = 1
End If
' for automatic generation of branch code:user's choice
If emp.EOF = emp.BOF And emp.RecordCount < 1 Then
chkcode:
code = InputBox("Please enter the employee code (like PSG100):", "Payroll : Employee
Code Generation")
K = Len(code)
For i = K To 1 Step -1
str = Mid(code, i, 1)
If IsNumeric(str) <> True Then
alp = Mid(code, 1, i)
num = Mid(code, i + 1)
Exit For
End If
Next i
If num = "" Then
84
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
MsgBox "Invalid value for employee code, Please enter like 'PSG100'. ", ,
"Payroll:Branch Details"
GoTo chkcode
Else
txt_empcode = code
End If
Else
emp.MoveLast
code = emp(0)
K = Len(code)
For i = K To 1 Step -1
str = Mid(code, i, 1)
If IsNumeric(str) <> True Then
alp = Mid(code, 1, i)
num = Mid(code, i + 1)
Exit For
End If
Next i
txt_empcode = alp & (CInt(num) + 1)
End If
emp_pers.cmd_salary.Enabled = True
emp.AddNew
End Sub
'---------cancel update / edit ----------
Private Sub cmdcancel_Click()
emp.CancelUpdate
MsgBox "Update record cancelled"
Call chk_displayrec
cmdadd.Enabled = True
85
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
cmdedit.Enabled = True
cmddel.Enabled = True
cmdExit.Enabled = True
cmdfirst.Enabled = True
cmdnext.Enabled = True
cmdprev.Enabled = True
cmdlast.Enabled = True
cmdsave.Enabled = False
cmdcancel.Enabled = False
If enableflag = 1 Then
Call txt_disable(Me) 'procedure in module
Call combo_enable
enableflag = 2
End If
deptcombo.Enabled = False
dsgcombo.Enabled = False
gradecombo.Enabled = False
emp_pers.cmd_salary.Enabled = False
End Sub
'-------delete record (s) to the table ---------
Private Sub cmddel_Click()
Dim i As Integer
i = MsgBox("Delete this record ? ", vbQuestion + vbYesNo, "Payroll")
If i = vbYes Then
If txt_empcode.Text = "" Or deptcombo.Text = "" Then
MsgBox "No record found to delete. " & Chr(13) & "To delete, first select a record.",
vbCritical, "Payroll : Delete error"
Exit Sub
86
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Else
emp_pers.cmd_salary.Enabled = False
cmdval = 3
emp.Delete
Call clear_all(Me) 'procedure in module
If emp.RecordCount < 1 Or emp.EOF Or emp.BOF Then
Call chk_displayrec
End If
End If
End If
End Sub
'-----------edit current record -----------
Private Sub cmdedit_Click()
Call getdata
emp.Edit
'-------------
cmdval = 2
emp_pers.cmd_salary.Enabled = True
cmdadd.Enabled = False
cmdedit.Enabled = False
cmddel.Enabled = False
cmdExit.Enabled = False
cmdfirst.Enabled = False
cmdnext.Enabled = False
cmdprev.Enabled = False
cmdlast.Enabled = False
cmdsave.Enabled = True
cmdcancel.Enabled = True
If enableflag = 2 Then
87
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
End If
Exit Sub
err_movfirst:
MsgBox "Zero records in the Employee Details Table", vbInformation, "Payroll : Data
Entry Error"
End Sub
'---------move to last record --------
Private Sub cmdlast_Click()
On Error GoTo err_movlast
88
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
cmdval = 0
If emp.EOF <> True Then
emp.MoveLast
Call getdata
emp_pers.cmd_salary.Enabled = True
End If
Exit Sub
err_movlast:
MsgBox "Zero records in the Employee Details Table", vbInformation, "Payroll : Data
Entry Error"
End Sub
'----------move to the next record -------
Private Sub cmdnext_Click()
On Error GoTo err_movnext
cmdval = 0
emp.MoveNext
If emp.EOF Then
MsgBox "Current record is the last record", , "Payroll"
emp.MovePrevious
Call getdata
emp_pers.cmd_salary.Enabled = True
Exit Sub
End If
Call getdata
Exit Sub
err_movnext:
MsgBox "Zero records in the Employee Details Table", vbInformation, "Payroll : Data
Entry Error"
End Sub
89
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
cmdedit.Enabled = True
cmdExit.Enabled = True
cmdfirst.Enabled = True
cmdnext.Enabled = True
cmdprev.Enabled = True
cmdlast.Enabled = True
cmdsave.Enabled = False
90
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
cmdcancel.Enabled = False
If enableflag = 1 Then
Call txt_disable(Me) 'module procedure
Call combo_enable
enableflag = 2
End If
Call putdata
emp.Update
If cmdval = 2 Then
If edit_sal_status = 1 Then
sal_mast.Update
'GoTo cont
End If
End If
deptcombo.Clear
deptcombo.AddItem "Dept.code Name"
Do While dpt.EOF = False
deptcombo.AddItem dpt.Fields(0)
dpt.MoveNext
Loop
91
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
End Sub
Private Sub deptcombo_LostFocus()
If deptcombo.ListIndex = 0 Then
MsgBox "You have selected the heading." & Chr(13) & "Select the Department code,
name and not the heading", vbCritical, "Payroll : Data entry error"
deptcombo.Text = ""
deptcombo.SetFocus
Exit Sub
Else
'deptcombo.Enabled = False
dsgcombo.Clear
dsgcombo.Enabled = True
dsgcombo.AddItem "Desg.code Name"
Set dept_dsg = db.OpenRecordset("select dsg_code from designation where dpt_code='"
& deptcombo.Text & "'", dbOpenDynaset)
End If
End Sub
Private Sub dsgcombo_GotFocus()
If dept_dsg.EOF Then
MsgBox "No designations found under this department"
deptcombo.SetFocus
Exit Sub
Else
deptcombo.Enabled = False
dept_dsg.MoveFirst
Do While dept_dsg.EOF = False
dsgcombo.AddItem dept_dsg.Fields(0)
dept_dsg.MoveNext
Loop
92
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
End If
End Sub
Private Sub dsgcombo_LostFocus()
If dsgcombo.ListIndex = 0 Then
MsgBox "You have selected the heading." & Chr(13) & "Select the Designation code,
name and not the heading", vbCritical, "Payroll : Data entry error"
dsgcombo.Text = ""
dsgcombo.SetFocus
Exit Sub
Else
'dsgcombo.Enabled = False
gradecombo.Clear
gradecombo.AddItem "Grade.code Name"
gradecombo.Enabled = True
Set dsg_grd = db.OpenRecordset("select grd_code from grade where dsg_code = '" &
dsgcombo.Text & "'", dbOpenDynaset)
End If
End Sub
'----------default settings in form load---------
Private Sub Form_Load()
Dim frgkey_status As Integer
Me.Top = 250
Me.Left = 1500
93
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
frgkey_status = chk_rscount("grade")
Set emp = db.OpenRecordset("emp_personal", dbOpenDynaset)
If frgkey_status < 1 Then
MsgBox "Zero records in the Grade Table" & Chr(13) & "First add records to the
Company Table and then start adding records to the Grade Table. ", vbCritical,
"Payroll :Data entry error"
Call disableall(Me) 'procedure in module
cmdExit.Enabled = True
Exit Sub
End If
'====if brh contains 0 records then only add and exit buttons should be
enabled========
If emp.RecordCount < 1 Then
Call norec_action
Else
Call chk_displayrec
enableflag = 1
Call txt_disable(Me) 'module procedure
Call combo_enable
cmd_salary.Enabled = False
enableflag = 2
cmdsave.Enabled = False
cmdcancel.Enabled = False
cmdval = 0
End If
Call menu_disable
dsgcombo = ""
gradecombo = ""
94
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
deptcombo = ""
txt_empcode.Text = ""
txt_empname.Text = ""
txt_father.Text = ""
txt_dob.Text = ""
txt_addr1.Text = ""
txt_addr2.Text = ""
txt_addr3.Text = ""
txt_pin.Text = ""
txt_tel.Text = ""
txt_djoin.Text = ""
txt_dconfirm.Text = ""
bl_grpcombo = ""
txt_qualif.Text = ""
End Sub
'----------get data from the backend to the form-------
Public Sub getdata()
With emp
deptcombo.Text = .Fields(16)
dsgcombo.Text = .Fields(17)
gradecombo.Text = .Fields(1)
txt_empcode.Text = .Fields(0)
txt_empname.Text = .Fields(2)
txt_father.Text = .Fields(3)
txt_dob.Text = .Fields(4)
txt_addr1.Text = .Fields(5)
txt_addr2.Text = .Fields(6)
txt_addr3.Text = .Fields(7)
txt_pin.Text = .Fields(8)
txt_tel.Text = .Fields(9)
95
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
.Fields(5) = UCase(txt_addr1.Text)
.Fields(6) = UCase(txt_addr2.Text)
.Fields(7) = UCase(txt_addr3.Text)
96
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
.Fields(8) = Val(txt_pin.Text)
.Fields(9) = UCase(txt_tel.Text) & " "
If Check1.Value = True Then '---append values for marital status
.Fields(10) = "True"
Else
.Fields(10) = "False"
End If
inputsex:
If Option1.Value = True Then
.Fields(11) = "True"
ElseIf Option2.Value = True Then
.Fields(11) = "False"
Else
MsgBox "Insufficient data. Please click for Employee Sex type", vbQuestion,
"Payroll:Employee Details"
GoTo inputsex
End If
.Fields(12) = UCase(bl_grpcombo.Text)
.Fields(13) = UCase(txt_qualif.Text)
.Fields(14) = Format(txt_djoin.Text, "dd/mm/yy")
.Fields(15) = Format(txt_dconfirm.Text, "dd/mm/yy")
End With
End Sub
Private Sub gradecombo_GotFocus()
If dsg_grd.EOF Then
MsgBox "No Grades found under this designation"
dsgcombo.SetFocus
Exit Sub
Else
97
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
dsgcombo.Enabled = False
dsg_grd.MoveFirst
Do While dsg_grd.EOF = False
gradecombo.AddItem dsg_grd.Fields(0)
dsg_grd.MoveNext
Loop
End If
End Sub
Private Sub gradecombo_LostFocus()
If gradecombo.ListIndex = 0 Then
MsgBox "You have selected the heading." & Chr(13) & "Select the grade code, name and
not the heading", vbCritical, "Payroll : Data entry error"
gradecombo.Text = ""
gradecombo.SetFocus
Exit Sub
Else
gradecombo.Enabled = False
End If
End Sub
'Status of command buttons in form if no records found in employee table
Private Sub norec_action()
cmdsave.Enabled = False
cmdedit.Enabled = False
cmddel.Enabled = False
cmdcancel.Enabled = False
cmdfirst.Enabled = False
cmdprev.Enabled = False
cmdnext.Enabled = False
cmdlast.Enabled = False
98
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
End Sub
'Check whether valid date entered or not
Private Sub txt_dconfirm_LostFocus()
If IsDate(txt_dconfirm.Text) = False Then
MsgBox "You have entered a wrong value for date." & Chr(13) & "Valid date
format :'dd/mm/yy'", vbCritical, "Payroll : Data entry error"
txt_dconfirm.Text = ""
' txt_dconfirm.SetFocus
End If
End Sub
'Check whether valid date entered or not
Private Sub txt_djoin_LOSTFOCUS()
If IsDate(txt_djoin.Text) = False Then
MsgBox "You have entered a wrong value for date." & Chr(13) & "Valid date
format :'dd/mm/yy'", vbCritical, "Payroll : Data entry error"
txt_djoin.Text = ""
End If
End Sub
'Check whether valid date entered or not
Private Sub txt_dob_LostFocus()
If IsDate(txt_dob.Text) = False Then
MsgBox "You have entered a wrong value for date." & Chr(13) & "Valid date
format :'dd/mm/yy'", vbCritical, "Payroll : Data entry error"
txt_dob.Text = ""
End If
End Sub
99
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
emp.MoveFirst
cmdval = 0
Call getdata
End If
End Sub
100
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
LEAVE MASTER:
Option Explicit
Dim enableflag As Integer
Dim flag As Integer
cmdadd.Enabled = False
cmdedit.Enabled = False
cmddel.Enabled = False
cmdfirst.Enabled = False
cmdprev.Enabled = False
cmdnext.Enabled = False
cmdlast.Enabled = False
cmdsave.Enabled = True
cmdcancel.Enabled = True
empcombo.Enabled = True
levdetails.AddNew
End Sub
101
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
enableflag = 2
End If
cmdadd.Enabled = True
cmdedit.Enabled = True
cmddel.Enabled = True
cmdfirst.Enabled = True
cmdprev.Enabled = True
cmdnext.Enabled = True
cmdlast.Enabled = True
cmdsave.Enabled = False
cmdcancel.Enabled = False
empcombo.Enabled = False
End Sub
If i = vbYes Then
If empcombo.Text = " " Then
MsgBox "No record found to delete.", vbCritical, "Payroll"
Exit Sub
End If
levdetails.Delete
Call cleardata
MsgBox "deleted"
End If
End Sub
102
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
cmdadd.Enabled = False
cmdedit.Enabled = False
cmddel.Enabled = False
cmdfirst.Enabled = False
cmdprev.Enabled = False
cmdnext.Enabled = False
cmdlast.Enabled = False
cmdsave.Enabled = True
cmdcancel.Enabled = True
flag = 1
If enableflag = 2 Then
Call enable
enableflag = 1
End If
'levdetails.Edit
empcombo.Enabled = True
End Sub
levdetails.MoveLast
103
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Call getdata
MsgBox "Last record ", , "Payroll"
End Sub
If levdetails.BOF Then
MsgBox "Current record is the first record", , "Payroll"
levdetails.MoveNext
Call getdata
Exit Sub
Else
Call getdata
End If
End Sub
104
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
If enableflag = 1 Then
Call enable
enableflag = 2
End If
cmdadd.Enabled = True
cmdedit.Enabled = True
cmddel.Enabled = True
cmdfirst.Enabled = True
cmdprev.Enabled = True
cmdnext.Enabled = True
cmdlast.Enabled = True
cmdsave.Enabled = False
cmdcancel.Enabled = False
empcombo.Enabled = False
levdetails.MoveFirst
Call getdata
End Sub
str1 = Mid(str, i, 1)
If str1 = " " Then
lval = Left(str, i - 1)
Exit For
105
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
End If
Next
levdetails.MoveFirst
Do While levdetails.EOF = False
If levdetails.Fields(0) = lval Then
getdata
levdetails.Edit
flag = 0
Exit Do
End If
levdetails.MoveNext
Loop
End If
End Sub
Me.Left = 2000
Set db = OpenDatabase(App.Path & "\payroll_db.mdb", , False)
Set levdetails = db.OpenRecordset("emp_leave_details", dbOpenDynaset)
If levdetails.EOF Then
cmdfirst.Enabled = False
cmdnext.Enabled = False
cmdprev.Enabled = False
cmdlast.Enabled = False
End If
Call getempdata
empcombo.Enabled = False
enableflag = 1
106
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
If enableflag = 1 Then
Call enable
enableflag = 2
End If
cmdsave.Enabled = False
cmdcancel.Enabled = False
End Sub
With levdetails
empcombo.Text = .Fields(0)
Yrcombo.Text = .Fields(1)
txt_cs.Text = .Fields(2)
txt_sk.Text = .Fields(3)
txt_pl.Text = .Fields(4)
txt_oth.Text = .Fields(5)
txt_ml.Text = .Fields(6)
End With
End Sub
107
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
.Fields(2) = txt_cs.Text
.Fields(3) = txt_sk.Text
.Fields(4) = txt_pl.Text
.Fields(5) = txt_oth.Text
.Fields(6) = txt_ml.Text
End With
End Sub
108
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
109
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
LEAVE AVAILED:
Option Explicit
Dim enableflag As Integer
Dim flag As Integer
Call cmdenable
empcombo.Enabled = False
End Sub
110
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Unload Me
End Sub
111
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Call getdata
Call getbal_leave
End Sub
levavailed.MovePrevious
If levavailed.BOF Then
MsgBox "Current record is the first record", , "Payroll"
levavailed.MoveNext
112
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Call getdata
Call getbal_leave
Exit Sub
Else
Call getdata
Call getbal_leave
End If
End Sub
113
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
'Dim i As Integer
'If flag = 1 Then
'str = empcombo.Text
'For i = 1 To Len(str) Step 1
' str1 = Mid(str, i, 1)
' If str1 = " " Then
' lval = Left(str, i - 1)
' Exit For
' End If
'Next
'levavailed.MoveFirst
'Do While levavailed.EOF = False
' If levavailed.Fields(0) = lval Then
' getdata
' levavailed.Edit
' flag = 0
' Exit Do
' End If
' levavailed.MoveNext
'Loop
'End If
'End Sub
114
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
115
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
End If
Next
End Sub
116
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
117
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
empcombo.Text = ""
monthcombo.Text = ""
End Sub
118
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
119
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
leave_query.Edit
With leave_query
.Fields(1) = bal_cs.Text
.Fields(2) = bal_sk.Text
.Fields(3) = bal_pl.Text
.Fields(4) = bal_oth.Text
.Fields(5) = bal_ml.Text
End With
leave_query.Update
End Sub
120
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
LOAN MASTER:
Option Explicit
Dim enableflag As Integer
Dim flag As Integer
Private Sub cmdadd_Click()
If enableflag = 2 Then
Call enable
enableflag = 1
End If
Call cleardata
Call cmdenable
lm.AddNew
End Sub
End If
Call cmdenable
End Sub
121
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Exit Sub
Else
lm.Delete
Call cleardata
MsgBox "Current record deleted", vbInformation, "Payroll"
End If
End If
End Sub
122
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Call getdata
MsgBox "Last record ", , "Payroll"
End Sub
lm.MoveNext
Call getdata
Exit Sub
Else
Call getdata
End If
End Sub
123
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Call putdata
lm.Update
If enableflag = 1 Then
Call enable
enableflag = 2
End If
Call cmdenable
End Sub
Private Sub Form_Load()
Me.Top = 1500
Me.Left = 2000
Set db = OpenDatabase(App.Path & "\payroll_db.mdb", , False)
Set lm = db.OpenRecordset("Loan_Master", dbOpenDynaset)
If lm.EOF Then
cmdfirst.Enabled = False
cmdnext.Enabled = False
cmdprev.Enabled = False
cmdlast.Enabled = False
End If
enableflag = 1
If enableflag = 1 Then
Call enable
enableflag = 2
End If
cmdsave.Enabled = False
cmdcancel.Enabled = False
End Sub
124
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
125
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
LOAN AVAILED:
Option Explicit
Dim enableflag As Integer
Dim flag As Integer
End Sub
126
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
127
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
If ln.BOF Then
MsgBox "Current record is the first record", , "Payroll"
ln.MoveNext
128
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Call getdata
Exit Sub
Else
Call getdata
End If
End Sub
If enableflag = 1 Then
Call enable
enableflag = 2
End If
Call cmdenable
empcombo.Enabled = False
Exit Sub
errsave:
MsgBox "Employee already availed this loan. Please re-check on the loan type. ",
vbExclamation, "Payroll"
lncombo.SetFocus
End Sub
Me.Left = 2000
Set db = OpenDatabase(App.Path & "\payroll_db.mdb", , False)
129
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
130
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
End If
Next
End Sub
131
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
With ln
If lval = " " Then
.Fields(0) = str
Else
.Fields(0) = lval
End If
.Fields(1) = lncombo.Text
.Fields(2) = txt_davail.Text
.Fields(3) = txt_amt.Text
.Fields(4) = 0
.Fields(5) = txt_instal.Text
.Fields(6) = txt_instal.Text
.Fields(7) = Text2.Text
End With
End Sub
132
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
End If
Next
empcombo.Text = ""
lncombo.Text = ""
End Sub
133
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
PAYROLL GENARATION(SALARY):
Option Explicit
Dim enableflag As Integer
Dim code As String
Dim dedtotal As Integer
134
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
135
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
136
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
137
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
138
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
End Sub
Public Sub getempdata()
Set empsal = db.OpenRecordset("select emp_code, emp_name from emp_personal",
dbOpenDynaset)
empsal.MoveFirst
Do While empsal.EOF = False
empcombo.AddItem empsal.Fields(0) & " " & empsal.Fields(1)
empsal.MoveNext
Loop
End Sub
.Fields(5) = tda.Text
.Fields(6) = tmed.Text
139
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
.Fields(7) = twash.Text
.Fields(8) = tconv.Text
.Fields(9) = tlta.Text
.Fields(10) = tall1.Text
.Fields(11) = tall2.Text
.Fields(12) = tpf.Text
.Fields(13) = tgpf.Text
.Fields(14) = tmed_ded.Text
.Fields(15) = tptax.Text
.Fields(16) = titax.Text
.Fields(17) = tins1.Text
.Fields(18) = tins2.Text
.Fields(19) = tloan1(1).Text
.Fields(20) = tloan1(2).Text
.Fields(21) = tloan1(3).Text
.Fields(22) = tded4.Text
.Fields(23) = tded5.Text
.Fields(24) = t_splallw.Text
.Fields(25) = t_splded.Text
.Fields(26) = tgross.Text
.Fields(27) = tnetsal.Text
End With
End Sub
Public Sub cleardata()
Dim forclear As Control
For Each forclear In Controls
If TypeOf forclear Is TextBox Then
forclear.Text = ""
End If
Next
140
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
End Sub
Private Sub txt_dofissual_LostFocus()
Dim b, pf, gpf, med, ptax, itax As Integer
Dim ins1, ins2, loan1, loan2, loan3, ded4, ded5 As Integer
Dim i As Integer
i=1
Set loan_sal = db.OpenRecordset("select la.amt_paid, la.bal_instal, la.amt_per_instal
from Loan_availed la where la.emp_code='" & code & "'", dbOpenDynaset)
If loan_sal.RecordCount < 1 Then
MsgBox "Employee not availed any Loan.", vbOKOnly, "Payroll"
Else
Do While loan_sal.EOF = False
tloan1(i).Text = loan_sal.Fields(2)
i=i+1
loan_sal.MoveNext
Loop
End If
Set sm = db.OpenRecordset("select * from salary_master where
salary_master.emp_code='" & code & "'", dbOpenDynaset)
If sm.RecordCount < 1 Then
MsgBox "Currently no records found in the Salary Master", vbInformation, "Payroll"
Else
tbasic.Text = sm.Fields(1)
b = Val(tbasic.Text)
thra.Text = CInt((sm.Fields(2) / 100) * b)
tcca.Text = CInt((sm.Fields(3) / 100) * b)
141
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
142
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
143
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Implementation is the stage of the project where the theoretical design is turned into a
working system. It can be considered to be the most crucial stage in achieving a
successful new system gaining. The users confidence that the new system will work and
will be effective and accurate. It is primarily concerned with the user training and
documentation. Conversion usually takes place about the same time the user is being
trained or later. Implementation simply means convening a new system design into
operations, which is the process of converting a new revised system design into an
operational one.
SYSTEM TESTING:
Software Testing is the process of executing software in a controlled manner, in order to
answer the question– Does the software behaves as specified?. Software testing is often
used in association with the terms verification and validation. Validation is the checking
or testing of items, includes software for conformance and consistency with an associated
specification. Software testing is just one kind of verification, which also uses techniques
such as reviews, analysis, inspections, and walkthroughs. Validation is the process of
checking what has been specified is What the user actually wanted.
144
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Software testing should not be confused with debugging. Debugging is the process of
analyzing and localizing bugs when software does not behave as expected. Although the
identification of bugs will be obvious from playing with the software, a methodical
approach to software testing is a much more through means for identifying bugs.
Debugging is therefore an activity which supports testing but cannot replace testing.
Other activities which are often associated with software testing are static analysis and
dynamic analysis.
Static analysis investigates the source code of software, looking for problems and
gathering metrics without actually executing the code.
Dynamic analysis looks at the behavior of the software while it is executing to provide
information such as execution traces, timing profiles and test coverage information.
Testing is the set of activity that can be planned in advanced and conduct
Systematically. Testing begins at the module level and works towards the integration of
entire computers based system. Nothing is complete without testing. As it is vital success
of system testing objectives. There are several rules that can serve as testing objectives.
145
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Unit Testing:
Unit testing focuses verification effort on the smallest unit of software design. The
software component on module. Using the component level design description as a guide,
important control paths are tested to uncover errors within the boundary of the module.
The relative complexity of testing and uncovered scope established for unit testing.
The Unit testing is white box oriented and step can be conducted in parallel for multiple
components. The modular interface is tested to ensure that information is properly flows
into and out of the program unit order test. The local data structure is examined to ensure
the data stored temporarily maintain its integrity during all steps in an algorithm
execution.
Boundary condition are tested to ensure that all statements in the module have been
executed atleast once. Finally, all errors handling paths are tested.
Integration Testing:
Integration testing is systematic technique for constructing the program structure while at
the same time conducting tests to uncover errors associated with interfacing. The
objective is to take unit tested components and build a program structure that has been
dictated by design. The entire program is tested as whole. Corection is difficult because
isolation of acuses is complicated by vast expanse of entire program. Once these errors
are corrected, new ones appear and the process continues in a seemingly endless loop.
This is final step in testing. In this, the entire system was tested as a whole with all forms,
code, modules and class modules. This form of testing is popularly known as Black Box
testing or System Testing.
146
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
Black Box testing method focuses on the functional requirements of the software. That is,
Black Box testing enables the software engineer to drive sets of input conditions that will
fully exercise all functional requirements for a program.
Black Box testing attempts to find errors in the following categories: incorrect or missing
functions, interface errors, errors in data structures or external data access, performance
errors and initialization errors and termination errors.
The system is considered is tested for user acceptance; here it should satisfy the firm’s
need. The software should keep in touch with perspective system; user at the time of
developing and making changes whenever required. This
done with respect to the following points: Input Screen Designs, Output Screen Designs,
Online message to guide the user and the like
The above testing is done taking various kinds of test data. Preparation of test data plays
a vital role in the system testing. After preparing the test data, the system under study is
tested using that test data. While testing system by which test data errors are again
uncovered and corrected by using above testing steps and corrections are also noted for
future also.
147
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
148
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
LOGIN FORM:
149
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
COMPANY DETAILS:
BRANCH DETAILS:
150
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
DEPARTMENT DETAILS:
DESGANATION DETAILS:
151
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
GRADE DETAILS:
EMPLOYEE DETAILS:
152
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
LEAVE MASTER:
LEAVE AVAILED:
153
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
LOAN MASTER:
LOAN AVAILED:
154
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
PAYROLL GENERATION
155
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
156
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
LOGIN TABLE:
BRANCH DETAILS:
COMPANY DETAILS:
157
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
DEPARTMENT DETAILS:
DESIGNATION DETAILS:
LEAVE MASTER:
158
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
LEAVE AVAILED:
GRADE DETAILS:
LOAN AVAILED:
159
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
LOAN MASTER:
SALARY DETAILS:
160
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
161
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
We have also acquired a good deal of knowledge and working experience in Visual Basic
6.0 as well as Microsoft Access. The synchronization of the interface between Visual
Basic 6.0 as front end and MS Access as back end was really interesting.
The report is well organized and all the technical specifications have been presented in a
good format in the report.
This project can be used as foundation for implementing the advanced concepts of
database like object oriented relational database model.
FUTURE ENHACEMENT:
In the service form we can include an option to selcet the particulars according to the
choice of the customers using the check box tool and process and genereate bill according
to the selection.
162
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
163
DEPARTMENT OF BCA (EPCHE)
EMPLOYEE PAYROLL MANAGEMENT SYSTEM
BOOKS:
WEBSITES:
https://en.wikipedia.org/wiki/Payroll
www.vbtutor.net/vbtutor.html
https://docs.microsoft.com/en-us/dotnet/visual-basic/programming-guide/language-
features/strings/validating-strings
https://www.safaribooksonline.com/library/view/programming-visual-
basic/0596000936/ch08s03.html
https://www.youtube.com/watch?v=Byt6D7M4AJU
https://www.youtube.com/watch?v=oReH2vO8Izc
164
DEPARTMENT OF BCA (EPCHE)