2. Visual Basic Project Report
A WORK REPORT SUBMITTED
IN PARTIAL FULLFILLMENT OF THE REQUIREMENT FOR THE DEGREE
Bachelor of Computer Application
Dezyne E´cole College
106/10, CIVIL LINES
AJMER
RAJASTHAN - 305001 (INDIA)
(FEBRUARY, 2018)
www.dezyneecole.com
SUBMITTED BY
PINKLE MAKHIJANI
BCA 3rd year
3. CONTENT
Acknowledgement……………………………………………………………………………………………………………4
Synopsis…………………………………………………………………………………………………………………………..5
Introduction Page of Student …………………………………………………………..……………………………..6
Chapter - 1 Introduction of Information Technology (IT) ………………………………………………….8
Chapter – 2 Introduction to Project ………………………………………………………………………………..11
Chapter – 3 Project & Their facilities ………………………………………………………………………………13
Chapter – 4 Project Design …………………………………………………………………………………………….14
Chapter – 5 Database Development……………………………………………………………………………….17
Chapter-6 System Requirement of PC…………………………………………………………………………….68
Chapter – 7 Conclusion ………………………………………………………………………………………………….69
Bibliography ………………………………………………………………………………………………………………….70
4. Acknowledgement
The satisfaction that accompanies that the successful completion of any task would be
incomplete without the mention of people whose ceaseless co-operation made it possible,
whose constant guidance and encouragement crown all efforts with success.
The project on Supermarket Billing System was developed in Visual Basic Language at
Dezyne E´cole College.
During the making of this project we have learnt a lot and we are extremely grateful and
remain indebted to our guide MR. Tarun Sharma for being a source of inspiration and for his
constant support in the design, implementation and evaluation of the project.
We are thankful to them for their constant constructive criticism and invaluable suggestions,
which benefited us a lot while developing the project on “Supermarket Billing System”.
He has been a constant source of inspiration and motivation for hard work. He has been very
co-operative throughout this project work.
Through this column, we express our warm thanks to him for their encouragement, co-
operation and consent without which we mightn’t be able to accomplish this project.
I cannot move on beloved without thank beloved Principal Mrs. Vinita Mathur for creating
the required academic environment which made my task appreciable.
We would like to thank the other faculty member also, at this occasion. Last but not the least,
we would like to thank our friends & family for support and encouragement they have given
us during the course of our work.
We also thanks our colleague Mr. Rakesh Bijawat who have helped in successful completion
of the project.
With due regards
Ms. Pinkle Makhijani
BCA 3rd Year
5. Synopsis
The project Supermarket Billing System gives us the facility to manage the supermarket
billing system. This application is helpful for staff or admin for billing of products and
managing products details. This application is access by only staff and admin. Members can’t
access it directly.
The project is very useful for those who want to know about Supermarket Billing System. This
application maintains the records related to Products, Employees, and Sales etc.
We can enter the details of new products or employees and retrieve the details of products
and employees available in the System. We can generate the bills for the customers. We can
also maintain the records of customers .In this project we can maintain the GST calculation of
every product. GST can be issued according to Govt. specified categories of all the products.
Total sales can also be maintain in this project. All necessary requirements for the
Supermarket Billing System has presented in this project.
6. Qualification School/Colleg
e
Board/University Year Percentage
BCA-3rd
Year Dezyne E’cole
College
M.D.S. University 2017-18 Pursuing
BCA-2nd
Year Dezyne E’cole
College
M.D.S. University 2016-17 78.22%
BCA-1st
Year Dezyne E’cole
College
M.D.S. University 2015-16 86.44%
12th
East Point Sr.
Sec. School
RBSE 2014-15 72.60%
10th
East Point Sr.
Sec. School
RBSE 2012-13 65.17%
Introduction Page of Student
Pinkle Makhijani
Professional Qualification:
Pursuing Bachelor Degree in Computer Application from Dezyne E’cole College, Ajmer
Affiliated from Maharshi Dayanand Saraswati University, I have mastered the basic
languages and created lot of projects during my study period to hone my skills.
Academic Record -
Technical Skill Set:
Good knowledge of Languages like
C, C++, JAVA, Visual Basic 6.0, Java Script, HTML, CSS, SQL.
Excellent knowledge of Microsoft Office.
Knowledge of Web Design & Development.
Other Skills Like:
Presentation Skill
Co-Curricular and Achievements:-
Participated and presented project on “Money Transaction System” on C++
Language in the yearly Identity Exhibition, 2016 at Dezyne E´cole College.
Participated and presented project on “Shut Down Application” on C
Language in the yearly Identity Exhibition, 2015 at Dezyne E´cole College.
Awarded for Best Performance in Identity Exhibition 2016 in BCA 2nd
year.
Awarded for Best Performance in Identity Exhibition 2015 in BCA 1st
year.
Attended Government Skill Development Program at college PMKVY
(Pradhan Mantri Kaushal Vikas Yojana).
Attended Government Skill Development Program at college NSDC
(National Skill Development Corporation).
7. Main Project Undertaken (During College Study):
C Language Assignment :
This Project includes many C programs for e.g. String Diamond, Power Calculator, Armstrong Calculator,
Prime Number Calculator, Perfect Number Calculator, Student Mark sheet Printer, Palindrome Calculator,
etc.
C++ Language Assignment :
This Project includes many C++ programs for e.g. ATM Machine System,Sorting of Array, Human to
Machine , Palendrome Calculator etc.
C++ Language Assignment :
This Project includes manage transaction of Money and Users Account like Deposit, Withdrawal, Transfer,
Mini Statement, User Account Information etc. and it has two parts that 1 for Exist User and 2 for Create
New User. This project is useful to manage Multiple Users Bank Account and their transactions.
Java Language Assignment :
This Project includes Wrapper class description which is created in MS-Word.
Declaration:
I hereby declare that particulars given here are true and complete to the best of my knowledge and belief.
8. Chapter – 1 Introduction of Information Technology (IT)
Information Technology –
Set of tools, processes, and methodologies (such as coding, programming, data
communication, data conversion, storage & retrieval, system analysis & design, system
control) and associated equipment employee to collect process and present information. In
broad terms, it also includes office automation, multimedia and Tele – communication.
Information Technology, a source we call the “computer”, that can show you what
information via Tele-portal, scoping, working calibration for transmitting throughout the
world.
More commonly known as I.T. is the most popular career and the fastest growing
industry in the world. There are several success stories about people who choose this field for
a career and are now on top of their game.
Few reasons for why people choose IT -
Low cost of education
The biggest advantage of choosing information technology for a career is that
it has very low cost of education as compared to many other career choices.
You don’t need degree to become an I.T. professional. Instead, you can get
quick training to be certified in specific areas of information technology. This
way you save huge amounts of money that you may have otherwise spent on
years of college tuition.
Fastest changing industry
The information technology industry operates at a speed much faster than any
other industry and for this reason, there’s always a significant demand for
highly skilled workers with the innovations in cloud computing, big data and
cyber security an aspiring I.T. professional has many avenues to pursue and
grow from and I.T. professional never stops learning, and must always stay on
top of the latest technology trend in order to be successful in the field. The
more training and knowledge the I.T. professional has the more employable
he or she will be.
Better income
It is well known fact that information technology professionals are paid well,
compared to other professionals. An I.T. professional with the right mix of
certifications & experience can find a permanent position in either the public
or private sector. Recently many companies have been extensively hiring
experts in cloud computing, cyber security and network security to help
enhance their current systems.
9. Bachelor of Computer Application
BCA is a part of information technology. In this age of computers and everything
being digitalized, knowledge about machines is very important. It helps the person have a
distinct advantage over the others who do not have a degree in computer applications. The
domain is growing a rapid pace. In the 1990’s with the advent of globalization computers
grew in prominence and slowly started to replace the paper and files in offices. It brought
down the cost to quite an exist.
BCA is a three year undergraduate degree course. Students will be taught subjects
which are related to the technological applications that are requires in today’s practical work
field.
1. Skills to be learnt –
Students who study for a bachelor of computer application (BCA) will get skills
and information not only about computer and information technology but also
in communication, organization and management.
One also get to learn programming languages such as C, C++, JAVA,
JavaScript, HTML&CSS, SQL, FoxPro etc.
2. Career opportunities –
BCA given a number of opportunities to individuals to go ahead and shine in
their lives. The opportunities available for people doing BCA are galore. A few
of them like software programmer, system and network administrator, web
designer, faculty for computer science / communication technology etc. the
range of chances in information technology are immense.
According to our MDS University we have learnt many theory & practical subjects –
First Year
o Management and accounting
o Computer fundamental
o PC software
o Fundamentals of C Programming
o Data structure and algorithm
o Multimedia Basic
Second year
o Communication skills
o Database management system
o Client server technology
o Java Programming
o C++ Programming
o Computer Graphics
Third year
o Visual Basic Programming
10. o Relational database management system (ORACLE / SQL)
o E - Commerce
o Computer Network and Mobile Computing
o Internet tools & website development (JavaScript, ASP)
o Management Information System
11. Chapter – 2 Introduction to Project
The project is Supermarket Billing System software for monitoring and controlling the
transactions in a supermarket.
The project Supermarket Billing System is developed on visual basic language which
mainly focuses on basic operation in a supermarket like – adding new employee, adding new
products, updating information of employee, searching products and employees and facility
to generate bills of customers and calculate total sales amount of the supermarket.
Supermarket Billing System is a windows application designed to help staff or admin
to maintain & organize supermarket system. Our application is easy to use for both beginners
& advanced users. It features a familiar and well thought – out, an attractive user interface,
combined with strong searching, insertion & deletion capabilities. It can also calculate GST
amount on every product.
The application Supermarket Billing system has four main module –
Insertion, Deletion, Updation to database module – User friendly input screen.
Extracting from the database module –Attractive output screen.
Generate bill module – generate bill of purchased products.
Search facility system Module – Search for products and employees.
Many Supermarkets use this type of billing system for make their work easy. It is also
improved according to requirements of sellers and users. In this Billing System we can
maintain the security feature also.
Why it is made –
The main objective of this project is to provide a friendly environment to maintain the
details of products and employees and generate bill for customers. The main purpose of this
project is replace the manually work.
What Language –
Visual Basic 6.0 Language
Visual basic (VB) is a 3rdgeneration event-driven programming language developed by
Microsoft for their operating system windows. Visual basic is a widely understood high level
programming language, written using simple English. Like – words & syntax.
It is an interpreted language. Code can be run immediately after being written. Having
an interpreter makes its simpler to use, as there is no need for the computer to compile the
code, possibly finding errors to fix, before the compiled version can be run. Once the code is
working, it can be compiled into an .exe file so that it will run on all modern windows
computers, whether VB is installed or not. The language allows a beginning programmer to
produce professional – looking windows applications, as its include drawing tools to create
12. normal windows and structures which allow programs to be adapted for use with the internet.
VB will not run on operating systems other than windows.
Visual Basic has its origin in basic which was developed round about the year 1960,
when high level languages were just being introduced to the computer community. Microsoft
has made it extremely powerful by gearing all its good features to the windows environment.
Evaluation of Visual Basic –
VB 1.0 was introduced in 1991. The drag and drop design for creating the user
interface is derived from prototype from generator developed by Allan cooper and his
company called Tripod. Microsoft contracted with cooper and his associates to develop
Tripod into a programmable form system for windows 3.0, under the code name Ruby (no
relation to the Ruby programming language). Tripod did not include a programming language
at all. Microsoft decided to combine Ruby with the basic language to create Visual Basic.
Need of Visual Basic –
Visual Basic is easy to learn programming language. With Visual Basic you can develop
windows based applications and Games. Visual Basic is much easier to learn than others
language (like Visual C++), and yet it’s powerful programming language. Visual Basic suite
more for desktop application developing than for Games developing. You can create
sophisticated games using Visual Basic, Visual Basic will be probably powerful enough to suite
all your application and games programming needs.
Integrated Development Environment –
The working environment in VB is often referred to as the Integrated Development
Environment or IDE, because it integrates many different functions such as design, editing,
compiling and debugging within a common environment. Since all our projects are
developed only in the IDE.
13. Chapter – 3 Project & Their Facilities
Supermarket Billing System is a project which aims in developing a computerized system to
maintain all the daily work of supermarket. This project has many features which are like –
Admin log or Employee login. It has also a feature of GST calculation of every product. We can
easily add new products and add new employees in the database. It has secured database
and admin and employee can only login with a unique ID and a password.
Overall this project is ours is being developed to help in any supermarket to maintain
the billing facility in the best way possible and also reduce the human efforts.
Here is a list of some features which are in provided in this application –
Keep records of employees and products with Unique ID of every employee.
Easily generate GST calculations on bills.
Accurate data in the database.
Easy way to Log-In and Log-Out.
Bill generation of every customer on their mobile no.
Add data of customers in the database for future use.
No need to invest heavily on hardware.
Objective of Supermarket Billing System –
1. Automation –The application automates each and every activity of the manual system
and increases its throughput. Thus the response time of the system is very less and it
works very fast.
2. Accuracy – The application provides the user a quick response with very accurate
information regarding the bill calculation and customer detail etc. any details or system
in an accurate manner, as when required.
3. User Friendly – The application Supermarket Billing System has a very user friendly
interface. Thus the users will full very easy to work on it. The application provides accuracy
along with a pleasant interface. Make the present manual system more interactive,
speedy and user friendly.
4. Availability – All the Billing details stored permanently in the database admin can see the
data, whatever needed.
5. Maintain Cost – Reduce the cost of maintenance. It is standalone application so no
required of cost for maintain it.
14. Chapter – 4 Project Design
The project design process is not a step by step. But still much of design work depends on
knowledge and experience of the designs, when we start working on project design, we will
face different types of problems. However, following considerations should be kept in mind
during the project design phase:
Design Objectives –
The primary objective of the design of course, is to deliver the requirements as
specified already. In general the following design objectives kept in mind.
Practically –
The system must be stable and can be operated by people with average.
Efficiency –
This involves accuracy, timeliness, and comprehensiveness to the system output.
Cost –
It is desirable to aim for a system with a minimum cost subject to the condition that
it must satisfy all requirements & maintain maintenance.
Flexibility –
The system should be modifiable depending on the changing needs if the user. It
should also be portable to different computer system but not other than Windows OS.
Security –
This is very important aspect of the design and should cover areas of hardware
reliability, fall back procedures, physical security if the data. System design involves first
logical design and then physical construction of the system.
Major Project Design Activities –
Several development activities are carried out during structured design. They are
database design, implementation planning, and system interface.
Design Process –
The system design process is an exercise of specifying how, the system will work. It is
an interactive process which is based on what the system will be do as shown in the report.
Mainly following two parts have been included in the system design process.
15. 1. Output Design –
The starting point of the design process is the proper knowledge of system
requirements which will normally be converted on terms of output.
2. Input Design –
Once the output requirements have been finalized the next step in to find out
what data need to be made available to the system to procedure the desired
outputs.
Data Flow Diagrams of Supermarket Billing System:
DFD Level 0
DFD Level 1
+
DFD Level 2
Admin /
Employee
Request
Response
Admin /
Employee
Supermarket Billing
System Database
Request Request
Response Response
Admin /
Employee
Supermarket Billing
System
Database
Interaction Store in MS Access
Supermarket
Billing System
16. DFD Level 3
DFD Level 4
Admin Supermarket Billing
System
Employee
Employee details Product details Sales details Customer details
Add new, Update, Search, and Remove Sales between
Admin Supermarket Billing
System
Employee
Bill Generation Today’s Sales
17. Chapter – 5 Database Development
This activity deals with the design of the physical database. A key is to determine how the
access path art to be implemented.
As a programmer, we are expected to design and develop any program that works
correctly efficiently and the time is easy to be used by every person, who may or may not be
well versed with computer and its capabilities.
The project is based on the Supermarket Billing System, Being the Information System it
requires extensive use of some Database Management System to store, manipulate & handle
the huge and complex record. In DBMS we can act various attributes with the database like
editing the records, modifications, deletions of the records, view the records in various
formats, listing the database etc.
MS Access –
Microsoft Access is an office product that allows the user to create relational
databases that have tables of data. MS Access stores data in its own format based on the
Access Jet Database Engine. It can also import or link directly to data stored in other
applications & databases. It’s an easy to use tool for quickly creating browser based database
applications.
In very simple term, MS Access is an Information Management tool that helps you
store information for reference, reporting & analysis.
Microsoft Access helps you analyze large amount of information, and manage related
data more efficient than MS Excel or other spreadsheet applications.
In our project we create 12 tables in MS Access-
Admin
21. All Forms and Coding of our project:
Splash Screen
Dim a As Variant
Dim b As Variant
Private Sub Form_Load()
Form1.Left = (Screen.Width - Screen.Width / 2) - (Form1.Width / 2)
Form1.Top = (Screen.Height - Screen.Height / 2) - (Form1.Height / 2)
Timer1.Enabled = True
Form1.BackColor = RGB(247, 204, 120)
a = 1
b = 0
Image1.Picture = LoadPicture("..billingimages2.jpg")
Image2.Picture = LoadPicture("..billingimageslogo1.jpg")
22. Label1.BackColor = RGB(255, 253, 251)
Label2.Visible = False
Label3.Visible = False
Label4.Visible = False
Shape1.FillColor = RGB(30, 99, 213)
Shape2.FillColor = RGB(30, 99, 213)
Shape3.FillColor = RGB(30, 99, 213)
Shape4.FillColor = RGB(30, 99, 213)
Shape5.FillColor = RGB(30, 99, 213)
Shape6.FillColor = RGB(30, 99, 213)
End Sub
Private Sub Timer1_Timer()
If b = 1 Then
Label2.Visible = True
ElseIf b = 2 Then
Label3.Visible = True
Label2.Visible = False
ElseIf b = 3 Then
Label4.Visible = True
Label3.Visible = False
Form2.Show
Form1.Hide
Timer1.Enabled = False
End If
If a = 1 Then
Shape1.Visible = True
Shape2.Visible = False
Shape3.Visible = False
Shape4.Visible = False
23. Shape5.Visible = False
Shape6.Visible = False
a = a + 1
ElseIf a = 2 Then
Shape1.Visible = False
Shape2.Visible = True
Shape3.Visible = False
Shape4.Visible = False
Shape5.Visible = False
Shape6.Visible = False
a = a + 1
ElseIf a = 3 Then
Shape1.Visible = False
Shape2.Visible = False
Shape3.Visible = True
Shape4.Visible = False
Shape5.Visible = False
Shape6.Visible = False
a = a + 1
ElseIf a = 4 Then
Shape1.Visible = False
Shape2.Visible = False
Shape3.Visible = False
Shape4.Visible = True
Shape5.Visible = False
Shape6.Visible = False
a = a + 1
ElseIf a = 5 Then
Shape1.Visible = False
Shape2.Visible = False
24. Shape3.Visible = False
Shape4.Visible = False
Shape5.Visible = True
Shape6.Visible = False
a = a + 1
ElseIf a = 6 Then
Shape1.Visible = False
Shape2.Visible = False
Shape3.Visible = False
Shape4.Visible = False
Shape5.Visible = False
Shape6.Visible = True
a = a + 1
ElseIf a = 7 Then
Shape1.Visible = False
Shape2.Visible = False
Shape3.Visible = False
Shape4.Visible = False
Shape5.Visible = False
a = a + 1
ElseIf a = 8 Then
Shape1.Visible = True
Shape2.Visible = False
Shape3.Visible = False
Shape4.Visible = False
Shape5.Visible = False
a = a + 1
ElseIf a = 9 Then
Shape1.Visible = False
Shape2.Visible = True
25. Shape3.Visible = False
Shape4.Visible = False
Shape5.Visible = False
a = a + 1
ElseIf a = 10 Then
Shape1.Visible = False
Shape2.Visible = False
Shape3.Visible = True
Shape4.Visible = False
Shape5.Visible = False
a = a + 1
ElseIf a = 11 Then
Shape1.Visible = False
Shape2.Visible = False
Shape3.Visible = False
Shape4.Visible = True
Shape5.Visible = False
a = a + 1
ElseIf a = 12 Then
Shape1.Visible = False
Shape2.Visible = False
Shape3.Visible = False
Shape4.Visible = False
Shape5.Visible = True
a = a + 1
ElseIf a = 13 Then
Shape1.Visible = False
Shape2.Visible = False
Shape3.Visible = False
Shape4.Visible = False
a = a + 1
26. ElseIf a = 14 Then
Shape1.Visible = True
Shape2.Visible = False
Shape3.Visible = False
Shape4.Visible = False
a = a + 1
ElseIf a = 15 Then
Shape1.Visible = False
Shape2.Visible = True
Shape3.Visible = False
Shape4.Visible = False
a = a + 1
ElseIf a = 16 Then
Shape1.Visible = False
Shape2.Visible = False
Shape3.Visible = True
Shape4.Visible = False
a = a + 1
ElseIf a = 17 Then
Shape1.Visible = False
Shape2.Visible = False
Shape3.Visible = False
Shape4.Visible = True
a = a + 1
ElseIf a = 18 Then
Shape1.Visible = False
Shape2.Visible = False
Shape3.Visible = False
a = a + 1
27. ElseIf a = 19 Then
Shape1.Visible = True
Shape2.Visible = False
Shape3.Visible = False
a = a + 1
ElseIf a = 20 Then
Shape1.Visible = False
Shape2.Visible = True
Shape3.Visible = False
a = a + 1
ElseIf a = 21 Then
Shape1.Visible = False
Shape2.Visible = False
Shape3.Visible = True
a = a + 1
ElseIf a = 22 Then
Shape1.Visible = False
Shape2.Visible = False
a = a + 1
ElseIf a = 23 Then
Shape1.Visible = True
Shape2.Visible = False
a = a + 1
ElseIf a = 24 Then
Shape1.Visible = False
Shape2.Visible = True
a = a + 1
ElseIf a = 25 Then
Shape1.Visible = False
a = a + 1
28. ElseIf a = 26 Then
Shape1.Visible = True
a = a + 1
ElseIf a = 27 Then
Shape1.Visible = False
Shape2.Visible = False
Shape3.Visible = False
Shape4.Visible = False
Shape5.Visible = False
Shape6.Visible = False
a = a + 1
ElseIf a = 28 Then
b = b + 1
a = 1
End If
End Sub
35. Source Code
Private Sub Form_Load()
Form13.Left = (Screen.Width - Screen.Width / 2) - (Form13.Width / 2)
Form13.Top = (Screen.Height - Screen.Height / 2) - (Form13.Height / 2)
Frame1.BackColor = RGB(255, 230, 217)
Form13.BackColor = RGB(255, 230, 217)
Image3.Picture = LoadPicture("..billingimageslogo2.jpg")
Image2.Picture = LoadPicture("..billingimagesbutton3.jpg")
Image1.Picture = LoadPicture("..billingimagesbutton3.jpg")
Label15.Caption = Date
Call connect
pd.Close
pd.Open "select * from product_details"
If pd.RecordCount = 0 Then
auto = 2001#
Else
Do While Not pd.EOF
t = pd.Fields(0).Value
l = Len(t) - 1
a = Mid(t, 3, l)
If Val(a) > Val(auto) Then
auto = a
End If
pd.MoveNext
Loop
auto = auto + 1
End If
Label12.Caption = "pd" + LTrim(Str(auto))
pd.Close
36. pd.Open "select * from product_category"
If pd.RecordCount >= 1 Then
Form13.Combo1.Clear
Do While Not pd.EOF
Form13.Combo1.AddItem pd.Fields(0).Value
pd.MoveNext
Loop
Else
MsgBox ("No Category Found")
End If
pd.Close
pd.Open "select * from gst"
If pd.RecordCount >= 1 Then
Form13.Combo2.Clear
Do While Not pd.EOF
Form13.Combo2.AddItem pd.Fields(0).Value
pd.MoveNext
Loop
Else
MsgBox ("No Category Found")
End If
pd.Close
End Sub
Private Sub Text2_Change()
a = Val(Text6.Text * Text5.Text)
If Text1.Text <> "" Then
a = a - (a * Text1.Text / 100)
End If
Label9.Caption = a
End Sub
37. Private Sub Image1_Click()
Unload Me
Form7.Show
End Sub
Private Sub Image2_Click()
If Combo1.Text <> "" And Combo2.Text <> "" And Text1.Text <> "" And Text3.Text <> "" And Text4.Text <> "" And
Text5.Text <> "" Then
Call connect
pd.Close
pd.Open "select * from product_details"
pd.AddNew
pd.Fields(0).Value = Label12.Caption
pd.Fields(1).Value = Combo1.Text
pd.Fields(2).Value = Text3.Text
pd.Fields(3).Value = Text4.Text
pd.Fields(4).Value = Text5.Text
pd.Fields(5).Value = Text6.Text
If Text1.Text <> " " Then
pd.Fields(6).Value = Text1.Text
Else
pd.Fields(6).Value = "0"
End If
If Combo2.Text <> " " Then
pd.Fields(7).Value = Combo2.Text
End If
pd.Fields(8).Value = Label9.Caption
pd.Fields(9).Value = Date
pd.Update
pd.Close
MsgBox ("Product inserted")
Unload Me Form13.Show
38. Else
MsgBox ("Please fill all the fields")
End If
End Sub
Private Sub Label17_Click()
If Combo1.Text <> "" And Combo2.Text <> "" And Text1.Text <> "" And Text3.Text <> "" And Text4.Text <> "" And
Text5.Text <> "" Then
Call connect
pd.Close
pd.Open "select * from product_details"
pd.AddNew
pd.Fields(0).Value = Label12.Caption
pd.Fields(1).Value = Combo1.Text
pd.Fields(2).Value = Text3.Text
pd.Fields(3).Value = Text4.Text
pd.Fields(4).Value = Text5.Text
pd.Fields(5).Value = Text6.Text
If Text1.Text <> " " Then
pd.Fields(6).Value = Text1.Text
Else
pd.Fields(6).Value = "0"
End If
If Combo2.Text <> " " Then
pd.Fields(7).Value = Combo2.Text
End If
pd.Fields(8).Value = Label9.Caption
pd.Fields(9).Value = Date
pd.Update
pd.Close
MsgBox ("Product inserted")
Unload Me
39. Update Products
Search Products
Form13.Show
Else
MsgBox ("Please fill all the fields")
End If
End Sub
Private Sub Label19_Click()
Unload Me
Form7.Show
End Sub
Private Sub Timer1_Timer()
Label8.Caption = Time
End Sub
43. Bill Generation
Private Sub Combo2_Click()
Call connect
bill.Close
bill.Open "select * from product_details where pcategory='" & Combo2.Text & "'", con, adOpenKeyset,
adLockOptimistic
If bill.RecordCount >= 1 Then
Combo1.Clear
Do While Not bill.EOF
Combo1.AddItem bill.Fields(2).Value
bill.MoveNext
Loop
End If
bill.Close
End Sub
44. Private Sub Command1_Click()
If IsNumeric(Text5.Text) Then
If Val(Text5.Text) < Val(Label28.Caption) Then
MsgBox ("Please Enter Correct Amount")
Text5.Text = ""
Text5.SetFocus
Else
Label15.Caption = Val(Text5.Text - Label28.Caption)
End If
Else
MsgBox ("Please Enter Numeric Value Only")
Text5.Text = ""
Text5.SetFocus
End If
End Sub
Private Sub Command10_Click()
If ListView1.ListItems.Count >= 1 Then
If Text5.Text <> "" And Label15.Caption <> "" Then
Dim l As ListItem
gst0 = 0
taxableamt0 = 0
gst5 = 0
taxableamt5 = 0
gst9 = 0
taxableamt9 = 0
gst12 = 0
taxableamt12 = 0
gst18 = 0
taxableamt18 = 0
47. ElseIf (g = 28) Then
gst28 = Val(r * g / Val(100 + g))
tgstamt28 = Val(gst28 * q)
taxablerate28 = Val(r - gst28)
taxableamt28 = Val(taxablerate28 * q)
taxableamtsum28 = Val(taxableamtsum28 + taxableamt28)
gstamtsum28 = Val(gstamtsum28 + tgstamt28)
End If
Next
gst = Val(gstamtsum5 + gstamtsum9 + gstamtsum12 + gstamtsum18 + gstamtsum28)
totaltaxablerate = Val(taxableamtsum0 + taxableamtsum5 + taxableamtsum9 + taxableamtsum12 +
taxableamtsum18 + taxableamtsum28)
totalamount = Val(gst + totaltaxablerate)
Label10.Caption = Format(totaltaxablerate, ".00")
Label23.Caption = Format(Val(gst / 2), ".00")
Label24.Caption = Format(Val(gst / 2), ".00")
Label26.Caption = Format(gst, ".00")
Label28.Caption = Round(totalamount)
MsgBox ("Your Total Amount is " + Label28.Caption)
t = MsgBox("Do you want to continue...", vbYesNo)
If (t = 6) Then
Form22.Show
Form20.Hide
End If
Else
MsgBox ("Please Enter Cash Amount and Click on Check")
End If
Else
MsgBox ("Please Choose Your Products")
End If
End Sub
Private Sub Command2_Click()
Text1.Text = ""
48. bill.Close
ElseIf Combo1.Text = "" Or Combo2.Text = "" Or Text4.Text = "" Then
If Combo1.Text = "" Then
MsgBox "Please Choose Product Name"
ElseIf Combo2.Text = "" Then
MsgBox "Please Choose Product Category"
ElseIf Text4.Text = "" Then
MsgBox "Please Enter Quantity"
End If
End If
End Sub
Private Sub Command5_Click()
a = MsgBox("Do you want to remove item", vbYesNo)
If a = 6 Then
ListView1.ListItems.Remove (ListView1.SelectedItem.Index)
Command5.Enabled = False
End If
End Sub
Private Sub Command7_Click()
Dim l As ListItem
gst0 = 0
taxableamt0 = 0
gst5 = 0
taxableamt5 = 0
gst9 = 0
taxableamt9 = 0
gst12 = 0
taxableamt12 = 0
gst18 = 0
taxableamt18 = 0
gst28 = 0
51. ElseIf (g = 28) Then
gst28 = Val(r * g / Val(100 + g))
tgstamt28 = Val(gst28 * q)
taxablerate28 = Val(r - gst28)
taxableamt28 = Val(taxablerate28 * q)
taxableamtsum28 = Val(taxableamtsum28 + taxableamt28)
gstamtsum28 = Val(gstamtsum28 + tgstamt28)
End If
Next
gst = Val(gstamtsum5 + gstamtsum9 + gstamtsum12 + gstamtsum18 + gstamtsum28)
totaltaxablerate = Val(taxableamtsum0 + taxableamtsum5 + taxableamtsum9 + taxableamtsum12 +
taxableamtsum18 + taxableamtsum28)
totalamount = Val(gst + totaltaxablerate)
Label10.Caption = Format(totaltaxablerate, ".00")
Label23.Caption = Format(Val(gst / 2), ".00")
Label24.Caption = Format(Val(gst / 2), ".00")
Label26.Caption = Format(gst, ".00")
Label28.Caption = Round(totalamount)
End Sub
Private Sub Command8_Click()
Form19.Show
Unload Me
End Sub
Private Sub Command9_Click()
Unload Me
Form20.Show
Form20.Label13.Caption = Form19.Label7.Caption
End Sub
Private Sub Form_Load()
Form20.Left = (Screen.Width - Screen.Width / 2) - (Form20.Width / 2)
Form20.Top = (Screen.Height - Screen.Height / 2) - (Form20.Height / 2)
52. Image3.Picture = LoadPicture("..billingimageslogo2.jpg")
Label3.Caption = Date
Form20.BackColor = RGB(255, 230, 217)
Frame2.BackColor = RGB(255, 230, 217)
Frame3.BackColor = RGB(255, 230, 217)
Call connect
bill.Close
bill.Open "select * from bill_details", con, adOpenKeyset, adLockOptimistic
If bill.RecordCount = 0 Then
auto = 1#
Else
Do While Not bill.EOF
If bill.Fields(0).Value > auto Then
auto = Val(bill.Fields(0).Value)
End If
bill.MoveNext
Loop
auto = auto + 1
End If
If Len(auto) = 1 Then
Label11.Caption = "000" + LTrim(Str(auto))
ElseIf Len(auto) = 2 Then
Label11.Caption = "00" + LTrim(Str(auto))
ElseIf Len(auto) = 3 Then
Label11.Caption = "0" + LTrim(Str(auto))
Else
Label11.Caption = auto
End If
bill.Close
bill.Open "select * from product_category"
If bill.RecordCount >= 1 Then
53. Combo2.Clear
Do While Not bill.EOF
Combo2.AddItem bill.Fields(0).Value
bill.MoveNext
Loop
Else
MsgBox ("No Category Found")
End If
bill.Close
End Sub
Private Sub ListView1_ItemClick(ByVal Item As ComctlLib.ListItem)
Command5.Enabled = True
End Sub
Private Sub Text1_Change()
If IsNumeric(Text1.Text) Or Text1.Text = "" Then
If Len(Text1.Text) = 10 Then
Call connect
bill.Close
bill.Open "select * from customer_details"
a = 0
If bill.RecordCount >= 0 Then
Do While Not bill.EOF
If bill.Fields(0).Value = Text1.Text Then
Text2.Text = bill.Fields(1).Value
a = a + 1
End If
bill.MoveNext
Loop
End If
54. If a = 0 Then
Command1.Enabled = True
End If
bill.Close
ElseIf Text1.Text = "" Then
Text2.Text = ""
ElseIf Len(Text1.Text) > 10 Then
MsgBox ("Invalid Mobile Number")
Text1.Text = ""
Text2.Text = ""
End If
Else
MsgBox ("Please Enter Numeric Value Only")
Text1.Text = ""
End If
End Sub
Private Sub Timer1_Timer()
Label5.Caption = Time
End Sub
55. Customers Details
Private Sub Command4_Click()
Call connect
bill.Close
bill.Open "select * from bill_details where bill_no='" & Form20.Label11.Caption & "'", con, adOpenKeyset,
adLockOptimistic
Set DataReport1.DataSource = bill
DataReport1.Show
End Sub
Private Sub Form_Load()
Form22.Left = (Screen.Width - Screen.Width / 2) - (Form22.Width / 2)
Form22.Top = (Screen.Height - Screen.Height / 2) - (Form22.Height / 2)
Form22.BackColor = RGB(255, 230, 217)
Frame1.BackColor = RGB(255, 230, 217)
Image1.Picture = LoadPicture("..billingimagesbutton3.jpg")
56. Image2.Picture = LoadPicture("..billingimagesbutton3.jpg")
Image3.Picture = LoadPicture("..billingimageslogo2.jpg")
Image4.Picture = LoadPicture("..billingimagesbutton3.jpg")
Image5.Picture = LoadPicture("..billingimagesbutton3.jpg")
Label3.Caption = Date
End Sub
Private Sub Image1_Click()
Form21.Show
Form21.Text1.Text = Form22.Text1.Text
Form21.Text2.Text = Form22.Text2.Text
End Sub
Private Sub Image2_Click()
If Text2.Text <> "" Then
Call connect
bill.Close
bill.Open "select * from customer_details", con, adOpenKeyset, adLockOptimistic
bill.AddNew
bill.Fields(0).Value = Text1.Text
bill.Fields(1).Value = Text2.Text
bill.Update
bill.Close
MsgBox ("Data Added...")
Else
MsgBox ("Please fill the Text Field")
End If
End Sub
Private Sub Image4_Click()
Form20.Show
Unload Me
End Sub
Private Sub Image4_Click()
Form20.Show
Unload Me
End Sub
57. pd.Close
cb.Close
bill.Open "select * from bill_details", con, adOpenKeyset, adLockOptimistic
cb.Open "select * from billno", con, adOpenKeyset, adLockOptimistic
pd.Open "select * from product_details", con, adOpenKeyset, adLockOptimistic
Dim l As ListItem
cb.AddNew
cb.Fields(0).Value = Form20.Label11.Caption
cb.Fields(1).Value = Text1.Text
cb.Fields(2).Value = Text2.Text
cb.Fields(3).Value = Form20.Label13.Caption
cb.Fields(4).Value = Date
cb.Fields(5).Value = Time
cb.Update
cb.Close
For i = 1 To Form20.ListView1.ListItems.Count
pd.MoveFirst
Set l = Form20.ListView1.ListItems.Item(i)
bill.AddNew
bill.Fields(0).Value = Form20.Label11.Caption
bill.Fields(1).Value = l.Text
pid = Val(l.Text)
pqty = Val(l.SubItems(3))
Do While Not pd.EOF
If pd.Fields(0).Value = pid Then
If pd.Fields(4).Value >= pqty Then
pd.Fields(4).Value = Val(pd.Fields(4).Value - pqty)
pd.Update
Else
MsgBox ("Product not available")
End If
58. End If
pd.MoveNext
Loop
bill.Fields(2).Value = l.SubItems(1)
bill.Fields(3).Value = l.SubItems(2)
bill.Fields(4).Value = l.SubItems(3)
bill.Fields(5).Value = l.SubItems(4)
bill.Fields(6).Value = l.SubItems(5)
bill.Fields(7).Value = l.SubItems(6)
bill.Fields(8).Value = Date
bill.Fields(9).Value = Time
bill.Fields(10).Value = Form20.Label13.Caption
bill.Update
Next
bill.Close
pd.Close
bill.Open "select * from bill_details where bill_no='" & Form20.Label11.Caption & "'"
Set DataReport1.DataSource = bill
DataReport1.Sections("Section2").Controls("label3").Caption = Date 'date
DataReport1.Sections("Section2").Controls("label7").Caption = Form20.Label11.Caption 'bill no
DataReport1.Sections("Section2").Controls("label5").Caption = Time 'time
DataReport1.Sections("Section2").Controls("label9").Caption = Form20.Label13.Caption 'emp id
If bill.RecordCount >= 1 Then
a = 0
t = 0
q = 0
Do While Not bill.EOF
If bill.Fields(0).Value = Form20.Label11.Caption Then
a = a + 1
DataReport1.Sections("Section1").Controls("Text2").DataField = "p_name"
DataReport1.Sections("Section1").Controls("Text6").DataField = "p_gst"
61. cb.Update
cb.Close
For i = 1 To Form20.ListView1.ListItems.Count
pd.MoveFirst
Set l = Form20.ListView1.ListItems.Item(i)
bill.AddNew
bill.Fields(0).Value = Form20.Label11.Caption
bill.Fields(1).Value = l.Text
pid = Val(l.Text)
pqty = Val(l.SubItems(3))
Do While Not pd.EOF
If pd.Fields(0).Value = pid Then
If pd.Fields(4).Value >= pqty Then
pd.Fields(4).Value = Val(pd.Fields(4).Value - pqty)
pd.Update
Else
MsgBox ("Product not available")
End If
End If
pd.MoveNext
Loop
bill.Fields(2).Value = l.SubItems(1)
bill.Fields(3).Value = l.SubItems(2)
bill.Fields(4).Value = l.SubItems(3)
bill.Fields(5).Value = l.SubItems(4)
bill.Fields(6).Value = l.SubItems(5)
bill.Fields(7).Value = l.SubItems(6)
bill.Fields(8).Value = Date
bill.Fields(9).Value = Time
bill.Fields(10).Value = Form20.Label13.Caption
bill.Update
62. Next
bill.Close
pd.Close
bill.Open "select * from bill_details where bill_no='" & Form20.Label11.Caption & "'"
Set DataReport1.DataSource = bill
DataReport1.Sections("Section2").Controls("label3").Caption = Date 'date
DataReport1.Sections("Section2").Controls("label7").Caption = Form20.Label11.Caption 'bill no
DataReport1.Sections("Section2").Controls("label5").Caption = Time 'time
DataReport1.Sections("Section2").Controls("label9").Caption = Form20.Label13.Caption 'emp id
If bill.RecordCount >= 1 Then
a = 0
t = 0
q = 0
Do While Not bill.EOF
If bill.Fields(0).Value = Form20.Label11.Caption Then
a = a + 1
DataReport1.Sections("Section1").Controls("Text2").DataField = "p_name"
DataReport1.Sections("Section1").Controls("Text6").DataField = "p_gst"
DataReport1.Sections("Section1").Controls("Text3").DataField = "p_qty"
q = Val(q + bill.Fields(4).Value)
DataReport1.Sections("Section1").Controls("Text4").DataField = "p_rate"
DataReport1.Sections("Section1").Controls("Text5").DataField = "total_amount"
t = Val(t + bill.Fields(7).Value)
End If
bill.MoveNext
Loop
End If
DataReport1.Sections("Section5").Controls("label17").Caption = a
DataReport1.Sections("Section5").Controls("label19").Caption = q
DataReport1.Sections("Section5").Controls("label21").Caption = t
64. DataReport1.Show
DataReport1.Left = (Screen.Width - Screen.Width / 2) - (DataReport1.Width / 2)
DataReport1.Top = (Screen.Height - Screen.Height / 2) - (DataReport1.Height / 2)
Form22.Hide
Form19.Show
Unload Form20
Unload Form22
Unload Form21
End Sub
Private Sub Label19_Click()
Form21.Show
Form21.Text1.Text = Form22.Text1.Text
Form21.Text2.Text = Form22.Text2.Text
End Sub
Private Sub Label2_Click()
If Text2.Text <> "" Then
Call connect
bill.Close
bill.Open "select * from customer_details", con, adOpenKeyset, adLockOptimistic
bill.AddNew
bill.Fields(0).Value = Text1.Text
bill.Fields(1).Value = Text2.Text
bill.Update
bill.Close
MsgBox ("Data Added...")
Else
MsgBox ("Please fill the Text Field")
End If
End Sub
65. Private Sub Label7_Click()
Form20.Show
Unload Me
End Sub
Private Sub Text1_Change()
If IsNumeric(Text1.Text) Or Text1.Text = "" Then
If Len(Text1.Text) = 10 Then
Call connect
bill.Close
bill.Open "select * from customer_details"
a = 0
If bill.RecordCount >= 0 Then
Do While Not bill.EOF
If bill.Fields(0).Value = Text1.Text Then
Text2.Text = bill.Fields(1).Value
a = a + 1
End If
bill.MoveNext
Loop
End If
If a = 0 Then
Image2.Enabled = True
Label2.Enabled = True
Text2.Text = ""
End If
bill.Close
ElseIf Text1.Text = "" Then
Text2.Text = ""
Image2.Enabled = False
Label2.Enabled = False
66. ElseIf Len(Text1.Text) > 10 Then
MsgBox ("Invalid Mobile Number")
Image2.Enabled = False
Label2.Enabled = False
Text1.Text = ""
Text2.Text = ""
End If
Else
MsgBox ("Please Enter Numeric Value Only")
Text1.Text = ""
End If
End Sub
Private Sub Timer1_Timer()
Label5.Caption = Time
End Sub
68. Chapter – 6 System Requirements of PC
Processor Core 2 Dual / 4.3 more
RAM 1, 2 GB or more
HDD 500 GB / 1 TB or more
OS Window 7 or Later
Database MS Access 2003
69. Chapter – 7 Conclusion
After we have completed the project we are sure the problems in the existing system world
overcome. The “Supermarket Billing System” process made computerized to reduce human
errors & to increase the efficiency. The main focus of this project is to less human efforts. The
maintenance of the records is made efficient, as all the records are stored in the Access
Database, through which data can be retrieved easily. The navigation control is provided in
all the forms to navigate through the large amount of records. If the numbers of records are
very large than user has to just type in the search string & user gets the results immediately.
The editing is also made simples. The user has to just type in the required field & process the
update button to update the desired field.
The products & employees are given a particular unique id no. so that they can be access
correctly & without errors. Our main aim of the project is to get the correct bills and maintain
the data of the supermarket.
70. Bibliography
www.google.com
www.youtube.com
www.stackoverflow.com
VB Black Book (Author: Steven Holzner)
MS Visual Basic 2010 step by step (Author: Michael Halverson)
The Complete Reference Visual Basic 6 (Author: Noel Jerk)
College Notes