Visual Basic and MS Access Project Report in Electricity Billing System
Visual Basic and MS Access Project Report in Electricity Billing System
1. INTRODUCTION:
1.1 Introduction to Proposed System
Our project entitled Electricity Billing System aims
is to generate electricity bill with all the charges and
penalty. Manual system that is employed is extremely
laborious and quite inadequate. It only makes the
process more difficult and hard.
The aim of our project is to develop a system that
is meant to partially computerize the work performed in
the Electricity Board like generating monthly electricity
bill, record of consuming unit of energy, store record of
the customer and previous unpaid record.
We used Microsoft Visual Basic 6.0 as front end and
MS-Access 2000 as back end for developing our project.
Visual Basic is primarily a visual design environment. We
can create a VB application by designing the form and
that make up the user interface. Adding visual basic
application code to the form and the objects such as
buttons and text boxes on them and adding any
required support code in additional modular.
Microsoft Access 2000 is a powerful relational
database application with which a desktop user can
efficiently create and manipulate database systems.
2. SYSTEM STUDY:
2.1 Scope:
Our project aims at Business process automation, i.e.
we have tried to computerize various processes of
Electricity Billing System. In the sector of electricity
board we have computerizes their department and stock
maintenance.
Scope of any software depends upon the following
things:
1. It satisfy the user requirement
2. Be easy to understand by the user and operator
3. Be easy to operate
4. Have a good user interface
5. Be expandable
6. Delivered on schedule within the budget.
We have tried to make such type of software, which
satisfy the above given requirement.
3. SYSTEM ANALYSIS:
3.1 Identification Of Problem:
The old manual system was suffering from a series of
drawbacks. Since whole of the system was to be
maintained
with
hands
the
process
of
keeping,
to
go
through
the
different
registers,
There
of
would
time
always
while
be
entering
unnecessary
records
and
management
in
decision-making
and
cost
required
frequency
and
distribution
for
each
document.
Probable sources of information for each document and
report.
With the implementation of computerized system, the
task of keeping records in an organized manner will be
solved. The greatest of all is the retrieval of information,
which will be at the click of the mouse. So the proposed
system helps in saving the time in different operations
and making information flow easy giving valuable
reports.
or
not.
This
entails
identification,
We
analyze
the
candidate
system
(computerized
4. SYSTEM DEVELOPMENT
ENVIRONMENT:
System development environment shows the hardware
and software requirement, which is necessary for
developing
the
software.
Necessary
software
and
5. INTRODUCTION TO TOOLS:
5.1 Introduction of Visual Basic:
Over past few years visual basic 6.0 (front end) the
relational data base management system has been finetuning it is offering a large complex application in the
relational market. Visual basic 6.0 is a front end (i.e.
uses graphical user interface) visual basic 6.0 uses
windows environment. It may use any DBMS or RDBMS
as
back-end
through
ODBC
(open
database
connectivity).
For our purpose of development, in our project we used
Visual Basic 6.0 because visual basic 6.0 has following
outstanding features and qualities.
Advantages Of Visual Basic:
1. Visual Basic applications are event driven. Event
driven means the user is in
Control of the application.
2. Visual Basic supports the principle of object-oriented
design.
3. Visual Basic is a complete window application
development system.
The
graphical
user
interface
provides
graphical
DBMS
cores
follow
the
open
database
processing
and
co-operating
application
among
multiple
clients
that
concurrently
Network
components:
for
connecting
the
first
two
The
system
both
client
and
server
run
the
past
several
years,
relational
database
increase
programmer
the
by
productivity
eliminating
of
the
the
need
application
to
change
in
recent
years,
the
appeal
of
relational
same
database.
Access
uses
File-server
popular
Microsoft
word
and
Excel
applications
for
sector
initiated
Database
Software.
development
Database
of
softwares
modern
offers
number of potential advantages over traditional fileprocessing system; some of them are as follows:
Program-Data Independence
With
the
database
approach,
data
separate
and
redundant
data
files
are
approach
support,
the
database
administration
of
establishing
These
standards
data
quality
and
will
enforcing
include
standards
and
data
naming
uniform
programs.
application
programs.
In
database
6. PRELIMINARY DESIGN OF
PROPOSED SYSTEM:
6.1 Data Design:
In most situations, many physical database design
decisions are implicit or eliminated when we choose the
database management technologies to use with the
information system we are designing. Since many
organizations have standard for operating systems,
database
management
system
and
data
access
different
relative
importance
for
different
applications:
i.)
ii.)
Data Type
Text
Date/Ti
me
Number
Description
Valid String
Valid calendar date and time
Number with a specified number
of digits
control
in
programs
may
be
inconsistently
the
record
and
also
can
see
the
name
bill_date,total_bill etc.
Commercial report form and home report form are used
for getting the total record of the domestic bill and
commercial bill in printed form.
7. ARCHITECTURAL DESIGN:
7.1 SDLC(System Development Life Cycle):
System development life cycle is a sequence of events
carried out by analyst, designers and users to develop
and important an information system.
Activities are carried out in different stages.
The phases are as follows:
1. Preliminary Investigation (Feasibility Study)
system.
three
major
areas
to
consider
Technical Feasibility
Economical Feasibility
while
Operational Feasibility
Technical Feasibility:
The
Analyst
finds
out
whether
current
technical
Management time
Operational Feasibility:
Operational feasibility is dependent upon determining
human resources for the project. It refers to projecting
whether the system will operate and be used once it is
installed.
The document to be produced at the end of this activity
is called FEASIBILITY STUDY REPORT
2. Determination Of Requirements (Analysis)
and
carry
out
maintenance
once
the
for
process
modeling
which
involves
graphically
id,
centre,
his
electricity
bill
description, which contain bill no, bill date, total bill etc.
we can also calculate total bill of the customer according
to total unit, bill charge of the bill.
2. Commercial Bill Information Module:
There is no difference between domestic bill information
module and this module except that, this module is for
commercial purpose. We can see information related to
the
commercial bill
module
can
also
perform
deleting
record
are
some
rules,
which
defines
the
3.
enters
shows
the
same
meaning.
For
Coding Section
Of the Project
Electricity Billing System
Questions.Show
End Sub
Private Sub rental_report_Click()
RentalSlot.Show
End Sub
Private Sub rental_slot_Click()
frmRentalSlot.Show
End Sub
Private Sub Results_Click()
ResultReport.Show
End Sub
Private Sub student_management_Click()
frmStudent.Show
End Sub
Private Sub student_report_Click()
StudentReport.Show
End Sub
Private Sub subject_management_Click()
frmConnectionType.Show
End Sub
Private Sub branch_management_Click()
frmBranch.Show
End Sub
Private Sub subject_report_Click()
SubjectReport.Show
End Sub
Private Sub teacher_management_Click()
frmTeacher.Show
End Sub
Private Sub teacher_report_Click()
TeacherReport.Show
End Sub
Private Sub users_management_Click()
frmUsers.Show
End Sub
connection_id.Text = itemListing.SelectedItem.Text
connection_customer.Text = itemListing.SelectedItem.SubItems(1)
connection_ctype.Text = itemListing.SelectedItem.SubItems(2)
connection_address1.Text = itemListing.SelectedItem.SubItems(3)
connection_address2.Text = itemListing.SelectedItem.SubItems(4)
connection_city.Text = itemListing.SelectedItem.SubItems(5)
connection_state.Text = itemListing.SelectedItem.SubItems(6)
connection_pincode.Text = itemListing.SelectedItem.SubItems(7)
connection_description.Text = itemListing.SelectedItem.SubItems(8)
End Sub
Public Function fillConnectionType()
Set rs = New ADODB.Recordset
rs.Open "select * from connection_type", cn, adOpenKeyset, adLockOptimistic
Do While Not rs.EOF = True
connection_ctype.AddItem rs!ctype_name
rs.MoveNext
Loop
rs.Close
End Function
Public Function fillCustomer()
Set rs = New ADODB.Recordset
rs.Open "select * from customer", cn, adOpenKeyset, adLockOptimistic
Do While Not rs.EOF = True
connection_customer.AddItem rs!customer_id
rs.MoveNext
Loop
rs.Close
End Function
Next
End Function
rs!customer_mobile = customer_mobile.Text
rs!customer_address = customer_address.Text
rs!customer_address2 = customer_address2.Text
If customer_male.Value = True Then rs!customer_gender = 1
If customer_female.Value = True Then rs!customer_gender = 2
rs.Update
MsgBox "successfully Update", vbInformation
Call frmclear
Call List_Fill
End Sub
Public Function frmclear()
For Each Control In Me
If TypeOf Control Is TextBox Then
Control.Text = ""
End If
Next
End Function
Private Sub Form_Load()
Call List_Fill
End Sub
Public Sub List_Fill()
itemListing.ListItems.Clear
Set rs = New ADODB.Recordset
Dim o_ListItem As ListItem
rs.Open "select * from customer", cn, adOpenKeyset, adLockOptimistic
Do While Not rs.EOF = True
Set o_ListItem = itemListing.ListItems.Add(, , rs!customer_id)
o_ListItem.SubItems(1) = rs!customer_name
o_ListItem.SubItems(2) = rs!customer_state
o_ListItem.SubItems(3) = rs!customer_city
o_ListItem.SubItems(4) = rs!customer_email
o_ListItem.SubItems(5) = rs!customer_mobile
o_ListItem.SubItems(6) = rs!customer_address
o_ListItem.SubItems(7) = rs!customer_gender
o_ListItem.SubItems(8) = rs!customer_address2
rs.MoveNext
Loop
rs.Close
End Sub
Private Sub itemListing_ItemClick(ByVal Item As MSComctlLib.ListItem)
customer_id.Text = itemListing.SelectedItem.Text
customer_name.Text = itemListing.SelectedItem.SubItems(1)
customer_state.Text = itemListing.SelectedItem.SubItems(2)
customer_city.Text = itemListing.SelectedItem.SubItems(3)
customer_email.Text = itemListing.SelectedItem.SubItems(4)
customer_mobile.Text = itemListing.SelectedItem.SubItems(5)
customer_address.Text = itemListing.SelectedItem.SubItems(6)
customer_address2.Text = itemListing.SelectedItem.SubItems(8)
If itemListing.SelectedItem.SubItems(7) = 1 Then
customer_male.Value = True
Else
customer_female.Value = True
End If
End Sub
End Sub
Public Sub List_Fill()
itemListing.ListItems.Clear
Set rs = New ADODB.Recordset
Dim o_ListItem As ListItem
If userLevel = "Customer" Then
rs.Open "select * from bill, conection, customer WHERE bill_connection =
connection_id AND connection_customer = customer_id and customer_id = " &
userLoginID & " ", cn, adOpenKeyset, adLockOptimistic
Else
rs.Open "select * from bill", cn, adOpenKeyset, adLockOptimistic
End If
Do While Not rs.EOF = True
Set o_ListItem = itemListing.ListItems.Add(, , rs!bill_id)
o_ListItem.SubItems(1) = rs!bill_connection
o_ListItem.SubItems(2) = rs!bill_month
o_ListItem.SubItems(3) = rs!bill_total_units
o_ListItem.SubItems(4) = rs!bill_fix_charge
o_ListItem.SubItems(5) = rs!bill_energy_charge
o_ListItem.SubItems(6) = rs!bill_electricity_duty
o_ListItem.SubItems(7) = rs!bill_sur_charges
o_ListItem.SubItems(8) = rs!bill_total
rs.MoveNext
Loop
rs.Close
End Sub
Private Sub itemListing_ItemClick(ByVal Item As MSComctlLib.ListItem)
bill_id.Text = itemListing.SelectedItem.Text
bill_connection.Text = itemListing.SelectedItem.SubItems(1)
bill_month.Text = itemListing.SelectedItem.SubItems(2)
bill_total_units.Text = itemListing.SelectedItem.SubItems(3)
bill_fix_charge.Text = itemListing.SelectedItem.SubItems(4)
bill_energy_charge.Text = itemListing.SelectedItem.SubItems(5)
bill_electricity_duty.Text = itemListing.SelectedItem.SubItems(6)
bill_sur_charges.Text = itemListing.SelectedItem.SubItems(7)
bill_total.Text = itemListing.SelectedItem.SubItems(8)
billID = bill_id.Text
End Sub
Public Function fillConnection()
End Sub
Public Sub List_Fill()
itemListing.ListItems.Clear
Set rs = New ADODB.Recordset
Dim o_ListItem As ListItem
If userLevel = "Customer" Then
rs.Open "select * from bill, conection, customer WHERE bill_connection =
connection_id AND connection_customer = customer_id and customer_id = " &
userLoginID & " ", cn, adOpenKeyset, adLockOptimistic
Else
rs.Open "select * from bill", cn, adOpenKeyset, adLockOptimistic
End If
Do While Not rs.EOF = True
Set o_ListItem = itemListing.ListItems.Add(, , rs!bill_id)
o_ListItem.SubItems(1) = rs!bill_connection
o_ListItem.SubItems(2) = rs!bill_month
o_ListItem.SubItems(3) = rs!bill_total_units
o_ListItem.SubItems(4) = rs!bill_fix_charge
o_ListItem.SubItems(5) = rs!bill_energy_charge
o_ListItem.SubItems(6) = rs!bill_electricity_duty
o_ListItem.SubItems(7) = rs!bill_sur_charges
o_ListItem.SubItems(8) = rs!bill_total
rs.MoveNext
Loop
rs.Close
End Sub
Private Sub itemListing_ItemClick(ByVal Item As MSComctlLib.ListItem)
bill_id.Text = itemListing.SelectedItem.Text
bill_connection.Text = itemListing.SelectedItem.SubItems(1)
bill_month.Text = itemListing.SelectedItem.SubItems(2)
bill_total_units.Text = itemListing.SelectedItem.SubItems(3)
bill_fix_charge.Text = itemListing.SelectedItem.SubItems(4)
bill_energy_charge.Text = itemListing.SelectedItem.SubItems(5)
bill_electricity_duty.Text = itemListing.SelectedItem.SubItems(6)
bill_sur_charges.Text = itemListing.SelectedItem.SubItems(7)
bill_total.Text = itemListing.SelectedItem.SubItems(8)
billID = bill_id.Text
End Sub
Public Function fillConnection()
End Sub
Private Sub tmrblink_Timer()
If lblblink.Visible = True Then
lblblink.Visible = False
ElseIf lblblink.Visible = False Then
lblblink.Visible = True
End If
End Sub
rs.Open "select * from rental where rental_id =" & ID & " ", cn, adOpenKeyset,
adLockOptimistic
If rs.EOF = True Then
MsgBox "Record Not Found", vbInformation, "Not Exit"
Exit Sub
Else
rental_id.Text = rs!rental_id
rental_ctype.Text = rs!rental_ctype
rental_charge.Text = rs!rental_charge
rental_start.Text = rs!rental_start
rental_end.Text = rs!rental_end
rs.MoveNext
End If
End Sub
Private Sub cmdupdate_Click()
On Error Resume Next
Dim rs As New ADODB.Recordset
rs.Open "select * from connection where rental_id =" & rental_id.Text & " ", cn,
adOpenKeyset, adLockOptimistic
rs!rental_id = rental_id.Text
rs!rental_ctype = rental_ctype.Text
rs!rental_charge = rental_charge.Text
rs!rental_start = rental_start.Text
rs!rental_end = rental_end.Text
rs.Update
MsgBox "successfully Update", vbInformation
Call frmclear
Call List_Fill
End Sub
Public Function frmclear()
For Each Control In Me
If TypeOf Control Is TextBox Then
Control.Text = ""
End If
Next
End Function
Private Sub Form_Load()
Call List_Fill
Call fillConnectionType
End Sub
Public Sub List_Fill()
itemListing.ListItems.Clear
Set rs = New ADODB.Recordset
Dim o_ListItem As ListItem
rs.Open "select * from rental", cn, adOpenKeyset, adLockOptimistic
Do While Not rs.EOF = True
Set o_ListItem = itemListing.ListItems.Add(, , rs!rental_id)
o_ListItem.SubItems(1) = rs!rental_ctype
o_ListItem.SubItems(2) = rs!rental_charge
o_ListItem.SubItems(3) = rs!rental_start
o_ListItem.SubItems(4) = rs!rental_end
rs.MoveNext
Loop
rs.Close
End Sub
Private Sub itemListing_ItemClick(ByVal Item As MSComctlLib.ListItem)
rental_id.Text = itemListing.SelectedItem.Text
rental_ctype.Text = itemListing.SelectedItem.SubItems(1)
rental_charge.Text = itemListing.SelectedItem.SubItems(2)
rental_start.Text = itemListing.SelectedItem.SubItems(3)
rental_end.Text = itemListing.SelectedItem.SubItems(4)
End Sub
Public Function fillConnectionType()
Set rs = New ADODB.Recordset
rs.Open "select * from connection_type", cn, adOpenKeyset, adLockOptimistic
Do While Not rs.EOF = True
rental_ctype.AddItem rs!ctype_name
rs.MoveNext
Loop
rs.Close
End Function
rs.Open "select * from users where user_id = " & ID & " ", cn, adOpenKeyset,
adLockOptimistic
If rs.EOF = True Then
MsgBox "Record Not Found", vbInformation, "Not Exit"
Exit Sub
Else
user_id.Text = rs!user_id
user_name.Text = rs!user_name
user_password.Text = rs!user_password
user_level.Text = rs!user_level
user_user_id.Text = rs!user_user_id
rs.MoveNext
End If
End Sub
Private Sub cmdupdate_Click()
On Error Resume Next
Dim rs As New ADODB.Recordset
rs.Open "select * from users where user_id =" & user_id.Text & " ", cn,
adOpenKeyset, adLockOptimistic
rs!user_id = user_id.Text
rs!user_name = user_name.Text
rs!user_password = user_password.Text
rs!user_level = user_level.Text
rs!user_user_id = user_user_id.Text
rs.Update
MsgBox "successfully Update", vbInformation
Call frmclear
Call List_Fill
End Sub
Public Function frmclear()
For Each Control In Me
If TypeOf Control Is TextBox Then
Control.Text = ""
End If
Next
End Function
Private Sub Form_Load()
Call List_Fill
Call fillLevel
End Sub
Public Sub List_Fill()
itemListing.ListItems.Clear
Set rs = New ADODB.Recordset
Dim o_ListItem As ListItem
rs.Open "select * from users", cn, adOpenKeyset, adLockOptimistic
Do While Not rs.EOF = True
Set o_ListItem = itemListing.ListItems.Add(, , rs!user_id)
o_ListItem.SubItems(1) = rs!user_name
o_ListItem.SubItems(2) = rs!user_password
o_ListItem.SubItems(3) = rs!user_level
o_ListItem.SubItems(4) = rs!user_user_id
rs.MoveNext
Loop
rs.Close
End Sub
Private Sub itemListing_ItemClick(ByVal Item As MSComctlLib.ListItem)
user_id.Text = itemListing.SelectedItem.Text
user_name.Text = itemListing.SelectedItem.SubItems(1)
user_password.Text = itemListing.SelectedItem.SubItems(2)
user_level.Text = itemListing.SelectedItem.SubItems(3)
user_user_id.Text = itemListing.SelectedItem.SubItems(4)
End Sub
Public Function fillLevel()
user_level.AddItem "Admin"
user_level.AddItem "Customer"
End Function
Private Sub user_level_Click()
Set rs = New ADODB.Recordset
user_user_id.Clear
If user_level.Text = "Customer" Then
phases.
first
phase
is
during
the
software
11. CONCLUSION
We have tried to develop a system that can be a great
help for the owner of the referred electricity department
to receiving bill from the customer. Despite all our
efforts there are some bugs in the system, which are
still to be removed. This is possible by the testing being
done in the system.
We have left all the options open so that if there is any
other future requirement in the system by the user for
the enhancement of the system then it is possible to
implement them.
In the last we would like to thanks all the persons
involved in the development of the system directly or
indirectly. We are also thankful to the Rajendra Nagar
South Division Electricity Department for so much taken
by them in helping to develop the system.
We hope that the project will serve its purpose for which
it is develop there by underlining success of process.