Académique Documents
Professionnel Documents
Culture Documents
Page
Table 4.1 Account Table ---------------------------------------------------------- 11
Figure 4.2 Deactivated Table ---------------------------------------------------- 11
Figure 4.3 DTR Table ------------------------------------------------------------ 12
Figure 4.4 Employees Table ----------------------------------------------------- 12
Figure 4.5 Event Table ----------------------------------------------------------- 13
Figure 4.6 Paid Table ------------------------------------------------------------- 13
Figure 4.7 Salary Loan Table ---------------------------------------------------- 14
Figure 4.8 Data Dictionary -------------------------------------------------- 25 - 26
Page | 1
LIST OF FIGURES
Page
Figure 4.1 Employee Tracking System ER Diagram ----------------------------- 10
Figure 4.2 Log-in Option ------------------------------------------------------------- 14
Figure 4.3 Log-in Form --------------------------------------------------------------- 15
Figure 4.4 User Account Form ----------------------------------------------------- 15
Figure 4.5 Employee Tracking Form ---------------------------------------------- 16
Figure 4.6 Employee DTR ----------------------------------------------------------- 17
Figure 4.7 Payroll Form -------------------------------------------------------------- 18
Figure 4.8 Position Form ------------------------------------------------------------- 19
Figure 4.9 System Menu Form ------------------------------------------------------- 20
Figure 4.11 Freeze -------------------------------------------------------------------- 20
Figure 4.12 Back-up ------------------------------------------------------------------- 21
Figure 4.13 Confirm Back-up -------------------------------------------------------- 21
Figure 4.14 Save Back-up file -------------------------------------------------------- 22
Figure 4.15 Restore ------------------------------------------------------------------- 22
Figure 4.16 Lock for Restore File -------------------------------------------------- 23
Figure 4.17 Confirm Restore ------------------------------------------------------- 23
Figure 4.18 About the Program --------------------------------------------------- 24
Figure 4.19 Log-out ------------------------------------------------------------------ 24
Figure 4.20 Flowchart --------------------------------------------------------- 26 - 27
Page | 2
CHAPTER 1
INTRODUCTION
Nowadays, successful businesses use technology and make the best of it. They use it as a
tool for a progressive production in different aspects of a company. Including organizing,
storing, and securing data and others with technology, and the help of computers,
business transactions goes smoother, faster, and better.
1.1.
1.2.
Page | 3
The above mentioned processes are prone to human error and may lead to
companys incompetence and profit loss. But on these situations may be avoided
with the use of our developed Payroll System.
1.3.
OBJECTIVES
This system aims to assist the company to have an efficient and effective
way of monitoring employees time keeping and payroll system to give a higher
quality and service.
1. To minimize the manual checking of each daily time record.
2. Develop a system that will monitor employees data that is efficient to
3.
4.
5.
6.
7.
1.4.
use.
To provide an easy log-in and log-out of the employees and staff
Calculate payroll transaction easily.
View employees current salary and status.
Provide an efficient and interactive interface for the users.
Have an accurate view on all employees daily record.
1.5.
The proposed system Time Keeping and Payroll System covers many aspects of
time keeping and payroll process. This includes the capture of information based
on the employees work schedule, daily time worked and daily time rendered. The
payroll process encompasses all activities necessary to report employees time
worked. The system will convert the current companys time keeping and payroll
into Visual Basic Program.
1.
2.
3.
4.
5.
The system allows the user to add, edit, and delete employee records.
The system allows to add or delete user accounts.
Calculate payroll transaction easily.
It has log-in log-out process for security purpose.
The administrator or Human Resources will be the one who can
manipulate all the records
LIMITATIONS
With utilization and proper usage, the Payroll System with DTR will
function smoothly to help the company. But there are some limitations in using
the system in order to acquire satisfaction. The following are the limitations of our
system:
Page | 5
CHAPTER 2
METHODOLOGY
In this chapter, it is all about how the proposed system study, being planned, and
design. This also tackles with the gathering procedures, analysis of the data, research
design, and instruments being used.
The Employee tracking and Payroll System focuses on helping the company make
calculations for payslips accurately and smoothly. It also enables the companys
employee to monitor the daily time record with interactive user interface, records, and
datas are easy to manage. Employees can view their current record and salary. The
administrator and Human Resources will handle the encoding and editing of details
depending on what type employee details.
With the help of research, sample online system models, applications especially
the Microsoft Visual Basic and Adobe Photoshop CS3, we were able to create and
propose such reliable system.
VB or Visual Basic is a programming tool that user used to develop Windows or
GUI (Graphical User Interface) applications. It means that rather than writing numerous
line for code to describe the appearance and location for interface elements like C, C++,
Page | 6
or Basic. User can simply drag and drop pre-built objects into the form window on
computer screen.
Adobe Photoshop is an image editing software developed and manufactured by
Adobe System Inc. Photoshop is considered one of the leaders in photo editing software.
The software allows users to manipulate, crop, resize, and correct color on digital photos.
CHAPTER 3
DATA GATHERING PROCEDURES AND OUTPUTS
The proponents conduct internet research to gather more data and topics that are
related to our study. We also conduct interview with the staff of Unident Dental
Laboratory, who offers denture making services and orthodontic equipments located in
Mandaluyong City.
The Timekeeping and Payroll System of Unident Dental Laboratory are
sometimes imprecise to use. Because the employees of the company are using Bundy
Clock to indicate their daily time record of work in and out every day. It is hustle to them
to use long term creating the payroll slip and the time keeping which the Human
Resources need to encode all the attendance of employee using spreadsheets.
Because of the current Timekeeping and Payroll system of Unident Dental
Laboratory, weve decided to do some research on the internet of sample payroll system
to gather more ideas and how to design our proposed system.
Page | 7
CHAPTER 4
PROPOSED SYSTEM
The proposed system is the Employee tracking System. The system aims to assist
the companys payroll department with their calculations practices. With the utilization of
the system, all computations and transactions are expected to be a reliable and accurate.
Employee Tracking System also features the log-in and log-out platform for all
the employees. This is an effective way of monitoring the attendance performance of all
the staff and employees of the company.
Through this system, the administrator has a direct access with the employees
records. The administrator may add, edit, and delete employee records.
Employee tracking System is specifically designed to lessen the wasted time and
efforts exerted to Payroll practices done through manual process. This system made an
automated, reliable, and fast Payroll function possible.
Page | 8
Page | 9
Payroll Department
Id Number
Password
Retype Password
Position
Full Name
Rate
SSS
Bonus
Month13
Phil Health
Salary
Loss Damage
Cash Advance
Loan Interest
Loan amount
Loan Damage
Loan Remain
Total Gross
User
Account
1:N
1:N
Position
1:N
Deactivate
Account
Employee
Id Number
Lname
Fname
MI
Phone
Id Number
Lname
Fname
MI
Phone
Emergency
Email
Contact Number
Spouse
SSS number
1:N
Salary
Loan
1:N
Paid
Date Start
Ca
Date Ended
Basic Pay
Over Time
ABwhole
Holiday
Working Days
Rate
Figure 4.1
This Account table shows all the users of the system. Those who have a right
access with the entire system, and their informations are shown in this table.
Page | 10
Table 4.1
This Deactivated table displays all the employees who are not fortunate enough
to build their dreams along with campaigns growth. Those who are fired, resigned
employees are shown here.
Table 4.2
The DTR Table displays the attendance information of a specific employee. The
login of an employee as well as for the log out, all are displayed in the table.
Page | 11
Table 4.3
This Employees table shows all the list of employees in the company. All the
employees information are located in this table.
Table 4.4
Page | 12
The Position Table show all the rate of employee with respect to its position and
working day. All the condition and application for specific event are showed in this table.
Table 4.5
The Paid Table shows all the employee who were able to be payed and received their
salary, bonus, incentives on a specific time frame.
Table 4.6
The salary loan table display all the employee who was owes a loan from the
company. The amount of the loan and other deductions are shown in this table.
Page | 13
Table 4.7
Figure 4.2
Page | 14
Figure 4.3
1.
2.
3.
4.
5.
Figure 4.4
1. User Accounts List of user accounts.
2. Entry form information to be provided for adding new user.
3. Add Add new user.
Page | 15
4.
5.
6.
7.
8.
Figure 4.5
1.
2.
3.
4.
5.
6.
7.
8.
Page | 16
Figure 4.6
Figure 4.7
Page | 17
1.
2.
3.
4.
5.
6.
7.
Figure 4.8
1. Positions Display all the positions.
2. Rate, Taxes, and Bonuses Display the rate, taxes, and bonuses of particular
3.
4.
5.
6.
position.
Save save changes in rates.
Edit edit rates.
Cancel discard changes
Exit Close
Page | 18
Figure 4.9
1. Freeze - lock the system.
Figure 4.11
1. Unfreeze to unfreeze the program.
Page | 19
Figure 4.12
1. Back up to back-up the database.
Figure 4.13
1. Confirm back - up
Page | 20
Figure 4.14
Figure 4.15
1. Restore to restore the back-up file.
Page | 21
Figure 4.16
Figure 4.17
1. Confirm restore
Page | 22
Figure 4.18
Figure 4.19
1. Log-out quit using system.
DATA DICTIONARY
Page | 23
In this table you can see the different variables that is used and applied on the
system. This Table will help you understand the variables and shows its description.
Attributes
Idnumber
Password
Retype
Fullname
Type
Position
lname
fname
mi
phone
emergency
email
spouse
cnumber
gender
status
hadd
padd
gross
Description
The unique number assigned to
employee
The security code to access an account
The confirmation of the encoded
password
The name of the User and Employee
The type of account (Admin, HR, Payroll
& Employee)
The position assigned to an employee
The Lastname of the employee
The given name of the employee
The middle name of the employee
The home number of an employee
Contact information incase of
emergency
The email address of the employee
Employee's partner
The mobile number of the employee
net
month13
bonus
sss
lossdamages
Type
Numb
er
Text
Text
Text
Text
Text
Text
Text
Text
Numb
er
Text
Text
Text
Numb
er
Text
Text
Text
Text
Numb
er
Numb
er
Numb
er
Numb
er
Numb
er
Numb
Page | 24
cashadvance
datestart
dateended
basicpay
overtime
holiday
rate
overtimerate
overtimetot
statuslog
Datelog
Timein
Timeout
TotalHours
er
Numb
er
Date
Date
Numb
er
Numb
er
Numb
er
Numb
er
Numb
er
Numb
er
Text
Date
Date
Date
Numb
er
FLOWCHART
This Chart shows the step by step procedure of the system.
Page | 25
S
t
Inpu
a
t
Check
User
r
Usern
nam
ame
e
t
and
and
D
is
p
l
a
y
I
Passw
Pass
n
F
ord
on
word
v
a
Emplo
a
l
yees
li
Display
s
table T
d
P
Main
e
on r
aI
Menuu
Ma
Datab
V
n
y
ste T ase
ei
F
F
p
r
r r a
a
e
Empl
u
o
Fil u l
User
w T l Creat
oyee
T
llt T
e e s
Empl
Acco
s e Pay
Empl
r
Detai
r
r
oyee
unt
e slip
e oyee
u
l
u
u
Acco
DTR e
eExit
e
unt
A
B
C
D
F
a
l
s
e
E
v
Positi
e
on ,
n
rates
t
,Tax T
s
And r
Bonuu
s e
F
a
l
s
e
S
y
s
t
e T
Lock
m r
Backu
Up
Restoe
re
F
a
l
s
e
DISP
LAY
ABO
A
UT
b T
o r
u u
t e
E
xL
io
tg
H
I
J
Page | 26
o
u
t
A
B
C
If
Us
er
Ac
If
co
E
un
m
t
pl
is
oy
If
cli
eA
E
ck
cc
m
ed
ou
pl
nt
oy
is
ee
If
cli
de
E
ck
tai
m
ed
If
l
pl
po
is
oy
siti
cli
ee
on
ck
D
rat
ed
TR
e
is
ta
cli
x
ck
bo
ed
nu
s
is
cli
ck
ed
If
Lo
ck
is
If
cli
Us
ck
er
ed
Ba
ck
up
If
is
Re
cli
st
ck
or
ed
e
is
cli
ck
ed
E
E
I
J
Ea
E
E
l
s
F
e
a
l
s
F
e
a
T
r
u
e
T
r
u
e
T
r
u
e
l T
s r
F
e u
a e
T
l
s r
eF u
a e
l
s
e
F
a
l
s
e
F
a
l
s
F
e
a
l
s
e
T
r
u
e
T
r
u
e
T
r
u
e
Add,Edit
And
Delete
Save to
Data
Base
Add, Edit
And
Delete
Add, Edit
And
Activate
Accounts
Display of
sort Daily
Time
Record
Edit of
Rate,Tax,R
ate And
bonus
Save to
Data
Base
Save to
Data
Base
E
E
E
Save to
Data
Base
Save to
Data
Base
Lock
System
Save to
Data
Base
Find File
Path
Save to
Data
Base
Find File
Path
Save to
Data
Base
Page | 27
APPENDIX
SOURCE CODES
User Level
Codes
Private Sub cmdAdmin_Click()
frmLogin.Show
Unload Me
End Sub
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub cmdEmployee_Click()
DTR.Show
Unload Me
End Sub
Private Sub Label3_Click()
End Sub
Page | 28
Employees DTR
Codes
Private Sub cmdCancel_Click()
Unload Me
frmChoices.Show vbModal
End Sub
Private Sub cmdLogout_Click()
If Not adoEmpz.Recordset.EOF Then
adoEmpz.Recordset.MoveFirst
Do While Not adoEmpz.Recordset.EOF
If adoEmpz.Recordset!idnumber = Trim(idnumber.Text) Then
If adoEmpz.Recordset!password = Trim(password.Text) Then
If adoEmpz.Recordset.Fields("condition") = "False" Then
If adoEmpz.Recordset.Fields("time") >= Format(Time, "hh") Then
MsgBox "You cant logout yet. Please wait after half of the day " &
adoEmpz.Recordset.Fields("list") & "!!!", vbInformation
Exit Sub
End If
MsgBox "Greetings " & adoEmpz.Recordset.Fields("Idnumber") & "!!! You logout at exactly "
& Time, vbInformation
adoEmpz.Recordset.Fields("condition") = "True"
adoEmpz.Recordset.Fields("statuslog") = "Logout"
adoEmpz.Recordset.Fields("logoutday") = Format(date, "d")
If adoEmpz.Recordset.Fields("loginday") > adoEmpz.Recordset.Fields("logoutday") Then
adoEmpz.Recordset.Fields("daytot") = adoEmpz.Recordset.Fields("loginday") adoEmpz.Recordset.Fields("logoutday")
tot = adoEmpz.Recordset.Fields("daytot")
If Format(date, "mmmm") = "January" Then
For tot = tot To 31
Page | 29
'MsgBox "January"
adoEmpz.Recordset.Fields("workingdays") = adoEmpz.Recordset.Fields("workingdays")
adoEmpz.Recordset.Update
Next tot
End If
If Format(date, "mmmm") = "February" Then
For tot = tot To febz
'MsgBox "February"
adoEmpz.Recordset.Fields("workingdays") = adoEmpz.Recordset.Fields("workingdays")
+1
adoEmpz.Recordset.Update
Next tot
End If
If Format(date, "mmmm") = "March" Then
For tot = tot To 28
'MsgBox "March"
adoEmpz.Recordset.Fields("workingdays") = adoEmpz.Recordset.Fields("workingdays")
+1
adoEmpz.Recordset.Update
Next tot
End If
If Format(date, "mmmm") = "April" Then
For tot = tot To 31
'MsgBox "April"
adoEmpz.Recordset.Fields("workingdays") = adoEmpz.Recordset.Fields("workingdays")
+1
adoEmpz.Recordset.Update
Next tot
End If
If Format(date, "mmmm") = "May" Then
For tot = tot To 30
'MsgBox "May"
adoEmpz.Recordset.Fields("workingdays") = adoEmpz.Recordset.Fields("workingdays")
+1
adoEmpz.Recordset.Update
Next tot
End If
If Format(date, "mmmm") = "June" Then
For tot = tot To 31
'MsgBox "June"
adoEmpz.Recordset.Fields("workingdays") = adoEmpz.Recordset.Fields("workingdays")
+1
adoEmpz.Recordset.Update
Next tot
End If
Page | 30
Page | 31
adoEmpz.Recordset.Update
Next tot
End If
Else
adoEmpz.Recordset.Fields("workingdays") = adoEmpz.Recordset.Fields("workingdays")
+1
Do While Not adoEmpz.Recordset.Fields("loginday") =
adoEmpz.Recordset.Fields("logoutday")
adoEmpz.Recordset.Fields("loginday") = adoEmpz.Recordset.Fields("loginday") + 1
adoEmpz.Recordset.Fields("workingdays") = adoEmpz.Recordset.Fields("workingdays")
+1
adoEmpz.Recordset.Update
Loop
End If
Exit Sub
End If
MsgBox "You cant logout yet if you did not login " & adoEmpz.Recordset.Fields("Idnumber") &
"!!!", vbInformation
password.Text = ""
idnumber.Text = ""
idnumber.SetFocus
Exit Sub
End If
MsgBox "Wrong Input!", vbInformation
password.Text = ""
idnumber.Text = ""
idnumber.SetFocus
Exit Sub
End If
adoEmpz.Recordset.MoveNext
Loop
MsgBox "Wrong Input!", vbInformation
password.Text = ""
idnumber.Text = ""
idnumber.SetFocus
Exit Sub
End If
End Sub
Page | 32
Page | 33
End Sub
Log-in
Codes
Private Sub cmdBack_Click()
frmChoices.Show
Unload Me
End Sub
Page | 34
Page | 35
User Accounts
Codes
Dim newrec As Boolean
Private Sub level_click()
Timer1.Enabled = False
End Sub
Private Sub add_Click()
Timer1.Enabled = False
fullname.Enabled = True
idnumber.Enabled = True
password.Enabled = True
password2.Enabled = True
level.Enabled = True
position.Enabled = True
newrec = True
DataGrid1.Enabled = False
add.Enabled = False
edit.Enabled = False
delete.Enabled = False
cancel.Enabled = True
Page | 36
save.Enabled = True
adoUserAccount.Recordset.AddNew
fullname.SetFocus
End Sub
Private Sub cancel_Click()
adoUserAccount.Recordset.CancelBatch
adoUserAccount.Refresh
save.Enabled = False
add.Enabled = True
edit.Enabled = True
delete.Enabled = True
newrec = False
cancel.Enabled = False
DataGrid1.Enabled = True
save.Caption = "&Save"
fullname.Enabled = False
idnumber.Enabled = False
password.Enabled = False
password2.Enabled = False
level.Enabled = False
position.Enabled = False
Timer1.Enabled = True
End Sub
Private Sub cmdExit_Click()
adoUserAccount.Recordset.cancel
adoUserAccount.Recordset.CancelBatch adAffectAllChapters
Unload Me
End Sub
Private Sub DataGrid1_Click()
Timer1.Enabled = False
End Sub
Private Sub DataGrid1_Scroll(cancel As Integer)
Timer1.Enabled = False
End Sub
Private Sub delete_Click()
Timer1.Enabled = False
If idnumber.Text = "123" Then
MsgBox "Sorry you can't Delete it..", vbInformation
Exit Sub
Else
If fullname.Text = "" Then
MsgBox "Select a record first to delete..", vbCritical
Else
Page | 37
If MsgBox("are you sure you want to delete " & adoUserAccount.Recordset.Fields("fullname") & "
record?", vbYesNo) = vbYes Then
On Error GoTo ex
adoUserAccount.Recordset.delete adAffectCurrent
Timer1.Enabled = True
End If
ex:
fullname.Enabled = False
idnumber.Enabled = False
password.Enabled = False
password2.Enabled = False
level.Enabled = False
position.Enabled = False
End If
End If
Timer1.Enabled = True
End Sub
Private Sub edit_Click()
Timer1.Enabled = False
If idnumber.Text = "123" Then
MsgBox "Sorry you can't edit this admin..", vbInformation
Exit Sub
Else
fullname.Enabled = True
idnumber.Enabled = True
password.Enabled = True
password2.Enabled = True
level.Enabled = True
position.Enabled = True
newrec = False
save.Enabled = True
cancel.Enabled = True
add.Enabled = False
edit.Enabled = False
delete.Enabled = False
save.Caption = "&Update"
fullname.SetFocus
End If
End Sub
Page | 38
Page | 39
idnumber.Enabled = False
password.Enabled = False
password2.Enabled = False
level.Enabled = False
position.Enabled = False
Else
adoUserAccount.Recordset.CancelBatch
add.Enabled = True
edit.Enabled = True
delete.Enabled = True
save.Caption = "Save"
cancel.Enabled = False
save.Enabled = False
adoUserAccount.Refresh
DataGrid1.Enabled = True
End If
ext:
fullname.Enabled = False
idnumber.Enabled = False
password.Enabled = False
password2.Enabled = False
level.Enabled = False
position.Enabled = False
add.Enabled = True
edit.Enabled = True
delete.Enabled = True
save.Caption = "Save"
cancel.Enabled = False
save.Enabled = False
adoUserAccount.Refresh
Timer1.Enabled = True
End Sub
Private Sub Form_Load()
Me.Top = 1
Me.Left = 1
save.Enabled = False
cancel.Enabled = False
fullname.Enabled = False
idnumber.Enabled = False
password.Enabled = False
password2.Enabled = False
level.Enabled = False
position.Enabled = False
level.AddItem ("Admin")
Page | 40
level.AddItem ("HR")
level.AddItem ("Payroll")
End Sub
Private Sub Timer1_Timer()
DataGrid1.Refresh
adoUserAccount.Refresh
End Sub
Private Sub idnumber_Click()
Timer1.Enabled = False
End Sub
Private Sub idnumber_KeyPress(KeyAscii As Integer)
If (KeyAscii < 48 Or KeyAscii > 57) And KeyAscii <> 8 Then KeyAscii = 0
End Sub
Employees Accounts
Codes
Dim newrec As Boolean
Private Sub level_click()
Timer1.Enabled = False
End Sub
Private Sub idnumber_Click()
Timer1.Enabled = False
End Sub
Private Sub idnumber_KeyPress(KeyAscii As Integer)
If (KeyAscii < 48 Or KeyAscii > 57) And KeyAscii <> 8 Then KeyAscii = 0
End Sub
Page | 41
Page | 42
Page | 43
Exit Sub
Else
fname.Enabled = True
mi.Enabled = True
lname.Enabled = True
idnumber.Enabled = True
password.Enabled = True
password2.Enabled = True
newrec = False
save.Enabled = True
cancel.Enabled = True
add.Enabled = False
edit.Enabled = False
delete.Enabled = False
save.Caption = "&Update"
lname.SetFocus
End If
End Sub
Page | 44
Page | 45
password2.Enabled = False
add.Enabled = True
edit.Enabled = True
delete.Enabled = True
save.Caption = "Save"
cancel.Enabled = False
save.Enabled = False
adoEmployeeAccount.Refresh
Timer1.Enabled = True
End Sub
Private Sub Form_Load()
Me.Top = 1
Me.Left = 1
save.Enabled = False
cancel.Enabled = False
lname.Enabled = False
mi.Enabled = False
fname.Enabled = False
idnumber.Enabled = False
password.Enabled = False
password2.Enabled = False
End Sub
Private Sub Timer1_Timer()
If Not searchtxt.Text = "" Then
adoEmployeeAccount.Recordset.Filter = "lname like '%" & searchtxt.Text & "%'"
Else
DataGrid2.Refresh
adoEmployeeAccount.Refresh
End If
End Sub
Private Sub Timer2_Timer()
DataGrid2.Refresh
adoEmployeeAccount.Refresh
End Sub
Private Sub searchtxt_click()
searchtxt.Text = ""
Timer1.Enabled = True
Timer2.Enabled = False
End Sub
Private Sub searchtxt_GotFocus()
Page | 46
Timer2.Enabled = False
Timer1.Enabled = True
End Sub
Private Sub searchtxt_LostFocus()
Timer1.Enabled = False
Timer2.Enabled = True
End Sub
Employees Detail
Codes
Dim ok As Boolean
Dim notok As Boolean
Dim Active As Boolean
Dim newrec As Boolean
Private Sub cmdActivate_Click()
If MsgBox("Note: You can 'Edit', before you 'Save' to add
AdoDeactivated.Recordset.Fields("list") & " data.", vbOKCancel) = vbOK Then
back
again
"
&
Timer3.Enabled = False
Timer2.Enabled = False
Timer1.Enabled = False
adoEmpz.Recordset.AddNew
cmdAdd.Enabled = False
cmdSave.Enabled = True
cmdEdit.Enabled = False
cmdCancel.Enabled = False
DataEmployee.Enabled = False
searchtxt.Enabled = False
Page | 47
cmdSearch.Enabled = False
cmdActivate.Enabled = False
LockFalse
ok = False
Active = True
Manager.Value = True
DataDeactivated.Enabled = False
fname.Text = AdoDeactivated.Recordset.Fields("fname")
lname.Text = AdoDeactivated.Recordset.Fields("lname")
mi.Text = AdoDeactivated.Recordset.Fields("mi")
phone.Text = AdoDeactivated.Recordset.Fields("phone")
emergency.Text = AdoDeactivated.Recordset.Fields("emergency")
emailadd.Text = AdoDeactivated.Recordset.Fields("email")
spouse.Text = AdoDeactivated.Recordset.Fields("spouse")
scontact.Text = AdoDeactivated.Recordset.Fields("cnumber")
'AdoDeactivated.Recordset.Fields("bday") = bday.Text
haddress.Text = AdoDeactivated.Recordset.Fields("hadd")
paddress.Text = AdoDeactivated.Recordset.Fields("padd")
gender.Text = AdoDeactivated.Recordset.Fields("gender")
status.Text = AdoDeactivated.Recordset.Fields("status")
Else
ok = True
Timer3.Enabled = True
Timer2.Enabled = True
Active = False
End If
End Sub
Private Sub cmdAdd_Click()
Timer3.Enabled = False
Timer2.Enabled = False
Timer1.Enabled = False
adoEmpz.Refresh
AdoDeactivated.Refresh
DataEmployee.Refresh
adoEmpz.Recordset.AddNew
cmdEdit.Enabled = False
Active = False
DataEmployee.Enabled = False
LockFalse
Manager.Value = True
cmdAdd.Enabled = False
cmdCancel.Enabled = True
cmdActivate.Enabled = False
cmdSave.Enabled = True
Page | 48
cmdEdit.Enabled = False
txtEmpty
u=1
For u = u To 10
spouse.Text = "n/a"
scontact.Text = "n/a"
paddress.Text = "n/a"
phone.Text = "n/a"
emergency.Text = "n/a"
emailadd.Text = "n/a"
gender.Text = ""
status.Text = ""
u=1+u
Next u
Manager.Value = True
ok = False
notok = True
lname.SetFocus
End Sub
Private Sub cmdCancel_Click()
Active = False
LockTrue
txtEmpty
Timer3.Enabled = True
Timer2.Enabled = True
Timer3.Enabled = True
adoEmpz.Recordset.CancelBatch
adoEmpz.Refresh
AdoDeactivated.Refresh
DataEmployee.Refresh
cmdCancel.Enabled = False
cmdEdit.Enabled = True
cmdSave.Enabled = False
cmdAdd.Enabled = True
cmdSave.Caption = "&Save"
DataEmployee.Enabled = True
If adoEmpz.Recordset.EOF Then
cmdEdit.Enabled = False
Else
cmdEdit.Enabled = True
End If
End Sub
Page | 49
Page | 50
Salesman.Value = True
End If
lname.SetFocus
Else
ok = False
End If
End Sub
Private Sub cmdSave_Click()
If fname.Text = "" Then
MsgBox "Please enter Firstname", vbCritical
Exit Sub
ElseIf lname.Text = "" Then
MsgBox "Please enter Lastname", vbCritical
Exit Sub
ElseIf mi.Text = "" Then
MsgBox "Please enter MI", vbCritical
Exit Sub
ElseIf phone.Text = "" Then
MsgBox "Please enter Phone", vbCritical
Exit Sub
ElseIf emergency.Text = "" Then
MsgBox "Please enter Emergency", vbCritical
Exit Sub
ElseIf emailadd.Text = "" Then
MsgBox "Please enter Email", vbCritical
Exit Sub
ElseIf spouse.Text = "" Then
MsgBox "Please enter Spouse name", vbCritical
Exit Sub
ElseIf scontact.Text = "" Then
MsgBox "Please enter Spouse Contact Number", vbCritical
Exit Sub
ElseIf haddress.Text = "" Then
MsgBox "Please enter Home Address", vbCritical
Exit Sub
ElseIf paddress.Text = "" Then
MsgBox "Please enter Present Address", vbCritical
Exit Sub
ElseIf gender.Text = "" Then
MsgBox "Please Select Gender", vbCritical
Exit Sub
ElseIf status.Text = "" Then
MsgBox "Please Select Status", vbCritical
Exit Sub
Else
If MsgBox("Are you sure!?!", vbYesNo) = vbYes Then
Page | 51
Page | 52
Page | 53
adoEmpz.Recordset.Fields("sss") = adoEvents.Recordset.Fields("sss")
adoEmpz.Recordset.Fields("bonus") = adoEvents.Recordset.Fields("bonus")
adoEmpz.Recordset.Fields("month13") = adoEvents.Recordset.Fields("month13")
End If
adoEvents.Recordset.MoveNext
Loop
End If
If Manager.Value = True Then
adoEvents.Recordset.MoveFirst
Do While Not adoEvents.Recordset.EOF
If adoEvents.Recordset.Fields("position") = "Manager" Then
adoEmpz.Recordset.Fields("position") = "Manager"
adoEmpz.Recordset.Fields("rate") = adoEvents.Recordset.Fields("rate")
adoEmpz.Recordset.Fields("sss") = adoEvents.Recordset.Fields("sss")
adoEmpz.Recordset.Fields("bonus") = adoEvents.Recordset.Fields("bonus")
adoEmpz.Recordset.Fields("month13") = adoEvents.Recordset.Fields("month13")
End If
adoEvents.Recordset.MoveNext
Loop
End If
If AsstManager.Value = True Then
adoEvents.Recordset.MoveFirst
Do While Not adoEvents.Recordset.EOF
If adoEvents.Recordset.Fields("position") = "Assistant Manager" Then
adoEmpz.Recordset.Fields("position") = "Assistant Manager"
adoEmpz.Recordset.Fields("rate") = adoEvents.Recordset.Fields("rate")
adoEmpz.Recordset.Fields("sss") = adoEvents.Recordset.Fields("sss")
adoEmpz.Recordset.Fields("bonus") = adoEvents.Recordset.Fields("bonus")
adoEmpz.Recordset.Fields("month13") = adoEvents.Recordset.Fields("month13")
End If
adoEvents.Recordset.MoveNext
Loop
End If
If Secretary.Value = True Then
adoEvents.Recordset.MoveFirst
Do While Not adoEvents.Recordset.EOF
If adoEvents.Recordset.Fields("position") = "Secretary" Then
adoEmpz.Recordset.Fields("position") = "Secretary"
adoEmpz.Recordset.Fields("rate") = adoEvents.Recordset.Fields("rate")
adoEmpz.Recordset.Fields("sss") = adoEvents.Recordset.Fields("sss")
adoEmpz.Recordset.Fields("bonus") = adoEvents.Recordset.Fields("bonus")
adoEmpz.Recordset.Fields("month13") = adoEvents.Recordset.Fields("month13")
End If
adoEvents.Recordset.MoveNext
Loop
Page | 54
End If
If OpManager.Value = True Then
adoEvents.Recordset.MoveFirst
Do While Not adoEvents.Recordset.EOF
If adoEvents.Recordset.Fields("position") = "Operation Manager" Then
adoEmpz.Recordset.Fields("position") = "Operation Manager"
adoEmpz.Recordset.Fields("rate") = adoEvents.Recordset.Fields("rate")
adoEmpz.Recordset.Fields("sss") = adoEvents.Recordset.Fields("sss")
adoEmpz.Recordset.Fields("bonus") = adoEvents.Recordset.Fields("bonus")
adoEmpz.Recordset.Fields("month13") = adoEvents.Recordset.Fields("month13")
End If
adoEvents.Recordset.MoveNext
Loop
End If
If PSupervisor.Value = True Then
adoEvents.Recordset.MoveFirst
Do While Not adoEvents.Recordset.EOF
If adoEvents.Recordset.Fields("position") = "Plant Supervisor" Then
adoEmpz.Recordset.Fields("position") = "Plant Supervisor"
adoEmpz.Recordset.Fields("rate") = adoEvents.Recordset.Fields("rate")
adoEmpz.Recordset.Fields("sss") = adoEvents.Recordset.Fields("sss")
adoEmpz.Recordset.Fields("bonus") = adoEvents.Recordset.Fields("bonus")
adoEmpz.Recordset.Fields("month13") = adoEvents.Recordset.Fields("month13")
End If
adoEvents.Recordset.MoveNext
Loop
End If
If warehouseman.Value = True Then
adoEvents.Recordset.MoveFirst
Do While Not adoEvents.Recordset.EOF
If adoEvents.Recordset.Fields("position") = "Warehouseman" Then
adoEmpz.Recordset.Fields("position") = "Warehouseman"
adoEmpz.Recordset.Fields("rate") = adoEvents.Recordset.Fields("rate")
adoEmpz.Recordset.Fields("sss") = adoEvents.Recordset.Fields("sss")
adoEmpz.Recordset.Fields("bonus") = adoEvents.Recordset.Fields("bonus")
adoEmpz.Recordset.Fields("month13") = adoEvents.Recordset.Fields("month13")
End If
adoEvents.Recordset.MoveNext
Loop
End If
If accountant.Value = True Then
adoEvents.Recordset.MoveFirst
Do While Not adoEvents.Recordset.EOF
If adoPost.Recordset.Fields("position") = "Accountant" Then
adoEmpz.Recordset.Fields("position") = "Accountant"
Page | 55
adoEmpz.Recordset.Fields("rate") = adoEvents.Recordset.Fields("rate")
adoEmpz.Recordset.Fields("sss") = adoEvents.Recordset.Fields("sss")
adoEmpz.Recordset.Fields("bonus") = adoEvents.Recordset.Fields("bonus")
adoEmpz.Recordset.Fields("month13") = adoEvents.Recordset.Fields("month13")
End If
adoEvents.Recordset.MoveNext
Loop
End If
'End If '3rd if
adoEmpz.Recordset.Update
adoEmpz.Refresh
AdoDeactivated.Refresh
DataEmployee.Refresh
frmEmployeeDetails.SetFocus
'Unload PostForm
'Unload payroll
Timer1.Enabled = True
DataEmployee.Enabled = True
If notok = True Then
MsgBox "Succesfully Save!", vbInformation
notok = False
Else
MsgBox "Succesfully Updated!", vbInformation
End If
Else
DataEmployee.Enabled = True
txtEmpty
LockTrue
cmdSave.Enabled = False
cmdEdit.Enabled = True
cmdAdd.Enabled = True
cmdCancel.Enabled = False
searchtxt.Enabled = True
cmdSearch.Enabled = True
Timer3.Enabled = True
Timer2.Enabled = True
DataDeactivated.Enabled = True
adoEmpz.Recordset.CancelBatch
adoEmpz.Refresh
adoEmpz.Refresh
Unload payroll
Timer1.Enabled = True
End If ' 2nd if
Page | 56
End If '1st if
cmdAdd.Enabled = True
cmdCancel.Enabled = False
cmdActivate.Enabled = True
cmdSave.Enabled = False
cmdEdit.Enabled = True
searchtxt.Enabled = True
cmdSearch.Enabled = True
cmdSave.Caption = "&Save"
DataEmployee.Enabled = True
DataDeactivated.Enabled = True
cmdActivate.Enabled = True
Timer1.Enabled = True
Timer3.Enabled = True
Timer2.Enabled = True
cmdActivate.BackColor = &H8000000F
LockTrue
End Sub
Private Sub cmdSearch_Click()
Timer2.Enabled = True
End Sub
Page | 57
Page | 58
Page | 59
DataDeactivated.Refresh
DataEmployee.Refresh
searchtxt.Text = ""
AdoDeactivated.Refresh
'If Not AdoDeactivated.Recordset.EOF = True Then
'If cmdActivate.BackColor = &H8000000F Then
'cmdActivate.BackColor = &HC0C0C0'
'Else
'cmdActivate.BackColor = &H8000000F
'End If
'End If
End Sub
Page | 60
Employee DTR
Codes
Dim newrec As Boolean
Private Sub cmdClose_Click()
AdoEmployeeDTR.Recordset.cancel
AdoEmployeeDTR.Recordset.CancelBatch adAffectAllChapters
Unload Me
End Sub
Private Sub cmdPrint_Click()
If Format(date, "dd") <= 18 Then
rprSummary.Show vbModal
MDIForm1.SetFocus
Else
MDIForm1.SetFocus
End If
End Sub
End Sub
Private Sub DataGrid4_ButtonClick(ByVal ColIndex As Integer)
Timer1.Enabled = False
Timer2.Enabled = False
End Sub
Private Sub DataGrid4_Click()
Timer1.Enabled = False
Timer2.Enabled = False
End Sub
Page | 61
Page | 62
Timer2.Enabled = False
End Sub
Private Sub idnumbertxt_GotFocus()
Timer2.Enabled = False
Timer1.Enabled = True
End Sub
Private Sub idnumbertxt_LostFocus()
Timer1.Enabled = False
Timer2.Enabled = True
End Sub
Private Sub idnumbertxt_KeyPress(KeyAscii As Integer)
If (KeyAscii < 48 Or KeyAscii > 57) And KeyAscii <> 8 Then KeyAscii = 0
End Sub
Codes
Private Sub cmdFinish_Click()
If MsgBox("To avoid miscalculation(s), it's highly recommended to double check first before proceeding.
Are you sure to proceed NOW?", vbOKCancel) = vbOK Then
Timer5.Enabled = False
Dim i, j As Integer
lolz = 1000
pb1.Visible = True
pb1.Min = 1
pb1.Max = 500
pb1.Value = 1
Page | 63
For j% = 1 To 500
pb1.Value = j%
j% = j% + 1
'If ok = False Then
If j% = 50 Then
Timer3.Enabled = False
adoEmpz.Refresh
adoLoan.Refresh
adoEmpz.Recordset.MoveFirst
Do While Not adoEmpz.Recordset.EOF
If Not adoEmpz.Recordset.Fields("bonus") = 0 Then
kkk = True
End If
adoEmpz.Recordset.MoveNext
Loop
If kkk = True Then
MsgBox "Employee Bonus reset!"
kkk = False
End If
adoEmpz.Recordset.MoveFirst
Do While Not adoEmpz.Recordset.EOF
If Not adoEmpz.Recordset.Fields("bonus") = 0 Then
adoEmpz.Recordset.Fields("bonus") = 0
adoEmpz.Recordset.Update
End If
adoEmpz.Recordset.MoveNext
Loop
adoPost.Recordset.MoveFirst
Do While Not adoPost.Recordset.EOF
If Not adoPost.Recordset.Fields("bonus") = 0 Then
adoPost.Recordset.Fields("bonus") = 0
adoPost.Recordset.Update
End If
adoPost.Recordset.MoveNext
Loop
End If
If j% = 80 Then
If MsgBox("Would you reset now all the employee Working Days in the record?", vbYesNo) = vbYes Then
If Not adoEmpz.Recordset.EOF Then
adoEmpz.Recordset.MoveFirst
Do While Not adoEmpz.Recordset.EOF
adoEmpz.Recordset.Fields("workingdays") = 0
Page | 64
adoEmpz.Recordset.Update
adoEmpz.Recordset.MoveNext
Loop
End If
End If
End If
If j% = 100 Then
Do While Not adoEmpz.Recordset.EOF
If Not adoEmpz.Recordset.Fields("overtime") = 0 Then
MsgBox "Employee " & adoEmpz.Recordset.Fields("list") & " Overtime(s) Reset!"
adoEmpz.Recordset.Fields("overtimerate") = 0
adoEmpz.Recordset.Fields("overtime") = 0
adoEmpz.Recordset.Update
End If
If Not adoEmpz.Recordset.Fields("cashadvance") = 0 Then
adoEmpz.Recordset.Fields("cashadvance") = 0
adoEmpz.Recordset.Update
MsgBox "Employee " & adoEmpz.Recordset.Fields("list") & " Cash Advance(s) Reset!"
End If
If Not adoEmpz.Recordset.Fields("lossdamages") = 0 Then
adoEmpz.Recordset.Fields("lossdamages") = 0
adoEmpz.Recordset.Update
MsgBox "Employee " & adoEmpz.Recordset.Fields("list") & " Loss tire/Damages(s) Reset!"
End If
adoEmpz.Recordset.MoveNext
Loop
End If
If j% = 150 Then
If Format(date, "dd") <= 18 Then
If Not adoLoan.Recordset.EOF Then
If MsgBox("Would you like to deduct the Salary Loan now?", vbYesNo) = vbYes Then
Do While Not adoLoan.Recordset.EOF
adoLoan.Recordset.Fields("loanremain")
=
adoLoan.Recordset.Fields("loanremain")
adoLoan.Recordset.Fields("loanded")
adoLoan.Recordset.MoveNext
Loop
adoLoan.Recordset.MoveFirst
Else
adoEmpz.Refresh
adoLoan.Refresh
End If
End If
End If
Page | 65
End If
adoEmpz.Refresh
adoEmpz.Recordset.MoveFirst
If j% = 250 Then
If Not adoLoan.Recordset.EOF Then
adoLoan.Recordset.MoveFirst
Page | 66
Unload Me
End If
End Sub
Private Sub cmdPrintPay_Click()
If Format(date, "dd") <= 18 Then
prReports.Show vbModal
MDIForm1.SetFocus
Else
prReports2.Show vbModal
MDIForm1.SetFocus
End If
End Sub
Page | 67
Timer1.Enabled = False
Timer2.Enabled = False
Timer3.Enabled = False
Timer5.Enabled = True
End Sub
Private Sub DataPayed_LostFocus()
'Timer1.Enabled = True
'Timer2.Enabled = True
'Timer5.Enabled = False
End Sub
Private Sub DataPayed_Scroll(cancel As Integer)
Timer1.Enabled = False
Timer2.Enabled = False
Timer3.Enabled = False
End Sub
Private Sub Form_Activate()
Timer2.Enabled = True
If Not adoLoan.Recordset.EOF Then
adoLoan.Recordset.MoveFirst
adoLoan.Recordset.MoveNext
Loop
Page | 68
End If
End Sub
Private Sub Form_Deactivate()
adoEmpz.Refresh
Unload Me
End Sub
Private Sub Form_GotFocus()
Timer2.Enabled = True
End Sub
Private Sub Form_Load()
Me.Top = 1
Me.Left = 1
Timer2.Enabled = True
End Sub
Private Sub searchtxt_click()
searchtxt.Text = ""
Timer1.Enabled = True
Timer2.Enabled = False
End Sub
Private Sub searchtxt_GotFocus()
Timer1.Enabled = True
Timer2.Enabled = False
End Sub
Private Sub searchtxt_LostFocus()
Timer2.Enabled = True
Timer3.Enabled = True
Timer1.Enabled = False
End Sub
Private Sub sss_LostFocus()
Timer1.Enabled = True
If sss.Text = "" Then
sss.Text = 0
End If
ediTe.Value = 0
End Sub
Private Sub Timer1_Timer()
If Not searchtxt.Text = "" Then
If Not adoEmpz.Recordset.EOF Then
adoEmpz.Recordset.Filter = "lname like '%" & searchtxt.Text & "%'"
End If
End If
End Sub
Private Sub Timer2_Timer()
Page | 69
adoEmpz.Refresh
DataPayed.Refresh
End Sub
Private Sub Timer5_Timer()
If sss.Text = "" Then
sss.Text = 0
End If
If lostire.Text = "" Then
lostire.Text = 0
End If
If cashadvance.Text = "" Then
cashadvance.Text = 0
End If
If overtime.Text = "" Then
overtime.Text = 0
End If
If overtimeamount.Text = "" Then
overtimeamount.Text = 0
End If
If sss.Text = "" Then
sss.Text = 0
End If
If Not adoEmpz.Recordset.EOF Then
adoEmpz.Recordset.Fields("basicpay")
adoEmpz.Recordset.Fields("workingdays")
adoEmpz.Recordset.Fields("overtimetot")
adoEmpz.Recordset.Fields("overtimerate")
adoEmpz.Recordset.Fields("totalgross")
adoEmpz.Recordset.Fields("month13")
adoEmpz.Recordset.Fields("overtimetot")
adoEmpz.Recordset.Fields("totalded")
adoEmpz.Recordset.Fields("cashadvance")
If Format(date, "dd") <= 18 Then
adoEmpz.Recordset.Fields("totalded")
adoEmpz.Recordset.Fields("loanded")
Else
salaryloan.Enabled = False
End If
adoEmpz.Recordset.Fields("rate")
adoEmpz.Recordset.Fields("overtime")
adoEmpz.Recordset.Fields("basicpay")
adoEmpz.Recordset.Fields("bonus")
+
+
=
+
=
adoEmpz.Recordset.Fields("lossdamages")
adoEmpz.Recordset.Fields("totalded")
Page | 70
sss.Enabled = False
sss.BackColor = &H80000018
End If
adoEmpz.Recordset.Fields("totalded")
adoEmpz.Recordset.Fields("sss")
Else
sss.Enabled = False
ediTe.Enabled = False
End If
adoEmpz.Recordset.Fields("net")
adoEmpz.Recordset.Fields("totalded")
'If lolz = True Then
adoEmpz.Recordset.Update
'End If
End If
End Sub
adoEmpz.Recordset.Fields("totalded")
adoEmpz.Recordset.Fields("totalgross")
Events
Codes
Dim newrec As Boolean
Private Sub account_DragDrop(Source As Control, X As Single, Y As Single)
End Sub
Private Sub cancel_Click()
adoEvents.Recordset.CancelBatch
Page | 71
adoEvents.Refresh
save.Enabled = False
edit.Enabled = True
newrec = False
cancel.Enabled = False
DataGrid3.Enabled = True
save.Caption = "&Save"
rate.Enabled = False
sss.Enabled = False
pagibig.Enabled = False
philhealth.Enabled = False
bonus.Enabled = False
month13.Enabled = False
Timer1.Enabled = True
End Sub
Private Sub cmdExit_Click()
adoEvents.Recordset.cancel
adoEvents.Recordset.CancelBatch adAffectAllChapters
Unload Me
End Sub
Private Sub DataGrid3_Click()
Timer1.Enabled = False
End Sub
Private Sub DataGrid3_Scroll(cancel As Integer)
Timer1.Enabled = False
End Sub
Private Sub edit_Click()
rate.Enabled = True
sss.Enabled = True
pagibig.Enabled = True
philhealth.Enabled = True
bonus.Enabled = True
month13.Enabled = True
newrec = False
save.Enabled = True
cancel.Enabled = True
edit.Enabled = False
save.Caption = "&Update"
rate.SetFocus
End Sub
Private Sub Form_Deactivate()
Page | 72
Unload Me
End Sub
Private Sub rate_Click()
Timer1.Enabled = False
End Sub
Private Sub sss_click()
Timer1.Enabled = False
End Sub
Private Sub pagibig_Click()
Timer1.Enabled = False
End Sub
Private Sub philhealth_Click()
Timer1.Enabled = False
End Sub
Private Sub bonus_Click()
Timer1.Enabled = False
End Sub
Private Sub month13_Click()
Timer1.Enabled = False
End Sub
Page | 73
Else
adoEvents.Recordset.CancelBatch
edit.Enabled = True
save.Caption = "Save"
cancel.Enabled = False
save.Enabled = False
adoEvents.Refresh
DataGrid3.Enabled = True
End If
ext:
rate.Enabled = False
sss.Enabled = False
pagibig.Enabled = False
philhealth.Enabled = False
bonus.Enabled = False
month13.Enabled = False
edit.Enabled = True
save.Caption = "Save"
cancel.Enabled = False
save.Enabled = False
adoEvents.Refresh
Timer1.Enabled = True
End Sub
Private Sub Form_Load()
Me.Top = 1
Me.Left = 1
save.Enabled = False
cancel.Enabled = False
rate.Enabled = False
sss.Enabled = False
pagibig.Enabled = False
philhealth.Enabled = False
bonus.Enabled = False
month13.Enabled = False
End Sub
Private Sub Timer1_Timer()
DataGrid3.Refresh
adoEvents.Refresh
End Sub
Page | 74
Freeze
Codes
Private Sub cmdUnfreeze_Click()
AdoFreeze.RecordSource = "select * from Account where Password = '" + txtFreeze.Text + "' "
AdoFreeze.Refresh
If AdoFreeze.Recordset.EOF Then
txtFreeze.Text = ""
txtFreeze.BackColor = &HC0C0FF
txtFreeze.SetFocus
Else
If AdoFreeze.Recordset.Fields("Type") = "Admin" Then
MDIForm1.Enabled = True
Unload Me
ElseIf AdoFreeze.Recordset.Fields("Type") = "HR" Then
MDIForm1.Enabled = True
Unload Me
ElseIf AdoFreeze.Recordset.Fields("Type") = "Payroll" Then
MDIForm1.Enabled = True
Unload Me
End If
End If
End Sub
Private Sub Form_Load()
Page | 75
MDIForm1.Enabled = False
End Sub
Private Sub txtFreeze_Change()
If txtFreeze.BackColor = &HC0C0FF Then txtFreeze.BackColor = &HFFFFFF
End Sub
Private Sub txtFreeze_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmdUnfreeze_Click
End If
End Sub
Back-Up
Codes
Private Sub mnuBackup_Click()
MsgBox "Are you sure you want to make a new backup?", vbOKCancel, "CONFIRM BACKUP"
Dim FsFile As New FileSystemObject
With dialogbackup
.FileName = ""
.Filter = "*.mdb"
.CancelError = False
.ShowSave
If .FileName <> "" Then
FsFile.CopyFile (App.Path & "\ETS.mdb"), .FileName & ".mdb"
MsgBox "Back-up Complete", vbInformation, Me.Caption
End If
End With
End Sub
Page | 76
Restore
Codes
Private Sub mnuRestore_Click()
Dim FsFile As New FileSystemObject
With dialogbackup
.FileName = ""
.Filter = "*.mdb"
.CancelError = False
.ShowOpen
If .FileName <> "" Then
MsgBox "Are you sure you want to restore this backup?", vbQuestion + vbOKCancel, "CONFIRM
RESTORE"
FsFile.CopyFile .FileName, App.Path & "\ETS.mdb"
MsgBox "Restoration Complete", vbInformation, Me.Caption
End If
End With
End Sub
Page | 77
About
Codes
Private Sub Label3_Click()
End Sub
Private Sub Timer1_Timer()
Static count As Integer
count = count + 1
If count = 1 Then
lblDabase = "Alday, Michael Kelvin M."
Page | 78
Log-out
Codes
Private Sub mnuLogout_Click()
Unload Me
frmLogin.Show
End Sub
Page | 79
Page | 80