kirtesh khandelwal visual basics project

201
Project Report 2017 Visual Basic Dezyne E’ Cole College 106/10, Civil Lines, Ajmer Tel: 0145-2624679 www.dezyneecole.com 2016-2017 Submitted by: Kirtesh Khandelwal 1

Upload: kirtesh-khandelwal

Post on 22-Jan-2018

73 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Kirtesh Khandelwal Visual Basics Project

Project Report

2017

Visual Basic

Dezyne E’ Cole College

106/10, Civil Lines, Ajmer

Tel: 0145-2624679

www.dezyneecole.com

2016-2017

Submitted by:

Kirtesh Khandelwal

1

Page 2: Kirtesh Khandelwal Visual Basics Project

ACKNOWLEDGEMENT

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 “Restaurant

Billing System”. He has been a constant source of inspiration and motivation for hard

work. He has been very cooperative throughout this project work. Through this

column, it would be our utmost pleasure to express our warm thanks to him for their

encouragement, cooperation and consent without which we mightn’t be able to

accomplish this project.

We also express our gratitude to “Mrs. Vinita Mathur” for providing us the

infrastructure to carry out the project and to all staff members who were directly and

indirectly instrument in enabling us to stay committed for the project.

We also express our gratitude to our college “DEZYNE E’COLE COLLEGE” for

providing us the information to carry out the project and for providing us the

experienced mentors who were directly and indirectly instrument in enabling us to

stay committed for the project.

Page 3: Kirtesh Khandelwal Visual Basics Project

SYNOPSIS

We are creating a software that is Restaurant Billing System. This project is based on

McDonald’s billing of product according to Customer requirement.

This project gives information about:

1. Yearly, Monthly, Daily sales of product.

2. Yearly, Monthly, Daily Best Employee.

3. We can fetch the information or details about the Customers.

4. Only the Authorized person can access this Software.

5. Show the details about the product like product name, price, size etc.

6. Add new Employees and Admin only by the Admin.

7. Delete any Employee and Admin only by the Admin.

8. Easily switch from Admin to Employee panel and from Employee to Admin

panel.

9. Update the product according to Customer requirement.

10. Each Employee and Customer has its unique id so easy to fetch the detail.

11. Automation like auto Id concept, auto Password Generator auto Bill number

generator.

12. Re-generating of bill for the Customer facility.

So overall it give user friendly interface and have unique id and password so all data

is safe from the unauthorized person. This project provides all facilities that is

required in billing system.

Page 4: Kirtesh Khandelwal Visual Basics Project

Introduction of Information Technology

(IT) Information Technology –

The term commonly used as a synonym for computers and computer mentors, but it

also emphasis other information distribution technologies such as television and

telephones.

Several industries are associated with information technology, including computer

hardware, software, electronics, semiconductors, internet, telecommunication

equipment and ecommerce. Human have been storing, retrieving, manipulating and

communicating information since the summaries in Mesopotamia developed

writing in about 3000BC, but the term information technology in the modern sense

first appeared in a 1958 article published in the Howard business Review, authors

Harold T. Leavitt and Thomas L. whisper commented that the new technology does

not yet have a single established name.

We shall call it information technology their definition consist of their categories.

Technique for processing, the application of statistical and mathematics method of

decision making and the simulation of higher order thinking through computer

program.

Based on the storage and processing technologies employed, it is possible to

distinguish four distinct phase of IT development: pre-mechanical (1450-1840),

electromechanical (18401940), electronic (1940-present) and moreover it as a

service. This article focuses on the most recent period (electronic), which began in

about 1940.

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.

Information technology covers a board spectrum of hardware and software solution

that enable organizations to gather, organize and analyze data. It also details

technology based workflow processes.

Page 5: Kirtesh Khandelwal Visual Basics Project

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.

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.

Page 6: Kirtesh Khandelwal Visual Basics Project

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, Oracle, Visual Basics, Asp 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 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

Page 7: Kirtesh Khandelwal Visual Basics Project

Introduction to Project

“Restaurant Billing System” in “Visual Basic Programming Language” which

includes many features like:

Graphical and User friendly interface. Less time consuming. No paper work. Efficient working. Easy updation of database. Login through unique id and password by admin i.e. security from an

unauthorized people.

Why it is made –

The main purpose of this project is replace the manually work. Provide a friendly environment to maintain the details of customer and

employee. This project reduce the paper work. It reduce complexity. Security from unauthorized user. For easy billing of restaurant. Give accurate result.

Visual Basic –

Visual Basic 6.0 Language Visual basic (VB) is a 3rd generation 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 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.

Page 8: Kirtesh Khandelwal Visual Basics Project

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.

Ms-Access Requirement –

All the databases are created in the Microsoft access 2003.

Microsoft access 2003 is the product of Microsoft.

Microsoft access 2003, we create table which is the combination of rows and columns.

When we want to connect Microsoft access database in VB project so we save the Microsoft access file with .mdb extension.

We use Microsoft access 2003 with visual basic because visual basic supports Microsoft access 2003.

We can create multiple tables in single database.

Visual basic does not support Microsoft access 2007 or later version.

Page 9: Kirtesh Khandelwal Visual Basics Project

Project & Their Facilities

The project that I made is “Restaurant Billing System Software”. This project is based

on billing of product.

This project provides all information that required in billing software. This software

describes the working of supermarket. This project contains lots of information will

entered properly.

This project basically works on two categories:-

Front End Back End

Front End - Basically this project work on visual basic. Back End - Basically this project works on MS Access 2003. At the Front hand basically this project works on Visual Basic. It is event

driven programming based project.

At the Back hand basically this project works on Microsoft Access 2003.

My project contains ADODB connectivity with modules and also contains List View

so that all the information shown in List View.

MS Access contains the database and the tables which is help to fetch the records.

The file extension of MS Access 2003 is .MDB.

Why we made this project:-

1. To give knowledge of computer and reduce the work load of human being.

2. In my project there are so many facilities available which get our work easier.

3. It will increase the productivity and reduce the duplicity of data.

4. It will access easier to information related to the student.

5. It will maintain all records and time saving interface application.

6. It reduces the paper work.

7. It is accurate and reduce the complexity.

8. It saves the cost of employee.

9. It will give security to the staff.

10. To provide easy to user interface.

Page 10: Kirtesh Khandelwal Visual Basics Project

Objectives of Restaurant Management 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 user etc. any details or system in an accurate

manner, as when required.

3. User Friendly – The application “Restaurant 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 – The all Restaurant detail store permanently in the database

admin can see the data in the availability of any information, whatever needed.

5. Maintain Cost – Reduce the cost of maintenance. It is standalone

application so no required of cost for maintain it.

DIFFERENT LEVELS OF DFD (Dataflow Diagram) –

0 LEVEL DFD (Dataflow Diagram)

1 LEVEL DFD (Dataflow Diagram)

Restaurent

Billing

System

ADMIN

EMPLOYEE

Restaurent

Billing

System

ADMIN

EMPLOYEE Database

Request Request

Response Response

Page 11: Kirtesh Khandelwal Visual Basics Project

CONFIGURATION MODULES –

EMPLOYEE

ADMIN

ADD

New

ADMIN

ADD

NEW

EMPLOYEE

EMPLOYEE

ALL

FEATURES

ADD

ORDER

MODIFY

ORDER

GENERATE

BILL

Page 12: Kirtesh Khandelwal Visual Basics Project

In this project we create following tables –

1. Admin Details

2. Employee Details

3. Best Employee Details

4. Categories Details

5. Customer Details

6. Menu Details

7. Permanent Details

8. Temporary Details

9. Today Best Details

Admin Details:-

Fields Data

Type

Default Key Extra

ID Text Not Null - Auto

generated

mem_name Text Not Null - -

mem_pass Text Not Null - -

auto_num Number Not Null - -

product_sell Number Not Null - -

Employee Details:-

Fields Data

Type

Default Key Extra

ID Text Not Null - Auto

generated

mem_name Text Not Null - -

mem_pass Text Not Null - -

Page 13: Kirtesh Khandelwal Visual Basics Project

Best Employee Details:-

Categories Details:-

auto_num Number Not Null - Auto

generated

product_sell Number Not Null - -

Fields Data Type Default Key Extra

Emp_id Text Not Null - Auto

increment

Emp_name Text Not Null - -

January Number Not Null - -

Fabrary Number Not Null - -

March Number Not Null - -

April Number Not Null - -

May Number Not Null - -

June Number Not Null - -

July Number Not Null - -

Auguest Number Not Null - -

September Number Not Null - -

October Number Not Null - -

November Number Not Null - -

December Number Not Null - -

Total Number Not Null - -

Fields Data

Type

Default Key Extra

ID Number Not Null - Auto

generated

category Memo Not Null - -

Page 14: Kirtesh Khandelwal Visual Basics Project

Customer Details:-

Menu Details:-

Permanent Details:-

Fields Data Type Default Key Extra

Cname Text Not Null - -

Address Text Not Null - -

Contact Number Not Null - -

Email Number Not Null - -

Pincode Number Not Null - -

auto no Number Not Null - Auto

generated

Mccardno Text Not Null - -

Mccardpass Text Not Null - Auto

generated

Memamt Number Not Null - -

Fields Data Type Default Key Extra

Id Number Not Null - Auto

generated

Category Text Not Null - -

Pname Text Not Null - -

Samt Text Not Null - -

Mamt Text Not Null - -

Lamt Text Not Null - -

Fields Data Type Default Key Extra

cusname Text Not Null - -

cusphno Text Not Null - -

cusdob Date/Time Not Null - -

bill_no Text Not Null - Auto

Page 15: Kirtesh Khandelwal Visual Basics Project

Temporary Details:-

Today Best Details:-

generated

bdate Date/Time Not Null - -

btime Date/Time Not Null - Auto

generated

pname Text Not Null - -

price number Not Null - -

quantity number Not Null - -

vat number Not Null - -

amt number Not Null - -

dis number Not Null - -

ser_tax number Not Null - -

total number Not Null - -

employeee Text Not Null - -

Fields Data Type Default Key Extra

pname Text Not Null - -

price Number Not Null - -

quantity Number Not Null - -

vat Number Not Null - -

amt Number Not Null - -

Fields Data Type Default Key Extra

Tdate Date/Time Not Null - -

Emp1 name Number Not Null - Auto generated

Emp2 name Number Not Null - Auto generated

….. name Number Not Null - Auto generated

Empn name Number Not Null - Auto generated

Page 16: Kirtesh Khandelwal Visual Basics Project

SOFTWARE REQUIREMENTS:-

1. Visual studio 6 which contain visual basic 6.0

2. Microsoft access 2003 which extension should be .MDB

3. GUI(Graphical User Interface) operating system (Window7)

HARDWARE REQUIREMENTS:-

1. Central Processing Unit (RAM, ROM, HARD DISK).

2. Desktop (LCD, LED, CRT, Any visual display).

3. Mouse and Keyboard.

4. Internal Memory 500MB.

5. Minimum 2GB RAM.

MY PROJECT

Login_Form:-

Page 17: Kirtesh Khandelwal Visual Basics Project

Private Sub Command1_Click()

Frame3.Visible = True

Text1.SetFocus

End Sub

Private Sub Command2_Click()

Frame4.Visible = True

Text3.SetFocus

End Sub

Private Sub Command3_Click()

Call terminate

End Sub

Private Sub Command4_Click()

Call terminate

End Sub

Private Sub Command5_Click()

Page 18: Kirtesh Khandelwal Visual Basics Project

Call connect

find = 0

With tmidpass

Do Until .EOF

If ((.Fields(0).Value = Text1.Text Or .Fields(1).Value = Text1.Text) And

(.Fields(2).Value = Text2.Text)) Then

adname = .Fields(1).Value

Order_Now.Label15.Caption = "Current Admin :"

Order_Now.Label16.Caption = adname

find = 1

ElseIf ((.Fields(0).Value = Text1.Text Or .Fields(1).Value = Text1.Text) And

(.Fields(2).Value <> Text2.Text)) Then

find = 2

ElseIf ((.Fields(0).Value <> Text1.Text Or .Fields(1).Value <> Text1.Text)

And (.Fields(2).Value = Text2.Text)) Then

find = 3

End If

.MoveNext

Loop

If find = 1 Then

Main_Interface.Show

Main_Interface.Command3.Enabled = True

Main_Interface.Command1.Enabled = True

Main_Interface.Command11.Enabled = True

Main_Interface.Command4.Enabled = True

Main_Interface.Command12.Enabled = True

Main_Interface.Command13.Enabled = True

Main_Interface.Command5.Enabled = True

Main_Interface.Command3.Visible = True

Main_Interface.Command1.Visible = True

Page 19: Kirtesh Khandelwal Visual Basics Project

Main_Interface.Command11.Visible = True

Main_Interface.Command4.Visible = True

Main_Interface.Command5.Visible = True

Main_Interface.Command12.Visible = True

Main_Interface.Command13.Visible = True

Main_Interface.Command1.Top = 1320

Main_Interface.Command4.Top = 2160

Main_Interface.Command3.Top = 3120

Main_Interface.Command13.Top = 3960

Main_Interface.Command12.Top = 4800

Main_Interface.Command5.Top = 5640

Main_Interface.Command11.Top = 6600

Main_Interface.Command1.Left = 840

Main_Interface.Command4.Left = 840

Main_Interface.Command3.Left = 840

Main_Interface.Command13.Left = 840

Main_Interface.Command12.Left = 840

Main_Interface.Command5.Left = 840

Main_Interface.Command11.Left = 840

Unload Me

ElseIf find = 2 Then

MsgBox ("Wrong Password::Try again"), vbCritical, ("Mcdonald's")

Text2.Text = ""

Text2.SetFocus

ElseIf find = 3 Then

MsgBox ("Invalid ID or Name"), vbCritical, ("Mcdonald's")

Text1.Text = ""

Text1.SetFocus

Else

Page 20: Kirtesh Khandelwal Visual Basics Project

MsgBox ("Fill the Details Correctly"), vbCritical, ("Mcdonald's")

Text2.Text = ""

Text1.Text = ""

Text1.SetFocus

End If

End With

End Sub

Private Sub Command6_Click()

Frame3.Visible = False

End Sub

Private Sub Command7_Click()

Frame4.Visible = False

End Sub

Private Sub Command8_Click()

Call connect

find = 0

With eidpass

Do Until .EOF

If ((.Fields(0).Value = Text3.Text Or .Fields(1).Value = Text3.Text) And

(.Fields(2).Value = Text4.Text)) Then

find = 1

empname = .Fields(1).Value

Order_Now.Label15.Caption = "Current Emp. :"

Order_Now.Label16.Caption = empname

Main_Interface.Command4.Enabled = False

Page 21: Kirtesh Khandelwal Visual Basics Project

Else

If ((.Fields(0).Value = Text3.Text Or .Fields(1).Value = Text3.Text) And

(.Fields(2).Value <> Text4.Text)) Then

find = 2

Else

If ((.Fields(0).Value <> Text3.Text Or .Fields(1).Value <> Text3.Text) And

(.Fields(2).Value = Text4.Text)) Then

find = 3

End If

End If

End If

.MoveNext

Loop

If find = 1 Then

Unload Me

Main_Interface.Command3.Enabled = True

Main_Interface.Command1.Enabled = True

Main_Interface.Command11.Enabled = True

Main_Interface.Command4.Enabled = False

Main_Interface.Command12.Enabled = True

Main_Interface.Command13.Enabled = False

Main_Interface.Command5.Enabled = True

Main_Interface.Command4.Visible = False

Main_Interface.Command13.Visible = False

Main_Interface.Command1.Visible = True

Main_Interface.Command3.Visible = True

Main_Interface.Command12.Visible = True

Main_Interface.Command5.Visible = True

Main_Interface.Command11.Visible = True

Main_Interface.Command1.Top = 1680

Page 22: Kirtesh Khandelwal Visual Basics Project

Main_Interface.Command3.Top = 2760

Main_Interface.Command12.Top = 3840

Main_Interface.Command5.Top = 4920

Main_Interface.Command11.Top = 6000

Main_Interface.Command1.Left = 840

Main_Interface.Command3.Left = 840

Main_Interface.Command12.Left = 840

Main_Interface.Command5.Left = 840

Main_Interface.Command11.Left = 840

Main_Interface.Show

Else

If find = 2 Then

MsgBox ("Wrong Password::Try Again"), vbCritical, ("Mcdonald's")

Text4.Text = ""

Text4.SetFocus

Else

If find = 3 Then

MsgBox ("Invalid ID or Name::Try Again"), vbCritical, ("Mcdonald's")

Text3.Text = ""

Text3.SetFocus

Else

MsgBox ("Fill the Details Correctly"), vbCritical, ("Mcdonald's")

Text3.Text = ""

Text4.Text = ""

Text3.SetFocus

End If

End If

End If

Page 23: Kirtesh Khandelwal Visual Basics Project

End With

End Sub

Private Sub Command9_Click()

Call terminate

End Sub

Private Sub Form_Load()

Frame3.Visible = False

Frame4.Visible = False

End Sub

Private Sub Picture1_Click()

Timer1.Enabled = True

Frame4.Visible = False

Command1.SetFocus

End Sub

Private Sub Picture2_Click()

Timer2.Enabled = True

Frame3.Visible = False

Command3.SetFocus

End Sub

Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)

If Text1.Text = "" Then

Else

Page 24: Kirtesh Khandelwal Visual Basics Project

If ((KeyCode >= 48 And KeyCode <= 57) Or (KeyCode >= 96 And KeyCode <=

105) Or (KeyCode >= 60 And KeyCode <= 90) Or KeyCode = 13 Or KeyCode =

35 Or _

KeyCode = 36 Or KeyCode = 32 Or KeyCode = 8 Or KeyCode = 16 Or KeyCode

= 37 Or KeyCode = 38 Or KeyCode = 39 Or KeyCode = 40) Then

Else

MsgBox ("Not Allowed")

Text1.Text = ""

End If

End If

End Sub

Private Sub Text2_KeyUp(KeyCode As Integer, Shift As Integer)

If (Text2.Text = "") Then

Else

If ((KeyCode >= 48 And KeyCode <= 57) Or (KeyCode >= 96 And KeyCode <=

105) Or KeyCode = 13 Or KeyCode = 35 Or _

KeyCode = 36 Or KeyCode = 32 Or KeyCode = 8 Or KeyCode = 16 Or KeyCode

= 37 Or KeyCode = 38 Or KeyCode = 39 Or KeyCode = 40) Then

Else

MsgBox ("Not Allowed")

Text2.Text = ""

End If

End If

End Sub

Private Sub Text3_KeyUp(KeyCode As Integer, Shift As Integer)

If Text3.Text = "" Then

Else

Page 25: Kirtesh Khandelwal Visual Basics Project

If ((KeyCode >= 48 And KeyCode <= 57) Or (KeyCode >= 96 And KeyCode <=

105) Or (KeyCode >= 60 And KeyCode <= 90) Or KeyCode = 13 Or KeyCode =

35 Or _

KeyCode = 36 Or KeyCode = 32 Or KeyCode = 8 Or KeyCode = 16 Or KeyCode

= 37 Or KeyCode = 38 Or KeyCode = 39 Or KeyCode = 40) Then

Else

MsgBox ("Not Allowed")

Text3.Text = ""

End If

End If

End Sub

Private Sub Text4_KeyUp(KeyCode As Integer, Shift As Integer)

If (Text4.Text = "") Then

Else

If ((KeyCode >= 48 And KeyCode <= 57) Or (KeyCode >= 96 And KeyCode <=

105) Or KeyCode = 13 Or KeyCode = 35 Or _

KeyCode = 36 Or KeyCode = 32 Or KeyCode = 8 Or KeyCode = 16 Or KeyCode

= 37 Or KeyCode = 38 Or KeyCode = 39 Or KeyCode = 40) Then

Else

MsgBox ("Not Allowed")

Text4.Text = ""

End If

End If

End Sub

Private Sub Timer1_Timer()

If Timer1.Enabled = True Then

Picture1.Top = Picture1.Top - 60

Page 26: Kirtesh Khandelwal Visual Basics Project

Timer2.Enabled = False

Picture2.Top = 80

End If

End Sub

Private Sub Timer2_Timer()

If Timer2.Enabled = True Then

Picture2.Top = Picture2.Top - 60

Timer1.Enabled = False

Picture1.Top = 80

End If

End Sub

Main_Interface:-

Page 27: Kirtesh Khandelwal Visual Basics Project

Admin Main Interface:-

Employee Main Interface:-

Dim a As Integer

Private Sub Command1_Click()

Order_Now.Show

Main_Interface.Hide

End Sub

Page 28: Kirtesh Khandelwal Visual Basics Project

Private Sub Command10_Click()

Frame1.Visible = False

Frame2.Enabled = True

Command1.SetFocus

End Sub

Private Sub Command11_Click()

Login_Form.Show

End Sub

Private Sub Command12_Click()

Generate_Bill.Show

End Sub

Private Sub Command13_Click()

Sales.Show

End Sub

Private Sub Command3_Click()

Main_Interface.Enabled = False

Customer_info.Show

Customer_info.Top = 2500

Customer_info.Left = 5820

End Sub

Private Sub Command4_Click()

Frame2.Enabled = False

Frame1.Visible = True

Page 29: Kirtesh Khandelwal Visual Basics Project

Command9.SetFocus

End Sub

Private Sub Command5_Click()

Join_us.Show

Main_Interface.Hide

End Sub

Private Sub Command6_Click()

Add_Emp.Show

Main_Interface.Frame1.Enabled = False

Main_Interface.Enabled = False

Frame1.Visible = False

End Sub

Private Sub Command7_Click()

Delete_Admin.Show

Main_Interface.Frame1.Enabled = False

Main_Interface.Enabled = False

Frame1.Visible = False

End Sub

Private Sub Command8_Click()

Delete_Employee.Show

Main_Interface.Frame1.Enabled = False

Main_Interface.Enabled = False

Frame1.Visible = False

End Sub

Page 30: Kirtesh Khandelwal Visual Basics Project

Private Sub Command9_Click()

Add_Admin.Show

Main_Interface.Frame1.Enabled = False

Main_Interface.Enabled = False

Frame1.Visible = False

End Sub

Private Sub Form_Load()

Main_Interface.BackColor = RGB(241, 6, 11)

Timer1.Enabled = True

End Sub

Private Sub Timer1_Timer()

If a = 0 Then

Label2.Caption = " "

Label2.Caption = "I"

a = 1

ElseIf a = 1 Then

Label2.Caption = " "

Label2.Caption = "I m"

a = 2

ElseIf a = 2 Then

Label2.Caption = " "

Label2.Caption = "I m l"

a = 3

ElseIf a = 3 Then

Label2.Caption = " "

Page 31: Kirtesh Khandelwal Visual Basics Project

Label2.Caption = "I m lo"

a = 4

ElseIf a = 4 Then

Label2.Caption = " "

Label2.Caption = "I m lov"

a = 5

ElseIf a = 5 Then

Label2.Caption = " "

Label2.Caption = "I m lovi"

a = 6

ElseIf a = 6 Then

Label2.Caption = " "

Label2.Caption = "I m lovin"

a = 7

ElseIf a = 7 Then

Label2.Caption = " "

Label2.Caption = "I m lovin i"

a = 8

ElseIf a = 8 Then

Label2.Caption = " "

Label2.Caption = "I m lovin it"

a = 9

ElseIf a = 9 Then

Label2.Caption = " "

Label2.Caption = " "

a = 0

End If

End Sub

Page 32: Kirtesh Khandelwal Visual Basics Project

Update Staff:-

Add Admin:-

Private Sub Command1_Click()

Text2.Enabled = True

Text1.Enabled = True

Page 33: Kirtesh Khandelwal Visual Basics Project

Command3.Enabled = True

Call connect

With tmidpass

If (Label20.Caption = "" And Text2.Text = "" And Label4.Caption = "") Then

m = 0

If .RecordCount = 0 Then

m = 1

Else

.MoveFirst

Do Until .EOF

If .Fields(3).Value > m Then

m = .Fields(3).Value

End If

.MoveNext

Loop

m = m + 1

End If

tmid = "TMid" & Format(m, "0000")

Label20.Caption = tmid

Else

MsgBox ("Please Clear All Boxes")

End If

End With

End Sub

Private Sub Command2_Click()

Unload Me

Page 34: Kirtesh Khandelwal Visual Basics Project

Main_Interface.Show

Main_Interface.Enabled = True

Main_Interface.Frame1.Visible = True

Main_Interface.Frame1.Enabled = True

End Sub

Private Sub Command3_Click()

Label20.Caption = ""

Text2.Text = ""

Text1.Text = ""

Label4.Caption = ""

End Sub

Private Sub Command4_Click()

If (Text2.Text = "") Then

MsgBox ("Enter the name Plzzzz..")

End If

Call connect

With tmidpass

If (Label20.Caption <> "" And Text2.Text <> "" And Label4.Caption = "") Then

apass = 1111

m = 0

If .RecordCount = 0 Then

m = 1

apass = 1111

Else

.MoveFirst

Do Until .EOF

Page 35: Kirtesh Khandelwal Visual Basics Project

If .Fields(3).Value > m Then

m = .Fields(3).Value

apass = apass + 11

End If

.MoveNext

Loop

m = m + 1

End If

.AddNew

.Fields(0) = Label20.Caption

.Fields(1) = StrConv(Text2.Text, vbProperCase)

.Fields(2) = apass

.Fields(3) = m

.Fields(4) = 0

.Update

Label4.Caption = apass

End If

End With

End Sub

Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)

If (Text1.Text <> "") Then

length = Len(Text1.Text)

i = 0

gap = 1

Do Until i = length

c = (Asc(Right(Text1.Text, (i + 1))))

Page 36: Kirtesh Khandelwal Visual Basics Project

If ((c >= 97 And c <= 122) Or (c >= 65 And c <= 90) Or (c = 32)) Then

If (gap = 1 Or gap = 2) Then

check = 1

Else

check = 0

End If

Else

check = 0

Exit Do

End If

If (c = 32) Then

gap = Val(gap) + 1

End If

i = i + 1

Loop

If (check = 0) Then

Command4.Enabled = False

Else

Command4.Enabled = True

End If

Else

Command4.Enabled = False

End If

End Sub

Private Sub Text1_LostFocus()

If (Text1.Text <> "") Then

length = Len(Text1.Text)

i = 0

Page 37: Kirtesh Khandelwal Visual Basics Project

gap = 1

Do Until i = length

c = (Asc(Right(Text1.Text, (i + 1))))

If ((c >= 97 And c <= 122) Or (c >= 65 And c <= 90) Or (c = 32)) Then

If (gap = 1 Or gap = 2) Then

check = 1

Else

check = 0

End If

Else

check = 0

Exit Do

End If

If (c = 32) Then

gap = Val(gap) + 1

End If

i = i + 1

Loop

If (check = 0) Then

MsgBox ("Please Enter Only Characters")

Text1.SetFocus

Command4.Enabled = False

Else

If (Text2.Text <> "") Then

Command4.Enabled = True

Else

Command4.Enabled = False

End If

End If

Page 38: Kirtesh Khandelwal Visual Basics Project

Else

If (Text2.Text = "") Then

Command4.Enabled = False

Else

Command4.Enabled = False

End If

End If

End Sub

Private Sub Text1_GotFocus()

Command4.Enabled = False

End Sub

Private Sub Text2_GotFocus()

Command4.Enabled = False

End Sub

Private Sub Text2_KeyUp(KeyCode As Integer, Shift As Integer)

If (Text2.Text <> "") Then

length = Len(Text2.Text)

i = 0

gap = 1

Do Until i = length

c = (Asc(Right(Text2.Text, (i + 1))))

If ((c >= 97 And c <= 122) Or (c >= 65 And c <= 90) Or (c = 32)) Then

If (gap = 1 Or gap = 2) Then

check = 1

Else

check = 0

End If

Page 39: Kirtesh Khandelwal Visual Basics Project

Else

check = 0

Exit Do

End If

If (c = 32) Then

gap = Val(gap) + 1

End If

i = i + 1

Loop

If (check = 0) Then

Command4.Enabled = False

Else

Command4.Enabled = True

End If

Else

Command4.Enabled = False

End If

End Sub

Private Sub Text2_LostFocus()

If (Text2.Text <> "") Then

length = Len(Text2.Text)

i = 0

gap = 1

Do Until i = length

c = (Asc(Right(Text2.Text, (i + 1))))

If ((c >= 97 And c <= 122) Or (c >= 65 And c <= 90) Or (c = 32)) Then

If (gap = 1 Or gap = 2) Then

check = 1

Page 40: Kirtesh Khandelwal Visual Basics Project

Else

check = 0

End If

Else

check = 0

Exit Do

End If

If (c = 32) Then

gap = Val(gap) + 1

End If

i = i + 1

Loop

If (check = 0) Then

MsgBox ("Please Enter Only Characters")

Text2.SetFocus

Command4.Enabled = False

Else

If (Text1.Text <> "") Then

Command4.Enabled = True

Else

Command4.Enabled = False

End If

End If

Else

Command4.Enabled = False

End If

End Sub

Page 41: Kirtesh Khandelwal Visual Basics Project

Add Employee:-

Private Sub Command1_Click()

Text2.Enabled = True

Text1.Enabled = True

Command3.Enabled = True

Call connect

With eidpass

If (Label20.Caption = "" And Text2.Text = "" And Label4.Caption = "") Then

Label20.Caption = ""

Text2.Text = ""

Label4.Caption = ""

m = 0

If .RecordCount = 0 Then

m = 1

Else

Page 42: Kirtesh Khandelwal Visual Basics Project

.MoveFirst

Do Until .EOF

If .Fields(3).Value > m Then

m = .Fields(3).Value

End If

.MoveNext

Loop

m = m + 1

End If

emid = "EMid" & Format(m, "0000")

Label20.Caption = emid

End If

End With

End Sub

Private Sub Command2_Click()

Unload Me

Main_Interface.Show

Main_Interface.Enabled = True

Main_Interface.Frame1.Visible = True

Main_Interface.Frame1.Enabled = True

End Sub

Private Sub Command3_Click()

Label20.Caption = ""

Text2.Text = ""

Text1.Text = ""

Label4.Caption = ""

Page 43: Kirtesh Khandelwal Visual Basics Project

End Sub

Private Sub Command4_Click()

If (Text2.Text = "") Then

MsgBox ("Enter the name Plzzzz..")

End If

Call connect

With eidpass

If (Label20.Caption <> "" And Text2.Text <> "" And Label4.Caption = "") Then

apass = 1111

m = 0

If .RecordCount = 0 Then

m = 1

apass = 1111

Else

.MoveFirst

Do Until .EOF

If .Fields(3).Value > m Then

m = .Fields(3).Value

apass = apass + 11

End If

.MoveNext

Loop

m = m + 1

End If

.AddNew

.Fields(0) = Label20.Caption

.Fields(1) = StrConv(Text2.Text, vbProperCase)

Page 44: Kirtesh Khandelwal Visual Basics Project

.Fields(2) = apass

.Fields(3) = m

.Fields(4) = 0

.Update

Label4.Caption = apass

With tbemp

.Close

.Open "alter table Today_best add " & Text2.Text & " " & "number", con,

adOpenDynamic, adLockOptimistic

End With

With bmemp

.AddNew

.Fields(0) = Label20.Caption

.Fields(1) = StrConv(Text2.Text, vbProperCase)

.Fields(2) = 0

.Fields(3) = 0

.Fields(4) = 0

.Fields(5) = 0

.Fields(6) = 0

.Fields(7) = 0

.Fields(8) = 0

.Fields(9) = 0

.Fields(10) = 0

.Fields(11) = 0

.Fields(12) = 0

.Fields(13) = 0

.Update

Page 45: Kirtesh Khandelwal Visual Basics Project

End With

End If

End With

End Sub

Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)

If (Text1.Text <> "") Then

length = Len(Text1.Text)

i = 0

gap = 1

Do Until i = length

c = (Asc(Right(Text1.Text, (i + 1))))

If ((c >= 97 And c <= 122) Or (c >= 65 And c <= 90) Or (c = 32)) Then

If (gap = 1 Or gap = 2) Then

check = 1

Else

check = 0

End If

Else

check = 0

Exit Do

End If

If (c = 32) Then

gap = Val(gap) + 1

End If

i = i + 1

Loop

If (check = 0) Then

Command4.Enabled = False

Page 46: Kirtesh Khandelwal Visual Basics Project

Else

Command4.Enabled = True

End If

Else

Command4.Enabled = False

End If

End Sub

Private Sub Text1_LostFocus()

If (Text1.Text <> "") Then

length = Len(Text1.Text)

i = 0

gap = 1

Do Until i = length

c = (Asc(Right(Text1.Text, (i + 1))))

If ((c >= 97 And c <= 122) Or (c >= 65 And c <= 90) Or (c = 32)) Then

If (gap = 1 Or gap = 2) Then

check = 1

Else

check = 0

End If

Else

check = 0

Exit Do

End If

If (c = 32) Then

gap = Val(gap) + 1

End If

i = i + 1

Page 47: Kirtesh Khandelwal Visual Basics Project

Loop

If (check = 0) Then

MsgBox ("Please Enter Only Characters")

Text1.SetFocus

Command4.Enabled = False

Else

If (Text2.Text <> "") Then

Command4.Enabled = True

Else

Command4.Enabled = False

End If

End If

Else

Command4.Enabled = False

End If

End Sub

Private Sub Text1_GotFocus()

Command4.Enabled = False

End Sub

Private Sub Text2_GotFocus()

Command4.Enabled = False

End Sub

Private Sub Text2_KeyUp(KeyCode As Integer, Shift As Integer)

If (Text2.Text <> "") Then

length = Len(Text2.Text)

i = 0

gap = 1

Do Until i = length

Page 48: Kirtesh Khandelwal Visual Basics Project

c = (Asc(Right(Text2.Text, (i + 1))))

If ((c >= 97 And c <= 122) Or (c >= 65 And c <= 90) Or (c = 32)) Then

If (gap = 1 Or gap = 2) Then

check = 1

Else

check = 0

End If

Else

check = 0

Exit Do

End If

If (c = 32) Then

gap = Val(gap) + 1

End If

i = i + 1

Loop

If (check = 0) Then

Command4.Enabled = False

Else

Command4.Enabled = True

End If

Else

Command4.Enabled = False

End If

End Sub

Private Sub Text2_LostFocus()

If (Text2.Text <> "") Then

length = Len(Text2.Text)

Page 49: Kirtesh Khandelwal Visual Basics Project

i = 0

gap = 1

Do Until i = length

c = (Asc(Right(Text2.Text, (i + 1))))

If ((c >= 97 And c <= 122) Or (c >= 65 And c <= 90) Or (c = 32)) Then

If (gap = 1 Or gap = 2) Then

check = 1

Else

check = 0

End If

Else

check = 0

Exit Do

End If

If (c = 32) Then

gap = Val(gap) + 1

End If

i = i + 1

Loop

If (check = 0) Then

MsgBox ("Please Enter Only Characters")

Text2.SetFocus

Command4.Enabled = False

Else

If (Text1.Text <> "") Then

Command4.Enabled = True

Else

Command4.Enabled = False

End If

Page 50: Kirtesh Khandelwal Visual Basics Project

End If

Else

Command4.Enabled = False

End If

End Sub

Blank:-

Private Sub Form_Load()

Blank.BackColor = RGB(246, 6, 9)

Blank.Top = Blank.Height / 2.2 - Blank.Height / 3

Blank.Left = Blank.Width / 3 - Blank.Width / 3

End Sub

Burger:-

Private Sub Command1_Click()

Call Burgerdesc

Image5.Visible = False

Frame1.Visible = True

Page 51: Kirtesh Khandelwal Visual Basics Project

Text1.SetFocus

Label1.Caption = Command1.Caption

End Sub

Private Sub Command2_Click()

Call Burgerdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command2.Caption

End Sub

Private Sub Command3_Click()

Call Burgerdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command3.Caption

End Sub

Private Sub Command4_Click()

Call Burgerdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command4.Caption

End Sub

Private Sub Command5_Click()

Page 52: Kirtesh Khandelwal Visual Basics Project

If Label7.Caption = "" And Text1.Text = "" Then

MsgBox ("Select The Order"), vbCritical

ElseIf Label7.Caption = "" Then

MsgBox ("Select the Size"), vbCritical

ElseIf Text1.Text = "" Then

MsgBox ("Enter the Quantity"), vbCritical

Else

lab = Burger.Label1.Caption

pri = Val(Burger.Label7.Caption)

quan = Val(Burger.Text1.Text)

Set l = Order_Now.ListView1.ListItems.Add(, , lab)

l.SubItems(1) = pri

l.SubItems(2) = quan

vat = (pri * quan * 20) / 100

l.SubItems(3) = vat

cal = pri * quan + vat

l.SubItems(4) = cal

total = 0

Call Burgerdesc

For i = 1 To Order_Now.ListView1.ListItems.Count

total = total + Val(Order_Now.ListView1.ListItems.Item(i).SubItems(4))

Next

Order_Now.Label4.Caption = total

End If

End Sub

Private Sub Command6_Click()

Page 53: Kirtesh Khandelwal Visual Basics Project

Call Burgerdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command6.Caption

End Sub

Private Sub Command7_Click()

Call Burgerdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command7.Caption

End Sub

Private Sub Command8_Click()

Call Burgerdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command8.Caption

End Sub

Private Sub Command9_Click()

Call Burgerdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command9.Caption

End Sub

Page 54: Kirtesh Khandelwal Visual Basics Project

Private Sub Command10_Click()

Order_Now.Show: Order_Now.Enabled = True

End Sub

Private Sub Command11_Click()

Call check1

End Sub

Private Sub Form_Activate()

Order_Now.Enabled = False

End Sub

Private Sub Form_Deactivate()

Order_Now.Enabled = True

End Sub

Private Sub Form_Load()

Burger.BackColor = RGB(246, 6, 9)

Burger.Top = Burger.Height / 2.2 - Burger.Height / 3

Burger.Left = Burger.Width / 3 - Burger.Width / 3

End Sub

Private Sub Label8_Click()

Order_Now.Show

Order_Now.Enabled = True

End Sub

Page 55: Kirtesh Khandelwal Visual Basics Project

Private Sub Option1_Click()

Call connect

With all

Do Until .EOF

If (Label1.Caption = .Fields(2).Value) Then

price = .Fields(3).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

End Sub

Private Sub Option2_Click()

Call connect

With all

Do Until .EOF

If (Label1.Caption = .Fields(2).Value) Then

price = .Fields(4).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

End Sub

Private Sub Option3_Click()

Call connect

With all

Page 56: Kirtesh Khandelwal Visual Basics Project

Do Until .EOF

If (Label1.Caption = .Fields(2).Value) Then

price = .Fields(5).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

End Sub

Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)

If (Text1.Text = "") Then

Else

If ((KeyCode >= 48 And KeyCode <= 57) Or (KeyCode >= 96 And KeyCode <=

105) Or KeyCode = 13 Or KeyCode = 35 Or _

KeyCode = 36 Or KeyCode = 32 Or KeyCode = 8 Or KeyCode = 16 Or KeyCode

= 37 Or KeyCode = 38 Or KeyCode = 39 Or KeyCode = 40) Then

Else

MsgBox ("Not Allowed")

Text1.Text = ""

End If

End If

End Sub

Page 57: Kirtesh Khandelwal Visual Basics Project

Chicken:-

Private Sub Command1_Click()

Call Chickendesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command1.Caption

End Sub

Private Sub Command2_Click()

Call Chickendesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command2.Caption

End Sub

Private Sub Command3_Click()

Page 58: Kirtesh Khandelwal Visual Basics Project

Call Chickendesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command3.Caption

End Sub

Private Sub Command4_Click()

Call Chickendesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command4.Caption

End Sub

Private Sub Command5_Click()

If Label7.Caption = "" And Text1.Text = "" Then

MsgBox ("Select The Order"), vbCritical

ElseIf Label7.Caption = "" Then

MsgBox ("Select the Size"), vbCritical

ElseIf Text1.Text = "" Then

MsgBox ("Enter the Quantity"), vbCritical

Else

lab = Chicken.Label1.Caption

pri = Val(Chicken.Label7.Caption)

quan = Val(Chicken.Text1.Text)

Set l = Order_Now.ListView1.ListItems.Add(, , lab)

l.SubItems(1) = pri

l.SubItems(2) = quan

Page 59: Kirtesh Khandelwal Visual Basics Project

vat = (pri * quan * 20) / 100

l.SubItems(3) = vat

cal = pri * quan + vat

l.SubItems(4) = cal

Call Chickendesc

total = 0

For i = 1 To Order_Now.ListView1.ListItems.Count

total = total + Val(Order_Now.ListView1.ListItems.Item(i).SubItems(4))

Next

Order_Now.Label4.Caption = total

End If

End Sub

Private Sub Command6_Click()

Call Chickendesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command6.Caption

End Sub

Private Sub Command7_Click()

Call Chickendesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command7.Caption

End Sub

Page 60: Kirtesh Khandelwal Visual Basics Project

Private Sub Command8_Click()

Call Chickendesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command8.Caption

End Sub

Private Sub Command9_Click()

Call Chickendesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command9.Caption

End Sub

Private Sub Form_Load()

Chicken.BackColor = RGB(240, 6, 9)

Chicken.Top = Chicken.Height / 2.2 - Chicken.Height / 3

Chicken.Left = Chicken.Width / 3 - Chicken.Width / 3

End Sub

Private Sub Form_Activate()

Order_Now.Enabled = False

End Sub

Private Sub Form_Deactivate()

Order_Now.Enabled = True

End Sub

Private Sub Command10_Click()

Page 61: Kirtesh Khandelwal Visual Basics Project

Order_Now.Show: Order_Now.Enabled = True

End Sub

Private Sub Command11_Click()

Call check1

End Sub

Private Sub Form_LostFocus()

Unload Me

End Sub

Private Sub Label8_Click()

Order_Now.Show

Order_Now.Enabled = True

End Sub

Private Sub Option1_Click()

Call connect

With all

Do Until .EOF

If (Label1.Caption = .Fields(2).Value) Then

price = .Fields(3).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

Page 62: Kirtesh Khandelwal Visual Basics Project

End Sub

Private Sub Option2_Click()

Call connect

With all

Do Until .EOF

If (Label1.Caption = .Fields(2).Value) Then

price = .Fields(4).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

End Sub

Private Sub Option3_Click()

Call connect

With all

Do Until .EOF

If (Label1.Caption = .Fields(2).Value) Then

price = .Fields(5).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

End Sub

Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)

Page 63: Kirtesh Khandelwal Visual Basics Project

If (Text1.Text = "") Then

Else

If ((KeyCode >= 48 And KeyCode <= 57) Or (KeyCode >= 96 And KeyCode <=

105) Or KeyCode = 13 Or KeyCode = 35 Or _

KeyCode = 36 Or KeyCode = 32 Or KeyCode = 8 Or KeyCode = 16 Or KeyCode

= 37 Or KeyCode = 38 Or KeyCode = 39 Or KeyCode = 40) Then

Else

MsgBox ("Not Allowed")

Text1.Text = ""

End If

End If

End Sub

Chocolate:-

Private Sub Command1_Click()

Page 64: Kirtesh Khandelwal Visual Basics Project

Call Chocolatedesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command1.Caption

End Sub

Private Sub Command2_Click()

Call Chocolatedesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command2.Caption

End Sub

Private Sub Command3_Click()

Call Chocolatedesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command3.Caption

End Sub

Private Sub Command4_Click()

Call Chocolatedesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command4.Caption

Page 65: Kirtesh Khandelwal Visual Basics Project

End Sub

Private Sub Command5_Click()

If Label7.Caption = "" And Text1.Text = "" Then

MsgBox ("Select The Order"), vbCritical

ElseIf Label7.Caption = "" Then

MsgBox ("Select the Size"), vbCritical

ElseIf Text1.Text = "" Then

MsgBox ("Enter the Quantity"), vbCritical

Else

lab = Chocolate.Label1.Caption

pri = Val(Chocolate.Label7.Caption)

quan = Val(Chocolate.Text1.Text)

Set l = Order_Now.ListView1.ListItems.Add(, , lab)

l.SubItems(1) = pri

l.SubItems(2) = quan

vat = (pri * quan * 20) / 100

l.SubItems(3) = vat

cal = pri * quan + vat

l.SubItems(4) = cal

Call Chocolatedesc

total = 0

For i = 1 To Order_Now.ListView1.ListItems.Count

total = total + Val(Order_Now.ListView1.ListItems.Item(i).SubItems(4))

Next

Order_Now.Label4.Caption = total

End If

End Sub

Page 66: Kirtesh Khandelwal Visual Basics Project

Private Sub Command6_Click()

Call Chocolatedesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command6.Caption

End Sub

Private Sub Command7_Click()

Call Chocolatedesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command7.Caption

End Sub

Private Sub Command8_Click()

Call Chocolatedesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command8.Caption

End Sub

Private Sub Command9_Click()

Call Chocolatedesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command9.Caption

End Sub

Page 67: Kirtesh Khandelwal Visual Basics Project

Private Sub Form_Load()

Chocolate.BackColor = RGB(240, 6, 9)

Chocolate.Top = Chocolate.Height / 2.2 - Chocolate.Height / 3

Chocolate.Left = Chocolate.Width / 3 - Chocolate.Width / 3

End Sub

Private Sub Form_Activate()

Order_Now.Enabled = False

End Sub

Private Sub Form_Deactivate()

Order_Now.Enabled = True

End Sub

Private Sub Command10_Click()

Order_Now.Show: Order_Now.Enabled = True

End Sub

Private Sub Command11_Click()

Call check1

End Sub

Private Sub Form_LostFocus()

Unload Me

End Sub

Private Sub Label8_Click()

Order_Now.Show

Page 68: Kirtesh Khandelwal Visual Basics Project

Order_Now.Enabled = True

End Sub

Private Sub Option1_Click()

Call connect

With all

Do Until .EOF

If (Label1.Caption = .Fields(2).Value) Then

price = .Fields(3).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

End Sub

Private Sub Option2_Click()

Call connect

With all

Do Until .EOF

If (Label1.Caption = .Fields(2).Value) Then

price = .Fields(4).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

End Sub

Page 69: Kirtesh Khandelwal Visual Basics Project

Private Sub Option3_Click()

Call connect

With all

Do Until .EOF

If (Label1.Caption = .Fields(2).Value) Then

price = .Fields(5).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

End Sub

Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)

If (Text1.Text = "") Then

Else

If ((KeyCode >= 48 And KeyCode <= 57) Or (KeyCode >= 96 And KeyCode <=

105) Or KeyCode = 13 Or KeyCode = 35 Or _

KeyCode = 36 Or KeyCode = 32 Or KeyCode = 8 Or KeyCode = 16 Or KeyCode

= 37 Or KeyCode = 38 Or KeyCode = 39 Or KeyCode = 40) Then

Else

MsgBox ("Not Allowed")

Text1.Text = ""

End If

End If

End Sub

Page 70: Kirtesh Khandelwal Visual Basics Project

Coffee:-

Private Sub Command1_Click()

Call Coffeedesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command1.Caption

End Sub

Private Sub Command2_Click()

Call Coffeedesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command2.Caption

End Sub

Private Sub Command3_Click()

Page 71: Kirtesh Khandelwal Visual Basics Project

Call Coffeedesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command3.Caption

End Sub

Private Sub Command4_Click()

Call Coffeedesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command4.Caption

End Sub

Private Sub Command5_Click()

If Label7.Caption = "" And Text1.Text = "" Then

MsgBox ("Select The Order"), vbCritical

ElseIf Label7.Caption = "" Then

MsgBox ("Select the Size"), vbCritical

ElseIf Text1.Text = "" Then

MsgBox ("Enter the Quantity"), vbCritical

Else

lab = Coffee.Label1.Caption

pri = Val(Coffee.Label7.Caption)

quan = Val(Coffee.Text1.Text)

Set l = Order_Now.ListView1.ListItems.Add(, , lab)

l.SubItems(1) = pri

l.SubItems(2) = quan

Page 72: Kirtesh Khandelwal Visual Basics Project

vat = (pri * quan * 20) / 100

l.SubItems(3) = vat

cal = pri * quan + vat

l.SubItems(4) = cal

Call Coffeedesc

total = 0

For i = 1 To Order_Now.ListView1.ListItems.Count

total = total + Val(Order_Now.ListView1.ListItems.Item(i).SubItems(4))

Next

Order_Now.Label4.Caption = total

End If

End Sub

Private Sub Command6_Click()

Call Coffeedesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command6.Caption

End Sub

Private Sub Command7_Click()

Call Coffeedesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command7.Caption

End Sub

Private Sub Command8_Click()

Page 73: Kirtesh Khandelwal Visual Basics Project

Call Coffeedesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command8.Caption

End Sub

Private Sub Command9_Click()

Call Coffeedesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command9.Caption

End Sub

Private Sub Form_Load()

Coffee.BackColor = RGB(240, 6, 9)

Coffee.Top = Coffee.Height / 2.2 - Coffee.Height / 3

Coffee.Left = Coffee.Width / 3 - Coffee.Width / 3

End Sub

Private Sub Form_Activate()

Order_Now.Enabled = False

End Sub

Private Sub Form_Deactivate()

Order_Now.Enabled = True

End Sub

Private Sub Command10_Click()

Order_Now.Show: Order_Now.Enabled = True

Page 74: Kirtesh Khandelwal Visual Basics Project

End Sub

Private Sub Command11_Click()

Call check1

End Sub

Private Sub Label8_Click()

Order_Now.Show

Order_Now.Enabled = True

End Sub

Private Sub Option1_Click()

Call connect

With all

Do Until .EOF

If (Label1.Caption = .Fields(2).Value) Then

price = .Fields(3).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

End Sub

Private Sub Option2_Click()

Call connect

With all

Do Until .EOF

If (Label1.Caption = .Fields(2).Value) Then

Page 75: Kirtesh Khandelwal Visual Basics Project

price = .Fields(4).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

End Sub

Private Sub Option3_Click()

Call connect

With all

Do Until .EOF

If (Label1.Caption = .Fields(2).Value) Then

price = .Fields(5).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

End Sub

Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)

If (Text1.Text = "") Then

Else

If ((KeyCode >= 48 And KeyCode <= 57) Or (KeyCode >= 96 And KeyCode <=

105) Or KeyCode = 13 Or KeyCode = 35 Or _

KeyCode = 36 Or KeyCode = 32 Or KeyCode = 8 Or KeyCode = 16 Or KeyCode

= 37 Or KeyCode = 38 Or KeyCode = 39 Or KeyCode = 40) Then

Page 76: Kirtesh Khandelwal Visual Basics Project

Else

MsgBox ("Not Allowed")

Text1.Text = ""

End If

End If

End Sub

Combo:-

Private Sub Command1_Click()

Call Combodesc

Image5.Visible = False

Frame1.Visible = True

Label1.Caption = Command1.Caption

End Sub

Page 77: Kirtesh Khandelwal Visual Basics Project

Private Sub Command2_Click()

Call Combodesc

Image5.Visible = False

Frame1.Visible = True

Label1.Caption = Command2.Caption

End Sub

Private Sub Command3_Click()

Call Combodesc

Image5.Visible = False

Frame1.Visible = True

Label1.Caption = Command3.Caption

End Sub

Private Sub Command4_Click()

Call Combodesc

Image5.Visible = False

Frame1.Visible = True

Label1.Caption = Command4.Caption

End Sub

Private Sub Command5_Click()

If Label7.Caption = "" And Text1.Text = "" Then

MsgBox ("Select The Order"), vbCritical

ElseIf Label7.Caption = "" Then

MsgBox ("Select the Size"), vbCritical

ElseIf Text1.Text = "" Then

MsgBox ("Enter the Quantity"), vbCritical

Else

Page 78: Kirtesh Khandelwal Visual Basics Project

lab = Combo.Label1.Caption

pri = Val(Combo.Label7.Caption)

quan = Val(Combo.Text1.Text)

Set l = Order_Now.ListView1.ListItems.Add(, , lab)

l.SubItems(1) = pri

l.SubItems(2) = quan

vat = (pri * quan * 20) / 100

l.SubItems(3) = vat

cal = pri * quan + vat

l.SubItems(4) = cal

Call Combodesc

For i = 1 To Order_Now.ListView1.ListItems.Count

total = total + Val(Order_Now.ListView1.ListItems.Item(i).SubItems(4))

Next

Order_Now.Label4.Caption = total

End If

End Sub

Private Sub Command6_Click()

Call Combodesc

Image5.Visible = False

Frame1.Visible = True

Label1.Caption = Command6.Caption

End Sub

Private Sub Command7_Click()

Call Combodesc

Image5.Visible = False

Frame1.Visible = True

Page 79: Kirtesh Khandelwal Visual Basics Project

Label1.Caption = Command7.Caption

End Sub

Private Sub Command8_Click()

Call Combodesc

Image5.Visible = False

Frame1.Visible = True

Label1.Caption = Command8.Caption

End Sub

Private Sub Command9_Click()

Call Combodesc

Image5.Visible = False

Frame1.Visible = True

Label1.Caption = Command9.Caption

End Sub

Private Sub Form_Load()

Combo.BackColor = RGB(240, 6, 9)

Combo.Top = Combo.Height / 2.2 - Combo.Height / 3

Combo.Left = Combo.Width / 3 - Combo.Width / 3

End Sub

Private Sub Form_Activate()

Order_Now.Enabled = False

End Sub

Private Sub Form_Deactivate()

Order_Now.Enabled = True

End Sub

Private Sub Command10_Click()

Page 80: Kirtesh Khandelwal Visual Basics Project

Order_Now.Show: Order_Now.Enabled = True

End Sub

Private Sub Command11_Click()

Call check1

End Sub

Private Sub Label8_Click()

Order_Now.Show

Order_Now.Enabled = True

End Sub

Private Sub Option1_Click()

Call connect

With all

Do Until .EOF

If (Label1.Caption = .Fields(2).Value) Then

price = .Fields(3).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

End Sub

Private Sub Option2_Click()

Call connect

With all

Do Until .EOF

Page 81: Kirtesh Khandelwal Visual Basics Project

If (Label1.Caption = .Fields(2).Value) Then

price = .Fields(4).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

End Sub

Private Sub Option3_Click()

Call connect

With all

Do Until .EOF

If (Label1.Caption = .Fields(2).Value) Then

price = .Fields(5).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

End Sub

Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)

If (Text1.Text = "") Then

Else

If ((KeyCode >= 48 And KeyCode <= 57) Or (KeyCode >= 96 And KeyCode <=

105) Or KeyCode = 13 Or KeyCode = 35 Or _

KeyCode = 36 Or KeyCode = 32 Or KeyCode = 8 Or KeyCode = 16 Or KeyCode

= 37 Or KeyCode = 38 Or KeyCode = 39 Or KeyCode = 40) Then

Page 82: Kirtesh Khandelwal Visual Basics Project

Else

MsgBox ("Not Allowed")

Text1.Text = ""

End If

End If

End Sub

Customer_info:-

Page 83: Kirtesh Khandelwal Visual Basics Project

Private Sub Command1_Click()

Main_Interface.Enabled = True

Unload Me

End Sub

Private Sub Command16_Click()

Unload Me

Main_Interface.Show

Main_Interface.Enabled = True

End Sub

Private Sub Command17_Click()

Call connect

If (Text1.Text <> "" And Text2.Text <> "") Then

With ju

check = 0

Do Until .EOF

If .Fields(7).Value = Text1.Text And .Fields(6).Value = Text2.Text Then

Page 84: Kirtesh Khandelwal Visual Basics Project

check = 1

Exit Do

Else

check = 0

End If

.MoveNext

Loop

If check = 1 Then

Frame3.Visible = False

Frame1.Visible = True

Command1.SetFocus

Label2.Caption = .Fields(0)

Label8.Caption = .Fields(1)

Label10.Caption = .Fields(2)

Label11.Caption = .Fields(3)

Label12.Caption = .Fields(8)

Label13.Caption = .Fields(4)

Else

MsgBox ("Wrong Id or Password::Try again"), vbCritical, ("Mcdonald's")

Text1.Text = ""

Text2.Text = ""

Text2.SetFocus

End If

End With

Else

MsgBox ("Fill the Details Correctly"), vbCritical, ("Mcdonald's")

Text2.SetFocus

End If

Page 85: Kirtesh Khandelwal Visual Basics Project

End Sub

Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)

If (Text1.Text = "") Then

Else

If ((KeyCode >= 48 And KeyCode <= 57) Or (KeyCode >= 96 And KeyCode <=

105) Or KeyCode = 13 Or KeyCode = 35 Or _

KeyCode = 36 Or KeyCode = 8 Or KeyCode = 37 Or KeyCode = 38 Or KeyCode

= 39 Or KeyCode = 40) Then

Else

MsgBox ("Not Allowed")

Text1.Text = ""

End If

End If

End Sub

Private Sub Text2_KeyUp(KeyCode As Integer, Shift As Integer)

If Text2.Text = "" Then

Else

If ((KeyCode >= 48 And KeyCode <= 57) Or (KeyCode >= 96 And KeyCode <=

105) Or (KeyCode >= 60 And KeyCode <= 90) Or KeyCode = 13 Or KeyCode =

35 Or _

KeyCode = 36 Or KeyCode = 32 Or KeyCode = 8 Or KeyCode = 16 Or KeyCode

= 37 Or KeyCode = 38 Or KeyCode = 39 Or KeyCode = 40) Then

Else

MsgBox ("Not Allowed")

Text2.Text = ""

End If

End If

Page 86: Kirtesh Khandelwal Visual Basics Project

End Sub

Delete_Admin:-

Private Sub Combo1_Click()

Combo1.Refresh

Text2.Enabled = True

End Sub

Private Sub Command1_Click()

Text2.Text = ""

Label4.Caption = ""

Command3.Enabled = False

Command4.Enabled = False

Command1.Enabled = False

Combo1.Text = "Select plz"

End Sub

Private Sub Command2_Click()

Page 87: Kirtesh Khandelwal Visual Basics Project

Unload Me

Main_Interface.Show

Main_Interface.Enabled = True

Main_Interface.Frame1.Visible = True

Main_Interface.Frame1.Enabled = True

End Sub

Private Sub Command3_Click()

Text2.Text = ""

Label4.Caption = ""

Command4.Enabled = False

Command1.Enabled = False

Command3.Enabled = False

Combo1.Text = "Select plz"

End Sub

Private Sub Command4_Click()

check = MsgBox("Are You Sure to want to DELETE the Entry", vbYesNoCancel,

"Choose the Correct...")

If (check = 6) Then

With tmidpass

.MoveFirst

check = 0

i = 0

If (Combo1.Text <> "" And Text2.Text <> "" And Label4.Caption <> "") Then

Do Until .EOF

If (.Fields(0).Value = Combo1.Text And .Fields(2).Value = Text2.Text And

.Fields(1) = Label4.Caption) Then

check = 1

cout = i

Page 88: Kirtesh Khandelwal Visual Basics Project

i = i + 1

Exit Do

Else

check = 0

i = i + 1

End If

.MoveNext

Loop

If (check = 1) Then

.Delete adAffectCurrent

Combo1.RemoveItem (cout)

Combo1.Text = "Select plz"

Text2.Text = ""

Label4.Caption = ""

Command3.Enabled = False

Command4.Enabled = False

Else

End If

End If

End With

Else

If (check = 7) Then

Else

End If

End If

End Sub

Page 89: Kirtesh Khandelwal Visual Basics Project

Private Sub Form_Load()

Call connect

With tmidpass

Do Until .EOF

Data = .Fields(0).Value

Combo1.AddItem (Data)

.MoveNext

Loop

End With

Combo1.Text = "Select plz"

End Sub

Private Sub Text2_LostFocus()

Call connect

With tmidpass

If (Combo1.Text <> "" And Text2.Text <> "") Then

check = 0

Do Until .EOF

If (.Fields(0).Value = Combo1.Text And .Fields(2).Value = Text2.Text) Then

check = 1

Exit Do

Else

check = 0

End If

.MoveNext

Loop

Page 90: Kirtesh Khandelwal Visual Basics Project

If (check = 1) Then

Label4.Caption = .Fields(1).Value

Else

Label4.Caption = ""

MsgBox ("Please Enter Correct Id & Pass.")

Combo1.SetFocus

End If

End If

End With

If (Combo1.Text <> "" And Text2.Text <> "" And Label4.Caption <> "") Then

Command4.Enabled = True

Command1.Enabled = True

Command3.Enabled = True

Else

Command4.Enabled = False

Command1.Enabled = False

Command3.Enabled = False

End If

End Sub

Page 91: Kirtesh Khandelwal Visual Basics Project

Delete_Employee:-

Private Sub Combo1_Click()

Combo1.Refresh

Text2.Enabled = True

End Sub

Private Sub Command1_Click()

Text2.Text = ""

Label4.Caption = ""

Command3.Enabled = False

Command4.Enabled = False

Command1.Enabled = False

Combo1.Text = "Select plz"

End Sub

Private Sub Command2_Click()

Unload Me

Main_Interface.Show

Page 92: Kirtesh Khandelwal Visual Basics Project

Main_Interface.Enabled = True

Main_Interface.Frame1.Visible = True

Main_Interface.Frame1.Enabled = True

End Sub

Private Sub Command3_Click()

Text2.Text = ""

Label4.Caption = ""

Command4.Enabled = False

Command1.Enabled = False

Command3.Enabled = False

Combo1.Text = "Select plz"

End Sub

Private Sub Command4_Click()

Call connect

check = MsgBox("Are You Sure to want to DELETE the Entry", vbYesNoCancel,

"Choose the Correct...")

If (check = 6) Then

With eidpass

.MoveFirst

check = 0

i = 0

If (Combo1.Text <> "" And Text2.Text <> "" And Label4.Caption <> "") Then

Do Until .EOF

If (.Fields(0).Value = Combo1.Text And .Fields(2).Value = Text2.Text And

.Fields(1) = Label4.Caption) Then

check = 1

cout = i

i = i + 1

Page 93: Kirtesh Khandelwal Visual Basics Project

Exit Do

Else

check = 0

i = i + 1

End If

.MoveNext

Loop

If (check = 1) Then

With bmemp

.MoveFirst

Do Until .EOF

If (Label4.Caption = .Fields(1).Value) Then

.Delete adAffectCurrent

Exit Do

End If

.MoveNext

Loop

End With

With tbemp

.Close

.Open "alter table Today_Best drop " & eidpass.Fields(1).Value & " ", con,

adOpenDynamic, adLockOptimistic

End With

.Delete adAffectCurrent

Combo1.RemoveItem (cout)

Combo1.Text = "Select plz"

Text2.Text = ""

Label4.Caption = ""

Page 94: Kirtesh Khandelwal Visual Basics Project

Command3.Enabled = False

Command4.Enabled = False

Else

End If

End If

End With

Else

If (check = 7) Then

Else

End If

End If

End Sub

Private Sub Form_Load()

Call connect

With eidpass

Do Until .EOF

Data = .Fields(0).Value

Combo1.AddItem (Data)

.MoveNext

Loop

End With

Combo1.Text = "Select plz"

End Sub

Private Sub Text2_LostFocus()

Page 95: Kirtesh Khandelwal Visual Basics Project

Call connect

With eidpass

If (Combo1.Text <> "" And Text2.Text <> "") Then

check = 0

Do Until .EOF

If (.Fields(0).Value = Combo1.Text And .Fields(2).Value = Text2.Text) Then

check = 1

Exit Do

Else

check = 0

End If

.MoveNext

Loop

If (check = 1) Then

Label4.Caption = .Fields(1).Value

Else

Label4.Caption = ""

MsgBox ("Please Enter Correct Id & Pass.")

Combo1.SetFocus

End If

End If

End With

If (Combo1.Text <> "" And Text2.Text <> "" And Label4.Caption <> "") Then

Command4.Enabled = True

Command1.Enabled = True

Command3.Enabled = True

Page 96: Kirtesh Khandelwal Visual Basics Project

Else

Command4.Enabled = False

Command1.Enabled = False

Command3.Enabled = False

End If

End Sub

Fries:-

Private Sub Command1_Click()

Call Friesdesc

Image5.Visible = False

Frame1.Visible = True

Label1.Caption = Command1.Caption

End Sub

Private Sub Command2_Click()

Call Friesdesc

Page 97: Kirtesh Khandelwal Visual Basics Project

Image5.Visible = False

Frame1.Visible = True

Label1.Caption = Command2.Caption

End Sub

Private Sub Command3_Click()

Call Friesdesc

Image5.Visible = False

Frame1.Visible = True

Label1.Caption = Command3.Caption

End Sub

Private Sub Command4_Click()

Call Friesdesc

Image5.Visible = False

Frame1.Visible = True

Label1.Caption = Command4.Caption

End Sub

Private Sub Command5_Click()

If Label7.Caption = "" And Text1.Text = "" Then

MsgBox ("Select The Order"), vbCritical

ElseIf Label7.Caption = "" Then

MsgBox ("Select the Size"), vbCritical

ElseIf Text1.Text = "" Then

MsgBox ("Enter the Quantity"), vbCritical

Else

lab = Fries.Label1.Caption

pri = Val(Fries.Label7.Caption)

Page 98: Kirtesh Khandelwal Visual Basics Project

quan = Val(Fries.Text1.Text)

Set l = Order_Now.ListView1.ListItems.Add(, , lab)

l.SubItems(1) = pri

l.SubItems(2) = quan

vat = (pri * quan * 20) / 100

l.SubItems(3) = vat

cal = pri * quan + vat

l.SubItems(4) = cal

Call Friesdesc

total = 0

For i = 1 To Order_Now.ListView1.ListItems.Count

total = total + Val(Order_Now.ListView1.ListItems.Item(i).SubItems(4))

Next

Order_Now.Label4.Caption = total

End If

End Sub

Private Sub Command6_Click()

Call Friesdesc

Image5.Visible = False

Frame1.Visible = True

Label1.Caption = Command6.Caption

End Sub

Private Sub Command7_Click()

Call Friesdesc

Image5.Visible = False

Frame1.Visible = True

Label1.Caption = Command7.Caption

Page 99: Kirtesh Khandelwal Visual Basics Project

End Sub

Private Sub Command8_Click()

Call Friesdesc

Image5.Visible = False

Frame1.Visible = True

Label1.Caption = Command8.Caption

End Sub

Private Sub Command9_Click()

Call Friesdesc

Image5.Visible = False

Frame1.Visible = True

Label1.Caption = Command9.Caption

End Sub

Private Sub Form_Load()

Fries.BackColor = RGB(240, 6, 9)

Fries.Top = Fries.Height / 2.2 - Fries.Height / 3

Fries.Left = Fries.Width / 3 - Fries.Width / 3

End Sub

Private Sub Form_Activate()

Order_Now.Enabled = False

End Sub

Private Sub Form_Deactivate()

Order_Now.Enabled = True

End Sub

Private Sub Command10_Click()

Order_Now.Show: Order_Now.Enabled = True

Page 100: Kirtesh Khandelwal Visual Basics Project

End Sub

Private Sub Command11_Click()

Call check1

End Sub

Private Sub Label8_Click()

Order_Now.Show

Order_Now.Enabled = True

End Sub

Private Sub Option1_Click()

Call connect

With all

Do Until .EOF

If (Label1.Caption = .Fields(2).Value) Then

price = .Fields(3).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

End Sub

Private Sub Option2_Click()

Call connect

With all

Do Until .EOF

If (Label1.Caption = .Fields(2).Value) Then

Page 101: Kirtesh Khandelwal Visual Basics Project

price = .Fields(4).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

End Sub

Private Sub Option3_Click()

Call connect

With all

Do Until .EOF

If (Label1.Caption = .Fields(2).Value) Then

price = .Fields(5).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

End Sub

Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)

If (Text1.Text = "") Then

Else

If ((KeyCode >= 48 And KeyCode <= 57) Or (KeyCode >= 96 And KeyCode <=

105) Or KeyCode = 13 Or KeyCode = 35 Or _

KeyCode = 36 Or KeyCode = 32 Or KeyCode = 8 Or KeyCode = 16 Or KeyCode

= 37 Or KeyCode = 38 Or KeyCode = 39 Or KeyCode = 40) Then

Page 102: Kirtesh Khandelwal Visual Basics Project

Else

MsgBox ("Not Allowed")

Text1.Text = ""

End If

End If

End Sub

Icecream:-

Private Sub Command1_Click()

Call Icecreamdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command1.Caption

End Sub

Private Sub Command2_Click()

Call Icecreamdesc

Page 103: Kirtesh Khandelwal Visual Basics Project

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command2.Caption

End Sub

Private Sub Command3_Click()

Call Icecreamdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command3.Caption

End Sub

Private Sub Command4_Click()

Call Icecreamdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command4.Caption

End Sub

Private Sub Command5_Click()

If Label7.Caption = "" And Text1.Text = "" Then

MsgBox ("Select The Order"), vbCritical

ElseIf Label7.Caption = "" Then

MsgBox ("Select the Size"), vbCritical

ElseIf Text1.Text = "" Then

MsgBox ("Enter the Quantity"), vbCritical

Page 104: Kirtesh Khandelwal Visual Basics Project

Else

lab = Icecream.Label1.Caption

pri = Val(Icecream.Label7.Caption)

quan = Val(Icecream.Text1.Text)

Set l = Order_Now.ListView1.ListItems.Add(, , lab)

l.SubItems(1) = pri

l.SubItems(2) = quan

vat = (pri * quan * 20) / 100

l.SubItems(3) = vat

cal = pri * quan + vat

l.SubItems(4) = cal

Call Icecreamdesc

total = 0

For i = 1 To Order_Now.ListView1.ListItems.Count

total = total + Val(Order_Now.ListView1.ListItems.Item(i).SubItems(4))

Next

Order_Now.Label4.Caption = total

End If

End Sub

Private Sub Command6_Click()

Call Icecreamdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command6.Caption

End Sub

Private Sub Command7_Click()

Page 105: Kirtesh Khandelwal Visual Basics Project

Call Icecreamdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command7.Caption

End Sub

Private Sub Command8_Click()

Call Icecreamdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command8.Caption

End Sub

Private Sub Command9_Click()

Call Icecreamdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command9.Caption

End Sub

Private Sub Form_Load()

Icecream.BackColor = RGB(240, 6, 9)

Icecream.Top = Icecream.Height / 2.2 - Icecream.Height / 3

Icecream.Left = Icecream.Width / 3 - Icecream.Width / 3

End Sub

Private Sub Form_Activate()

Order_Now.Enabled = False

End Sub

Page 106: Kirtesh Khandelwal Visual Basics Project

Private Sub Form_Deactivate()

Order_Now.Enabled = True

End Sub

Private Sub Command10_Click()

Order_Now.Show: Order_Now.Enabled = True

End Sub

Private Sub Command11_Click()

Call check1

End Sub

Private Sub Label8_Click()

Order_Now.Show

Order_Now.Enabled = True

End Sub

Private Sub Option1_Click()

Call connect

With all

Do Until .EOF

If (Label1.Caption = .Fields(2).Value) Then

price = .Fields(3).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

End Sub

Page 107: Kirtesh Khandelwal Visual Basics Project

Private Sub Option2_Click()

Call connect

With all

Do Until .EOF

If (Label1.Caption = .Fields(2).Value) Then

price = .Fields(4).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

End Sub

Private Sub Option3_Click()

Call connect

With all

Do Until .EOF

If (Label1.Caption = .Fields(2).Value) Then

price = .Fields(5).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

End Sub

Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)

If (Text1.Text = "") Then

Page 108: Kirtesh Khandelwal Visual Basics Project

Else

If ((KeyCode >= 48 And KeyCode <= 57) Or (KeyCode >= 96 And KeyCode <=

105) Or KeyCode = 13 Or KeyCode = 35 Or _

KeyCode = 36 Or KeyCode = 32 Or KeyCode = 8 Or KeyCode = 16 Or KeyCode

= 37 Or KeyCode = 38 Or KeyCode = 39 Or KeyCode = 40) Then

Else

MsgBox ("Not Allowed")

Text1.Text = ""

End If

End If

End Sub

Join_us:-

Page 109: Kirtesh Khandelwal Visual Basics Project

Already in Our List Update Pofile:-

Page 110: Kirtesh Khandelwal Visual Basics Project

Dim cpass, cmcno

Dim apass, amcno

Dim check

Dim num, k

Dim a, m As Integer

Private Sub Command1_Click()

Call connect

With ju

If (Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Or

Text5.Text = "") Then

MsgBox "please fill all entries"

Else

check = 0

.MoveFirst

Page 111: Kirtesh Khandelwal Visual Basics Project

Do Until .EOF

If Text3.Text = (.Fields(2).Value) Then

check = 1

Exit Do

Else

check = 0

End If

.MoveNext

Loop

If (check = 1) Then

mgbox = MsgBox("Number is Already In Our List" & vbNewLine & "You

Want to overwright the data ???", vbYesNoCancel)

If (mgbox = 6) Then

.Fields(0) = StrConv(Text1.Text, vbProperCase)

.Fields(1) = StrConv(Text2.Text, vbProperCase)

.Fields(2) = StrConv(Text3.Text, vbProperCase)

.Fields(3) = StrConv(Text4.Text, vbProperCase)

.Fields(4) = StrConv(Text6.Text, vbProperCase)

.Fields(8) = StrConv(Text5.Text, vbProperCase)

.Update

Text1.Text = ""

Text2.Text = ""

Text3.Text = ""

Text4.Text = ""

Text5.Text = ""

Text6.Text = ""

Page 112: Kirtesh Khandelwal Visual Basics Project

Else

End If

Else

apass = 1001

m = 0

If .RecordCount = 0 Then

m = 1

apass = 1001

Else

.MoveFirst

Do Until ju.EOF

If .Fields(5).Value > m Then

m = .Fields(5).Value

apass = apass + 11

End If

.MoveNext

Loop

m = m + 1

End If

.AddNew

amcno = "MCcn" & Format(m, "0000")

.Fields(0) = StrConv(Text1.Text, vbProperCase)

.Fields(1) = StrConv(Text2.Text, vbProperCase)

.Fields(2) = StrConv(Text3.Text, vbProperCase)

.Fields(3) = StrConv(Text4.Text, vbProperCase)

.Fields(4) = StrConv(Text6.Text, vbProperCase)

Page 113: Kirtesh Khandelwal Visual Basics Project

.Fields(5) = m

.Fields(6) = amcno

.Fields(7) = apass

.Fields(8) = StrConv(Text5.Text, vbProperCase)

.Update

Text1.Text = ""

Text2.Text = ""

Text3.Text = ""

Text4.Text = ""

Text5.Text = ""

Text6.Text = ""

Frame2.Visible = True

Join_us.Label15.Caption = amcno

Join_us.Label16.Caption = apass

End If

End If

End With

End Sub

Private Sub Command2_Click()

Main_Interface.Show

Unload Me

End Sub

Private Sub Command3_Click()

If (Text7.Text = "" Or Text8.Text = "") Then

Page 114: Kirtesh Khandelwal Visual Basics Project

MsgBox ("Please Fill Both Entries")

Else

Call connect

check = 0

With ju

Do Until .EOF

If ((.Fields(6).Value = Text7.Text) And (.Fields(7).Value = Text8.Text))

Then

check = 1

Exit Do

Else

check = 0

End If

.MoveNext

Loop

If (check = 1) Then

Frame1.Visible = False

Text1.Text = .Fields(0)

Text2.Text = .Fields(1)

Text3.Text = .Fields(2)

Text4.Text = .Fields(3)

Text5.Text = .Fields(8)

Text6.Text = .Fields(4)

Else

Frame1.Visible = True

MsgBox ("Enter Correct ID And Password")

Text7.Text = ""

Page 115: Kirtesh Khandelwal Visual Basics Project

Text8.Text = ""

End If

End With

End If

End Sub

Private Sub Command4_Click()

Frame1.Visible = False

End Sub

Private Sub Command5_Click()

Frame2.Visible = False

End Sub

Private Sub Form_Load()

Timer1.Enabled = True

Frame1.Visible = False

End Sub

Private Sub Label10_Click()

Frame1.Visible = True

End Sub

Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)

If (Text1.Text = "") Then

Else

If KeyCode = 16 Or KeyCode = 32 Or KeyCode = 37 Or KeyCode = 38 Or

KeyCode = 39 Or KeyCode = 40 Or KeyCode = 35 Or KeyCode = 36 Or KeyCode

= 8 Then

Page 116: Kirtesh Khandelwal Visual Basics Project

ElseIf (Not ((KeyCode >= 65 And KeyCode <= 90)) Or ((KeyCode >= 97 And

KeyCode <= 122))) Then

str1 = Left(Text1.Text, Len(Text1.Text) - 1)

Text1.Text = ""

Text1.SelText = Right(str1, Len(str1))

Else

End If

End If

End Sub

Private Sub Text3_KeyUp(KeyCode As Integer, Shift As Integer)

If (Text3.Text = "") Then

k = 0

Else

'MsgBox (KeyCode)

k = k + 1

If (k = 1) Then

If (KeyCode = 105 Or KeyCode = 104 Or KeyCode = 103) Then

Else

MsgBox ("Enter a Valid Number")

Text3.Text = ""

End If

End If

If ((KeyCode >= 48 And KeyCode <= 57) Or (KeyCode >= 96 And KeyCode <=

105) Or KeyCode = 13 Or KeyCode = 35 Or _

KeyCode = 36 Or KeyCode = 32 Or KeyCode = 8 Or KeyCode = 16 Or KeyCode

= 37 Or KeyCode = 38 Or KeyCode = 39 Or KeyCode = 40) Then

Else

MsgBox ("Not Allowed")

Page 117: Kirtesh Khandelwal Visual Basics Project

Text3.Text = ""

End If

End If

End Sub

Private Sub Text5_KeyUp(KeyCode As Integer, Shift As Integer)

If (Text5.Text = "") Then

Else

If ((KeyCode >= 48 And KeyCode <= 57) Or (KeyCode >= 96 And KeyCode <=

105) Or KeyCode = 13 Or KeyCode = 35 Or _

KeyCode = 36 Or KeyCode = 32 Or KeyCode = 8 Or KeyCode = 16 Or KeyCode

= 37 Or KeyCode = 38 Or KeyCode = 39 Or KeyCode = 40) Then

Else

MsgBox ("Not Allowed")

Text5.Text = ""

End If

End If

End Sub

Private Sub Text5_LostFocus()

If Text5.Text = "" Then

ElseIf (Val(Text5.Text) < 5000) Then

MsgBox ("Membership Amount is NOT < 5000")

Text5.SetFocus

End If

End Sub

Private Sub Text6_KeyUp(KeyCode As Integer, Shift As Integer)

If (Text6.Text = "") Then

Page 118: Kirtesh Khandelwal Visual Basics Project

Else

If ((KeyCode >= 48 And KeyCode <= 57) Or (KeyCode >= 96 And KeyCode <=

105) Or KeyCode = 13 Or KeyCode = 8 Or KeyCode = 35 _

Or KeyCode = 36 Or KeyCode = 16 Or KeyCode = 37 Or KeyCode = 38 Or

KeyCode = 39 Or KeyCode = 40) Then

Else

MsgBox ("Not Allowed")

Text6.Text = ""

End If

End If

End Sub

Private Sub Text7_KeyUp(KeyCode As Integer, Shift As Integer)

If Text7.Text = "" Then

Else

If ((KeyCode >= 48 And KeyCode <= 57) Or (KeyCode >= 96 And KeyCode <=

105) Or (KeyCode >= 60 And KeyCode <= 90) Or KeyCode = 13 Or KeyCode =

35 Or _

KeyCode = 36 Or KeyCode = 32 Or KeyCode = 8 Or KeyCode = 16 Or KeyCode

= 37 Or KeyCode = 38 Or KeyCode = 39 Or KeyCode = 40) Then

Else

MsgBox ("Not Allowed")

Text7.Text = ""

End If

End If

End Sub

Private Sub Text8_KeyUp(KeyCode As Integer, Shift As Integer)

If (Text8.Text = "") Then

Else

Page 119: Kirtesh Khandelwal Visual Basics Project

If ((KeyCode >= 48 And KeyCode <= 57) Or (KeyCode >= 96 And KeyCode <=

105) Or KeyCode = 13 Or KeyCode = 35 Or _

KeyCode = 36 Or KeyCode = 8 Or KeyCode = 37 Or KeyCode = 38 Or KeyCode

= 39 Or KeyCode = 40) Then

Else

MsgBox ("Not Allowed")

Text8.Text = ""

End If

End If

End Sub

Private Sub Timer1_Timer()

If a = 0 Then

Label8.Caption = " "

Label8.Caption = "I"

a = 1

ElseIf a = 1 Then

Label8.Caption = " "

Label8.Caption = "I m"

a = 2

ElseIf a = 2 Then

Label8.Caption = " "

Label8.Caption = "I m l"

a = 3

ElseIf a = 3 Then

Label8.Caption = " "

Label8.Caption = "I m lo"

a = 4

ElseIf a = 4 Then

Page 120: Kirtesh Khandelwal Visual Basics Project

Label8.Caption = " "

Label8.Caption = "I m lov"

a = 5

ElseIf a = 5 Then

Label8.Caption = " "

Label8.Caption = "I m lovi"

a = 6

ElseIf a = 6 Then

Label8.Caption = " "

Label8.Caption = "I m lovin"

a = 7

ElseIf a = 7 Then

Label8.Caption = " "

Label8.Caption = "I m lovin i"

a = 8

ElseIf a = 8 Then

Label8.Caption = " "

Label8.Caption = "I m lovin it"

a = 9

ElseIf a = 9 Then

Label8.Caption = " "

Label8.Caption = " "

a = 0

End If

End Sub

Page 121: Kirtesh Khandelwal Visual Basics Project

Modify:-

Private Sub Command20_Click()

Label30.Caption = Val(Text3.Text) * Val(Label1.Caption)

vat = Val(Label30.Caption) * 20 / 100

Order_Now.ListView1.ListItems.Item(i).Text = Label22.Caption

Order_Now.ListView1.ListItems.Item(i).SubItems(1) = Label1.Caption

Order_Now.ListView1.ListItems.Item(i).SubItems(2) = Text3.Text

Order_Now.ListView1.ListItems.Item(i).SubItems(3) = vat

Order_Now.ListView1.ListItems.Item(i).SubItems(4) = (Val(Label30.Caption) +

vat)

End Sub

Private Sub Command21_Click()

Order_Now.Show

Order_Now.Enabled = True

Page 122: Kirtesh Khandelwal Visual Basics Project

Unload Me

Unload Burger

Unload Chicken

Unload Coffee

Unload Combo

Unload Chocolate

Unload Fries

Unload Icecream

Unload Salad

Unload Shakes

End Sub

Private Sub Command22_Click()

Label1.Caption = ""

Label22.Caption = ""

Label30.Caption = ""

Text3.Text = ""

Option1.Value = False

Option2.Value = False

Option3.Value = False

End Sub

Private Sub Form_Activate()

Order_Now.Enabled = False

End Sub

Private Sub Command23_Click()

Order_Now.ListView1.ListItems.Remove (i)

i = i - 1

End Sub

Page 123: Kirtesh Khandelwal Visual Basics Project

Private Sub Command24_Click()

i = Order_Now.ListView1.ListItems.Count

Label22.Caption = Order_Now.ListView1.ListItems.Item(i).Text

Text3.Text = (Order_Now.ListView1.ListItems.Item(i).SubItems(2))

Label1.Caption = (Order_Now.ListView1.ListItems.Item(i).SubItems(1))

total = (Order_Now.ListView1.ListItems.Item(i).SubItems(1)) *

(Order_Now.ListView1.ListItems.Item(i).SubItems(2))

Option1.Value = False

Option2.Value = False

Option3.Value = False

Label30.Caption = total

price = (Val(Label30.Caption) / Val(Text3.Text))

Call connect

With all

Do Until .EOF

If (Label22.Caption = (.Fields(2).Value)) Then

If (price = Val(.Fields(3).Value)) Then

Option1.Value = True

Option2.Value = False

Option3.Value = False

Else

If (price = Val(.Fields(4).Value)) Then

Option2.Value = True

Option1.Value = False

Option3.Value = False

Else

Page 124: Kirtesh Khandelwal Visual Basics Project

If (price = Val(.Fields(5).Value)) Then

Option3.Value = True

Option1.Value = False

Option2.Value = False

End If

End If

End If

End If

.MoveNext

Loop

End With

End Sub

Private Sub Command25_Click()

i = 1

Label22.Caption = Order_Now.ListView1.ListItems.Item(i).Text

Text3.Text = (Order_Now.ListView1.ListItems.Item(i).SubItems(2))

Label1.Caption = (Order_Now.ListView1.ListItems.Item(i).SubItems(1))

total = (Order_Now.ListView1.ListItems.Item(i).SubItems(1)) *

(Order_Now.ListView1.ListItems.Item(i).SubItems(2))

Option1.Value = False

Option2.Value = False

Option3.Value = False

Label30.Caption = total

price = (Val(Label30.Caption) / Val(Text3.Text))

Call connect

With all

Do Until .EOF

If (Label22.Caption = .Fields(2).Value) Then

Page 125: Kirtesh Khandelwal Visual Basics Project

If (price = Val(.Fields(3).Value)) Then

Option1.Value = True

Option2.Value = False

Option3.Value = False

Else

If (price = Val(.Fields(4).Value)) Then

Option2.Value = True

Option1.Value = False

Option3.Value = False

Else

If (price = Val(.Fields(5).Value)) Then

Option3.Value = True

Option1.Value = False

Option2.Value = False

End If

End If

End If

End If

.MoveNext

Loop

End With

End Sub

Private Sub Form_Deactivate()

Order_Now.Enabled = True

End Sub

Page 126: Kirtesh Khandelwal Visual Basics Project

Private Sub Form_Load()

Modify.BackColor = RGB(240, 6, 9)

Modify.Top = Modify.Height / 2.2 - Modify.Height / 3

Modify.Left = Modify.Width / 3 - Modify.Width / 3

i = 1

Label22.Caption = Order_Now.ListView1.ListItems.Item(i).Text

Text3.Text = (Order_Now.ListView1.ListItems.Item(i).SubItems(2))

Label1.Caption = (Order_Now.ListView1.ListItems.Item(i).SubItems(1))

total = (Order_Now.ListView1.ListItems.Item(i).SubItems(1)) *

(Order_Now.ListView1.ListItems.Item(i).SubItems(2))

Option1.Value = False

Option2.Value = False

Option3.Value = False

Label30.Caption = total

price = (Val(Label30.Caption) / Val(Text3.Text))

Call connect

With all

Do Until .EOF

If (Label22.Caption = .Fields(2).Value) Then

If (price = Val(.Fields(3).Value)) Then

Option1.Value = True

Option2.Value = False

Option3.Value = False

Else

If (price = Val(.Fields(4).Value)) Then

Option2.Value = True

Option1.Value = False

Page 127: Kirtesh Khandelwal Visual Basics Project

Option3.Value = False

Else

If (price = Val(.Fields(5).Value)) Then

Option3.Value = True

Option1.Value = False

Option2.Value = False

End If

End If

End If

End If

.MoveNext

Loop

End With

End Sub

Private Sub Command1_Click()

If (i = Order_Now.ListView1.ListItems.Count) Then

i = 0

End If

i = i + 1

Label22.Caption = Order_Now.ListView1.ListItems.Item(i).Text

Text3.Text = (Order_Now.ListView1.ListItems.Item(i).SubItems(2))

Label1.Caption = (Order_Now.ListView1.ListItems.Item(i).SubItems(1))

total = (Order_Now.ListView1.ListItems.Item(i).SubItems(1)) *

(Order_Now.ListView1.ListItems.Item(i).SubItems(2))

Option1.Value = False

Option2.Value = False

Page 128: Kirtesh Khandelwal Visual Basics Project

Option3.Value = False

Label30.Caption = total

price = (Val(Label30.Caption) / Val(Text3.Text))

Call connect

With all

Do Until .EOF

If (Label22.Caption = .Fields(2).Value) Then

If (price = Val(.Fields(3).Value)) Then

Option1.Value = True

Option2.Value = False

Option3.Value = False

Else

If (price = Val(.Fields(4).Value)) Then

Option2.Value = True

Option1.Value = False

Option3.Value = False

Else

If (price = Val(.Fields(5).Value)) Then

Option3.Value = True

Option1.Value = False

Option2.Value = False

End If

End If

End If

End If

.MoveNext

Loop

Page 129: Kirtesh Khandelwal Visual Basics Project

End With

End Sub

Private Sub Command2_Click()

If (i = 1) Then

i = (Order_Now.ListView1.ListItems.Count + 1)

End If

i = i - 1

Label22.Caption = Order_Now.ListView1.ListItems.Item(i).Text

Text3.Text = (Order_Now.ListView1.ListItems.Item(i).SubItems(2))

Label1.Caption = (Order_Now.ListView1.ListItems.Item(i).SubItems(1))

total = (Order_Now.ListView1.ListItems.Item(i).SubItems(1)) *

(Order_Now.ListView1.ListItems.Item(i).SubItems(2))

Label30.Caption = total

Option1.Value = False

Option2.Value = False

Option3.Value = False

price = (Val(Label30.Caption) / Val(Text3.Text))

Call connect

With all

Do Until .EOF

If (Label22.Caption = .Fields(2).Value) Then

If (price = Val(.Fields(3).Value)) Then

Option1.Value = True

Option2.Value = False

Option3.Value = False

Else

If (price = Val(.Fields(4).Value)) Then

Page 130: Kirtesh Khandelwal Visual Basics Project

Option2.Value = True

Option1.Value = False

Option3.Value = False

Else

If (price = Val(.Fields(5).Value)) Then

Option3.Value = True

Option1.Value = False

Option2.Value = False

End If

End If

End If

End If

.MoveNext

Loop

End With

End Sub

Private Sub Option1_Click()

Call connect

With all

Do Until .EOF

If (Label22.Caption = .Fields(2).Value) Then

price = .Fields(3).Value

Label1.Caption = price

End If

.MoveNext

Loop

total = (Val(Text3.Text) * Val(Label1.Caption))

Page 131: Kirtesh Khandelwal Visual Basics Project

Label30.Caption = total

End With

End Sub

Private Sub Option2_Click()

Call connect

With all

Do Until .EOF

If (Label22.Caption = .Fields(2).Value) Then

price = .Fields(4).Value

Label1.Caption = price

End If

.MoveNext

Loop

total = (Val(Text3.Text) * Val(Label1.Caption))

Label30.Caption = total

End With

End Sub

Private Sub Option3_Click()

Call connect

With all

Do Until .EOF

If (Label22.Caption = .Fields(2).Value) Then

price = .Fields(5).Value

Page 132: Kirtesh Khandelwal Visual Basics Project

Label1.Caption = price

End If

.MoveNext

Loop

total = (Val(Text3.Text) * Val(Label1.Caption))

Label30.Caption = total

End With

End Sub

Order_Now:-

Dim check, k

Private Sub Command10_Click()

If ListView1.ListItems.Count = 0 Then

MsgBox ("Please Select the order first"), vbCritical

Page 133: Kirtesh Khandelwal Visual Basics Project

Else

ListView1.Visible = False

Frame2.Visible = True

Text8.SetFocus

Label4.Visible = False

Label22.Visible = False

Text7.Text = ""

Text8.Text = ""

Text3.Text = ""

Text2.Text = ""

Text1.Text = ""

End If

End Sub

Private Sub Command11_Click()

If ListView1.ListItems.Count = 0 Then

MsgBox ("Please Select the order first"), vbCritical

Else

Modify.Show

Modify.Text3.SetFocus

End If

End Sub

Private Sub Command13_Click()

check = 0

check = MsgBox("Are you sure you wanna logout?", vbYesNoCancel, "Choose the

Correct...")

If (check = 6) Then

ListView1.ListItems.Clear

Page 134: Kirtesh Khandelwal Visual Basics Project

ListView1.Visible = True

Frame6.Visible = True

Frame4.Visible = True

Frame3.Visible = False

Frame5.Visible = False

Label4.Caption = ""

Label5.Caption = ""

Label6.Caption = ""

Label4.Caption = "0"

ListView1.Top = 0

total = 0

Label22.Visible = True

Command15.Visible = True

Command10.Visible = True

Command11.Visible = True

Label4.Visible = True

Unload DataReport1

Unload Blank

Login_Form.Show

Else

If (check = 7) Then

End If

End If

End Sub

Private Sub Command14_Click()

Call connect

Page 135: Kirtesh Khandelwal Visual Basics Project

If (Text7.Text = "" Or Text8.Text = "" Or Text3.Text = "") Then

MsgBox ("Please Fill All Entries")

Else

cname = Text7.Text

phone = Text8.Text

With tempbill

If (.RecordCount = 0) Then

Else

.MoveFirst

Do Until .EOF

.Delete

.MoveNext

Loop

End If

c = Val(ListView1.ListItems.Count)

i = 1

c = c + 1

Do Until i = c

.AddNew

.Fields(0).Value = (ListView1.ListItems.Item(i).Text)

.Fields(1).Value = ListView1.ListItems.Item(i).SubItems(1)

.Fields(2).Value = ListView1.ListItems.Item(i).SubItems(2)

.Fields(3).Value = ListView1.ListItems.Item(i).SubItems(3)

.Fields(4).Value = ListView1.ListItems.Item(i).SubItems(4)

i = i + 1

.Update

Loop

End With

Page 136: Kirtesh Khandelwal Visual Basics Project

With pbill

If .RecordCount = 0 Then

mid = "MD-00010191110"

With bmemp

.MoveFirst

Do Until .EOF

.Fields(2) = 0

.Fields(3) = 0

.Fields(4) = 0

.Fields(5) = 0

.Fields(6) = 0

.Fields(7) = 0

.Fields(8) = 0

.Fields(9) = 0

.Fields(10) = 0

.Fields(11) = 0

.Fields(12) = 0

.Fields(13) = 0

.Update

.MoveNext

Loop

End With

With tmidpass

If (.RecordCount = 0) Then

Else

.MoveFirst

Do Until .EOF

.Fields(4).Value = 0

Page 137: Kirtesh Khandelwal Visual Basics Project

.Update

.MoveNext

Loop

End If

End With

With eidpass

If (.RecordCount = 0) Then

Else

.MoveFirst

Do Until .EOF

.Fields(4).Value = 0

.Update

.MoveNext

Loop

End If

End With

Else

.MoveFirst

Do Until .EOF

mid = .Fields(3).Value

.MoveNext

Loop

End If

End With

mid = Val(Right(mid, 11)) + 1

gbill = "MD-" & Format(mid, "00000000000")

Page 138: Kirtesh Khandelwal Visual Basics Project

Frame5.Top = 7680

Frame5.Left = 13740

Frame2.Visible = False

Frame4.Visible = False

Frame5.Visible = True

Label22.Visible = False

Label4.Visible = False

Label5.Visible = True

Label6.Visible = True

Label8.Visible = True

Label9.Visible = True

Label10.Visible = True

Label7.Visible = True

Label14.Visible = True

Label13.Visible = True

Command19.Visible = True

Command20.Visible = True

Label13.Caption = ""

Label18.Caption = ""

Label8.Caption = ""

Label9.Caption = ""

Label6.Caption = Text7.Text

Label5.Caption = Text8.Text

ser = Val(Label4.Caption) * 4 / 100

total = Val(Label4.Caption) + ser

ListView1.Visible = True

Label8.Caption = ser

Label9.Caption = total

Page 139: Kirtesh Khandelwal Visual Basics Project

Label13.Caption = Label4.Caption

'MsgBox (gbill)

j = 1

btime = Time

With pbill

Do Until j = c

.AddNew

.Fields(0).Value = Text7.Text

.Fields(1).Value = Text8.Text

.Fields(2).Value = Text3.Text

'MsgBox (gbill)

.Fields(3).Value = gbill

.Fields(4).Value = Date

.Fields(5).Value = btime

.Fields(6).Value = ListView1.ListItems.Item(j).Text

.Fields(7).Value = ListView1.ListItems.Item(j).SubItems(1)

.Fields(8).Value = ListView1.ListItems.Item(j).SubItems(2)

.Fields(9).Value = ListView1.ListItems.Item(j).SubItems(3)

.Fields(10).Value = ListView1.ListItems.Item(j).SubItems(4)

.Fields(11).Value = 0

.Fields(12).Value = ser

.Fields(13).Value = total

.Fields(14).Value = Label16.Caption

j = j + 1

.Update

Loop

End With

Page 140: Kirtesh Khandelwal Visual Basics Project

Text7.Text = ""

Text8.Text = ""

Text3.Text = ""

With tmidpass

If (.RecordCount = 0) Then

Else

.MoveFirst

Do Until .EOF

If (Label16.Caption = .Fields(1).Value) Then

.Fields(4).Value = (Val(.Fields(4).Value) +

Order_Now.ListView1.ListItems.Count)

.Update

Exit Do

End If

.MoveNext

Loop

End If

End With

With eidpass

If (.RecordCount = 0) Then

Else

.MoveFirst

Do Until .EOF

If (Label16.Caption = .Fields(1).Value) Then

.Fields(4).Value = (Val(.Fields(4).Value) +

Order_Now.ListView1.ListItems.Count)

.Update

Exit Do

End If

.MoveNext

Page 141: Kirtesh Khandelwal Visual Basics Project

Loop

End If

End With

With bmemp

.MoveFirst

Do Until .EOF

If (Label16.Caption = .Fields(1).Value) Then

k = Month(Date)

k = k + 1

.Fields(k).Value = (Val(.Fields(k).Value) +

Order_Now.ListView1.ListItems.Count)

.Update

Exit Do

End If

.MoveNext

Loop

.MoveFirst

Do Until .EOF

tot = 0

tot = (tot + Val(.Fields(2).Value) + Val(.Fields(3).Value) +

Val(.Fields(4).Value) + Val(.Fields(5).Value) + Val(.Fields(6).Value) +

Val(.Fields(7).Value) + Val(.Fields(8).Value) + Val(.Fields(9).Value) +

Val(.Fields(10).Value) + Val(.Fields(11).Value) + Val(.Fields(12).Value) +

Val(.Fields(13).Value))

.Fields(14).Value = tot

.Update

.MoveNext

Loop

End With

With tbemp

If (.RecordCount = 0) Then

Page 142: Kirtesh Khandelwal Visual Basics Project

k = 0

'MsgBox (k)

Else

.MoveFirst

k = 0

Do Until .EOF

If (.Fields(0).Value = Date) Then

'MsgBox (k)

k = 1

Exit Do

Else

k = 0

End If

.MoveNext

Loop

End If

'MsgBox (k)

If (k = 0) Then

' MsgBox (k)

.AddNew

.Fields(0) = Date

.Update

With eidpass

If (.RecordCount = 0) Then

Else

.MoveFirst

Do Until .EOF

If (Order_Now.Label16.Caption = .Fields(1).Value) Then

i = (Val(.Fields(3).Value))

Page 143: Kirtesh Khandelwal Visual Basics Project

'MsgBox ("i=" & i)

If IsNull(tbemp.Fields(i)) Then

tbemp.Fields(i) = 1

tbemp.Update

'MsgBox (i)

'MsgBox (tbemp.Fields(i))

Else

'MsgBox (i)

'MsgBox (tbemp.Fields(i))

tbemp.Fields(i) = (Val(tbemp.Fields(i)) + 1)

tbemp.Update

End If

End If

.MoveNext

Loop

End If

End With

Else

With eidpass

If (.RecordCount = 0) Then

Else

.MoveFirst

Do Until .EOF

If (Order_Now.Label16.Caption = .Fields(1).Value) Then

i = (Val(.Fields(3).Value))

'MsgBox ("i=" & i)

Page 144: Kirtesh Khandelwal Visual Basics Project

tbemp.Fields(i) = (Val(.Fields(4).Value))

tbemp.Update

End If

.MoveNext

Loop

End If

End With

End If

End With

With tbemp

.MoveFirst

Do Until .EOF

For i = 1 To eidpass.RecordCount

If (IsNull(.Fields(i).Value)) Then

.Fields(i).Value = 0

End If

Next

.MoveNext

Loop

End With

End If

End Sub

Private Sub Command15_Click()

Call check1

End Sub

Private Sub Command16_Click()

Page 145: Kirtesh Khandelwal Visual Basics Project

Frame3.Visible = False

Frame2.Visible = True

End Sub

Private Sub Command17_Click()

Call connect

With ju

Do Until .EOF

If .Fields(7).Value = Text1.Text And .Fields(6).Value = Text2.Text Then

check = 1

Label6.Visible = True

Label5.Visible = True

Label6.Caption = .Fields(0).Value

Label5.Caption = .Fields(2).Value

Exit Do

Else

check = 2

End If

.MoveNext

Loop

If check = 1 Then

phone = .Fields(2).Value

cname = .Fields(0).Value

dis = (Val(Order_Now.Label4.Caption) * 5 / 100)

Label18.Caption = dis

ser = (Val(Label4.Caption) - dis) * 20 / 100

total = (Val(Label4.Caption) - dis) + ser

Page 146: Kirtesh Khandelwal Visual Basics Project

Label8.Caption = ser

Label9.Caption = total

Label26.Caption = .Fields(8).Value

netamt = Val(Label26.Caption) - Val(Label9.Caption)

With pbill

Do Until .EOF

If (gbill = .Fields(3).Value) Then

.Fields(0).Value = cname

.Fields(1).Value = phone

.Fields(11).Value = dis

.Fields(12).Value = ser

.Fields(13).Value = total

.Update

End If

.MoveNext

Loop

End With

If (netamt < 0) Then

Label24.Caption = (-(netamt))

Label29.Caption = 0

.Fields(8).Value = Val(Label29.Caption)

.Update

Else

Label29.Caption = netamt

Label24.Caption = 0

.Fields(8).Value = Val(Label29.Caption)

Page 147: Kirtesh Khandelwal Visual Basics Project

.Update

End If

Frame3.Visible = False

ListView1.Visible = True

Frame2.Visible = False

Frame5.Visible = True

Frame4.Visible = False

Frame5.Top = 7680

Frame5.Left = 13740

Command10.Visible = False

Command11.Visible = False

Label22.Visible = False

Command15.Visible = False

Command19.Visible = True

Command20.Visible = True

Label13.Caption = Label4.Caption

Label4.Visible = False

Label17.Visible = True

Label23.Visible = True

Label24.Visible = True

Label28.Visible = True

Label29.Visible = True

Label26.Visible = True

Label27.Visible = True

Label18.Visible = True

Label8.Visible = True

Label9.Visible = True

Label10.Visible = True

Label7.Visible = True

Page 148: Kirtesh Khandelwal Visual Basics Project

Label14.Visible = True

Label13.Visible = True

Text2.Text = ""

Text1.Text = ""

Else

MsgBox ("Not a memeber")

Text2.Text = ""

Text1.Text = ""

End If

End With

End Sub

Private Sub Command18_Click()

Frame2.Visible = False

ListView1.Visible = True

End Sub

Private Sub Command19_Click()

ListView1.ListItems.Clear

ListView1.Visible = True

Frame6.Visible = True

Frame4.Visible = True

Frame3.Visible = False

Frame5.Visible = False

Label4.Caption = ""

Label5.Caption = ""

Label6.Caption = ""

Page 149: Kirtesh Khandelwal Visual Basics Project

Label4.Caption = "0"

total = 0

ListView1.Top = 0

Label22.Visible = True

Command15.Visible = True

Command10.Visible = True

Command11.Visible = True

Label4.Visible = True

Unload DataReport1

Unload Blank

End Sub

Private Sub Command20_Click()

Blank.Width = 13005

Blank.Show

Blank.Enabled = False

Set DataReport1.DataSource = tempbill

DataReport1.Sections(2).Controls("label6").Caption = cname

DataReport1.Sections(2).Controls("label7").Caption = phone

DataReport1.Sections(5).Controls("Label12").Caption =

Round(Val(Label18.Caption))

DataReport1.Sections(5).Controls("Label19").Caption =

Round(Val(Label8.Caption))

DataReport1.Sections(5).Controls("Label10").Caption =

Round(Val(Label9.Caption))

DataReport1.Sections("Section1").Controls("text1").DataField = "pname"

DataReport1.Sections("Section1").Controls("text2").DataField = "price"

DataReport1.Sections("Section1").Controls("text3").DataField = "quantity"

DataReport1.Sections("Section1").Controls("text4").DataField = "vat"

DataReport1.Sections("Section1").Controls("text5").DataField = "amt"

DataReport1.Sections(2).Controls("label15").Caption = gbill

Page 150: Kirtesh Khandelwal Visual Basics Project

DataReport1.Sections(2).Controls("label16").Caption = Date

DataReport1.Sections(2).Controls("label17").Caption = Time

DataReport1.Refresh

DataReport1.Show

End Sub

Private Sub Command21_Click()

Frame7.Visible = False

End Sub

Private Sub Command22_Click()

Label22.Caption = ""

Label30.Caption = ""

Text3.Text = ""

Option1.Value = False

Option2.Value = False

Option3.Value = False

End Sub

Private Sub Command1_Click()

Combo.Show

Combo.Image5.Visible = True

Combo.Frame1.Visible = False

End Sub

Private Sub Command2_Click()

Salad.Show

Salad.Image5.Visible = True

Salad.Frame1.Visible = False

Page 151: Kirtesh Khandelwal Visual Basics Project

End Sub

Private Sub Command3_Click()

Icecream.Show

Icecream.Image5.Visible = True

Icecream.Frame1.Visible = False

End Sub

Private Sub Command4_Click()

Coffee.Show

Coffee.Image5.Visible = True

Coffee.Frame1.Visible = False

End Sub

Private Sub Command5_Click()

Shakes.Show

Shakes.Image5.Visible = True

Shakes.Frame1.Visible = False

End Sub

Private Sub Command6_Click()

Chicken.Show

Chicken.Image5.Visible = True

Chicken.Frame1.Visible = False

End Sub

Private Sub Command7_Click()

Fries.Show

Fries.Image5.Visible = True

Page 152: Kirtesh Khandelwal Visual Basics Project

Fries.Frame1.Visible = False

End Sub

Private Sub Command8_Click()

Burger.Show

Burger.Image5.Visible = True

Burger.Frame1.Visible = False

End Sub

Private Sub Command9_Click()

Chocolate.Show

Chocolate.Image5.Visible = True

Chocolate.Frame1.Visible = False

End Sub

Private Sub Form_Load()

Frame4.Top = 10035

Frame4.Left = 13680

Order_Now.BackColor = RGB(241, 6, 11)

Label2.BackColor = RGB(241, 6, 11)

End Sub

Private Sub Label19_Click()

Frame3.Visible = True

Text2.SetFocus

Frame3.Left = 13800

Frame3.Top = 3840

End Sub

Page 153: Kirtesh Khandelwal Visual Basics Project

Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)

If (Text1.Text = "") Then

Else

If ((KeyCode >= 48 And KeyCode <= 57) Or (KeyCode >= 96 And KeyCode <=

105) Or KeyCode = 13 Or KeyCode = 35 Or _

KeyCode = 36 Or KeyCode = 8 Or KeyCode = 37 Or KeyCode = 38 Or KeyCode

= 39 Or KeyCode = 40) Then

Else

MsgBox ("Not Allowed")

Text1.Text = ""

End If

End If

End Sub

Private Sub Text2_KeyUp(KeyCode As Integer, Shift As Integer)

If Text2.Text = "" Then

Else

If ((KeyCode >= 48 And KeyCode <= 57) Or (KeyCode >= 96 And KeyCode <=

105) Or (KeyCode >= 60 And KeyCode <= 90) Or KeyCode = 13 Or KeyCode =

35 Or _

KeyCode = 36 Or KeyCode = 32 Or KeyCode = 8 Or KeyCode = 16 Or KeyCode

= 37 Or KeyCode = 38 Or KeyCode = 39 Or KeyCode = 40) Then

Else

MsgBox ("Not Allowed")

Text2.Text = ""

End If

End If

End Sub

Private Sub Text3_KeyUp(KeyCode As Integer, Shift As Integer)

Page 154: Kirtesh Khandelwal Visual Basics Project

'MsgBox (KeyCode)

If (Text3.Text = "") Then

Else

If ((KeyCode >= 48 And KeyCode <= 57) Or (KeyCode >= 96 And KeyCode <=

105) Or KeyCode = 13 Or KeyCode = 35 Or _

KeyCode = 111 Or KeyCode = 191 Or KeyCode = 36 Or KeyCode = 32 Or

KeyCode = 8 Or KeyCode = 16 Or KeyCode = 37 Or KeyCode = 38 Or KeyCode

= 39 Or KeyCode = 40) Then

Else

MsgBox ("Not Allowed")

Text3.Text = ""

End If

End If

End Sub

Private Sub Text3_LostFocus()

'MsgBox TypeName(Text3.Text)

If (Text3.Text = "") Then

Else

If (IsDate(Text3.Text)) Then

If (CDate(Text3.Text) > Date) Then

MsgBox ("Not Valid Date")

Text3.Text = ""

Text3.SetFocus

End If

Else

MsgBox ("Please Input Proper Date")

Text3.Text = ""

Text3.SetFocus

End If

Page 155: Kirtesh Khandelwal Visual Basics Project

End If

End Sub

Private Sub Text7_KeyUp(KeyCode As Integer, Shift As Integer)

If (Text7.Text = "") Then

Else

If KeyCode = 16 Or KeyCode = 32 Or KeyCode = 37 Or KeyCode = 38 Or

KeyCode = 39 Or KeyCode = 40 Or KeyCode = 35 Or KeyCode = 36 Or KeyCode

= 8 Then

ElseIf (Not ((KeyCode >= 65 And KeyCode <= 90)) Or ((KeyCode >= 97 And

KeyCode <= 122))) Then

str1 = Left(Text7.Text, Len(Text7.Text) - 1)

Text7.Text = ""

Text7.SelText = Right(str1, Len(str1))

Else

End If

End If

End Sub

Private Sub Text8_KeyUp(KeyCode As Integer, Shift As Integer)

If (Text8.Text = "") Then

k = 0

Else

k = k + 1

If (k = 1) Then

If (KeyCode = 105 Or KeyCode = 104 Or KeyCode = 103 Or KeyCode = 55

Or KeyCode = 56 Or KeyCode = 57) Then

Else

MsgBox ("Enter a Valid Number")

Text8.Text = ""

Page 156: Kirtesh Khandelwal Visual Basics Project

End If

'ElseIf (k = 0) Then

End If

If ((KeyCode >= 48 And KeyCode <= 57) Or (KeyCode >= 96 And KeyCode <=

105) Or KeyCode = 13 Or KeyCode = 35 Or _

KeyCode = 36 Or KeyCode = 32 Or KeyCode = 8 Or KeyCode = 16 Or KeyCode

= 37 Or KeyCode = 38 Or KeyCode = 39 Or KeyCode = 40) Then

Else

MsgBox ("Not Allowed")

Text8.Text = ""

End If

End If

End Sub

Private Sub Text8_LostFocus()

If (Text8.Text) = "" Then

Else

If (Len(Text8.Text) <> 10) Then

MsgBox ("Please Enter 10 Digit Number")

Text8.SetFocus

End If

End If

Call connect

With pbill

If (.RecordCount = 0) Then

Else

.MoveFirst

Do Until .EOF

If (Text8.Text = (.Fields(1).Value)) Then

Page 157: Kirtesh Khandelwal Visual Basics Project

Text7.Text = .Fields(0).Value

Text3.Text = .Fields(2).Value

Exit Do

End If

.MoveNext

Loop

End If

End With

End Sub

Regenerate_Bill:-

Page 158: Kirtesh Khandelwal Visual Basics Project

Registered Customer Bill (Paid By Pre-Generated Account):-

Page 159: Kirtesh Khandelwal Visual Basics Project

Un- Registered Customer Bill:-

Page 160: Kirtesh Khandelwal Visual Basics Project

Dim cname, phno, dob, bd, bn, bt, i

Private Sub Command1_Click()

Call connect

Generate_Bill.ListView1.ListItems.Clear

Label8.Caption = 0

Label9.Caption = 0

Label13.Caption = 0

Unload DataReport1

If (Text2.Text = "" Or Label20.Caption = "" Or Label11.Caption = "" Or

Label6.Caption = "" Or Label12.Caption = "") Then

Else

With pbill

c = .RecordCount

.MoveFirst

'MsgBox (i)

Page 161: Kirtesh Khandelwal Visual Basics Project

Do Until .EOF

If ((Text2.Text = .Fields(0).Value) And (phno <> .Fields(1).Value Or dob

<> .Fields(2).Value Or bn <> .Fields(3).Value Or bd <> .Fields(4).Value Or bt <>

.Fields(5).Value)) Then

Label20.Caption = .Fields(1).Value

Label1.Caption = .Fields(2).Value

Label6.Caption = .Fields(3).Value

Label12.Caption = .Fields(4).Value

Label16.Caption = .Fields(5).Value

cname = .Fields(0).Value

phno = .Fields(1).Value

dob = .Fields(2).Value

bn = .Fields(3).Value

bd = .Fields(4).Value

bt = .Fields(5).Value

Exit Do

End If

i = i + 1

.MoveNext

Loop

End With

End If

End Sub

Private Sub Command2_Click()

Call connect

Generate_Bill.ListView1.ListItems.Clear

Label8.Caption = 0

Label9.Caption = 0

Label13.Caption = 0

Page 162: Kirtesh Khandelwal Visual Basics Project

Unload DataReport1

If (Text2.Text = "" Or Label20.Caption = "" Or Label11.Caption = "" Or

Label6.Caption = "" Or Label12.Caption = "") Then

Else

With pbill

c = .RecordCount

.MoveLast

'MsgBox (i)

Do Until .BOF

If ((Text2.Text = .Fields(0).Value) And (phno <> .Fields(1).Value Or dob

<> .Fields(2).Value Or bn <> .Fields(3).Value Or bd <> .Fields(4).Value Or bt <>

.Fields(5).Value)) Then

Label20.Caption = .Fields(1).Value

Label1.Caption = .Fields(2).Value

Label6.Caption = .Fields(3).Value

Label12.Caption = .Fields(4).Value

Label16.Caption = .Fields(5).Value

cname = .Fields(0).Value

phno = .Fields(1).Value

dob = .Fields(2).Value

bn = .Fields(3).Value

bd = .Fields(4).Value

bt = .Fields(5).Value

Exit Do

End If

i = i - 1

.MovePrevious

Loop

Page 163: Kirtesh Khandelwal Visual Basics Project

End With

End If

End Sub

Private Sub Command20_Click()

With pbill

Generate_Bill.ListView1.ListItems.Clear

Label8.Caption = 0

Label9.Caption = 0

Label13.Caption = 0

.MoveFirst

Do Until .EOF

If (Text2.Text = .Fields(0).Value And Label20.Caption = .Fields(1).Value

And Label1.Caption = .Fields(2).Value And Label6.Caption = .Fields(3).Value

And Label12.Caption = .Fields(4).Value And Label16.Caption = .Fields(5).Value)

Then

Item = .Fields(6).Value

pri = .Fields(7).Value

quan = .Fields(8).Value

vat = .Fields(9).Value

amt = .Fields(10).Value

ser = .Fields(12).Value

total = .Fields(13).Value

Set l = Generate_Bill.ListView1.ListItems.Add(, , Item)

l.SubItems(1) = pri

l.SubItems(2) = quan

l.SubItems(3) = vat

l.SubItems(4) = amt

Page 164: Kirtesh Khandelwal Visual Basics Project

End If

.MoveNext

Loop

With tempbill

If (.RecordCount = 0) Then

Else

.MoveFirst

Do Until .EOF

.Delete

.MoveNext

Loop

End If

c = Val(Generate_Bill.ListView1.ListItems.Count)

i = 1

c = c + 1

Do Until i = c

.AddNew

.Fields(0).Value = (Generate_Bill.ListView1.ListItems.Item(i).Text)

.Fields(1).Value = Generate_Bill.ListView1.ListItems.Item(i).SubItems(1)

.Fields(2).Value = Generate_Bill.ListView1.ListItems.Item(i).SubItems(2)

.Fields(3).Value = Generate_Bill.ListView1.ListItems.Item(i).SubItems(3)

.Fields(4).Value = Generate_Bill.ListView1.ListItems.Item(i).SubItems(4)

i = i + 1

.Update

Loop

End With

cal = 0

Page 165: Kirtesh Khandelwal Visual Basics Project

For i = 1 To Generate_Bill.ListView1.ListItems.Count

cal = cal + Val(Generate_Bill.ListView1.ListItems.Item(i).SubItems(4))

Next

Generate_Bill.Label13.Caption = total

Label13.Caption = cal

Label8.Caption = ser

Label9.Caption = total

End With

End Sub

Private Sub Command24_Click()

Generate_Bill.ListView1.ListItems.Clear

Label8.Caption = 0

Label9.Caption = 0

Label13.Caption = 0

Unload DataReport1

If (Text2.Text = "" Or Label20.Caption = "" Or Label11.Caption = "" Or

Label6.Caption = "" Or Label12.Caption = "") Then

Else

With pbill

c = .RecordCount

.MoveLast

i = .RecordCount

Do Until .BOF

If (Text2.Text = .Fields(0).Value) Then

Label20.Caption = .Fields(1).Value

Label1.Caption = .Fields(2).Value

Page 166: Kirtesh Khandelwal Visual Basics Project

Label6.Caption = .Fields(3).Value

Label12.Caption = .Fields(4).Value

Label16.Caption = .Fields(5).Value

cname = .Fields(0).Value

phno = .Fields(1).Value

dob = .Fields(2).Value

bn = .Fields(3).Value

bd = .Fields(4).Value

bt = .Fields(5).Value

Exit Do

End If

i = i - 1

.MovePrevious

Loop

End With

End If

End Sub

Private Sub Command25_Click()

Generate_Bill.ListView1.ListItems.Clear

Label8.Caption = 0

Label9.Caption = 0

Label13.Caption = 0

Unload DataReport1

If (Text2.Text = "" Or Label20.Caption = "" Or Label11.Caption = "" Or

Label6.Caption = "" Or Label12.Caption = "") Then

Else

With pbill

Page 167: Kirtesh Khandelwal Visual Basics Project

c = .RecordCount

.MoveFirst

i = 0

Do Until .EOF

If (Text2.Text = .Fields(0).Value) Then

Label20.Caption = .Fields(1).Value

Label1.Caption = .Fields(2).Value

Label6.Caption = .Fields(3).Value

Label12.Caption = .Fields(4).Value

Label16.Caption = .Fields(5).Value

cname = .Fields(0).Value

phno = .Fields(1).Value

dob = .Fields(2).Value

bn = .Fields(3).Value

bd = .Fields(4).Value

bt = .Fields(5).Value

Exit Do

End If

i = i + 1

.MoveNext

Loop

End With

End If

End Sub

Private Sub Command3_Click()

If (Text2.Text = "" Or Label13.Caption = 0 Or Label8.Caption = 0 Or

Label9.Caption = 0) Then

MsgBox ("Enter the Information First")

Page 168: Kirtesh Khandelwal Visual Basics Project

Else

DataReport1.Left = 14000

DataReport1.Top = 2000

Blank.Top = 1500

Blank.Left = 13500

Blank.Width = 7000

Blank.Height = 10005

Blank.Show

Blank.Enabled = False

Set DataReport1.DataSource = tempbill

DataReport1.Sections(2).Controls("label6").Caption = Text2.Text

DataReport1.Sections(2).Controls("label7").Caption = Label20.Caption

DataReport1.Sections(5).Controls("Label12").Caption = 0

DataReport1.Sections(5).Controls("Label19").Caption = Round(Label8.Caption)

DataReport1.Sections(5).Controls("Label10").Caption = Round(Label9.Caption)

DataReport1.Sections("Section1").Controls("text1").DataField = "pname"

DataReport1.Sections("Section1").Controls("text2").DataField = "price"

DataReport1.Sections("Section1").Controls("text3").DataField = "quantity"

DataReport1.Sections("Section1").Controls("text4").DataField = "vat"

DataReport1.Sections("Section1").Controls("text5").DataField = "amt"

DataReport1.Sections(2).Controls("label15").Caption = Label6.Caption

DataReport1.Sections(2).Controls("label16").Caption = Label12.Caption

DataReport1.Sections(2).Controls("label17").Caption = Label16.Caption

DataReport1.Refresh

DataReport1.Show

End If

End Sub

Private Sub Command4_Click()

Page 169: Kirtesh Khandelwal Visual Basics Project

Main_Interface.Enabled = True

Unload Me

Unload DataReport1

Unload Blank

End Sub

Private Sub Form_Activate()

Main_Interface.Enabled = False

Label13.Caption = 0

Label8.Caption = 0

Label9.Caption = 0

End Sub

Private Sub Form_Load()

Generate_Bill.ListView1.ListItems.Clear

Label8.Caption = 0

Label9.Caption = 0

Label13.Caption = 0

End Sub

Private Sub Text2_LostFocus()

Call connect

Generate_Bill.ListView1.ListItems.Clear

Label8.Caption = 0

Label9.Caption = 0

Label13.Caption = 0

Unload DataReport1

If (Text2.Text = "") Then

Page 170: Kirtesh Khandelwal Visual Basics Project

Else

With pbill

c = .RecordCount

i = 0

.MoveFirst

Do Until .EOF

If (Text2.Text = .Fields(0).Value) Then

Label20.Caption = .Fields(1).Value

Label1.Caption = .Fields(2).Value

Label6.Caption = .Fields(3).Value

Label12.Caption = .Fields(4).Value

Label16.Caption = .Fields(5).Value

cname = .Fields(0).Value

phno = .Fields(1).Value

dob = .Fields(2).Value

bn = .Fields(3).Value

bd = .Fields(4).Value

bt = .Fields(5).Value

Exit Do

End If

i = i + 1

.MoveNext

Loop

End With

End If

End Sub

Page 171: Kirtesh Khandelwal Visual Basics Project

Salad:-

Private Sub Command1_Click()

Call Saladdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command1.Caption

End Sub

Private Sub Command2_Click()

Call Saladdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command2.Caption

End Sub

Private Sub Command3_Click()

Page 172: Kirtesh Khandelwal Visual Basics Project

Call Saladdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command3.Caption

End Sub

Private Sub Command4_Click()

Call Saladdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command4.Caption

End Sub

Private Sub Command5_Click()

If Label7.Caption = "" And Text1.Text = "" Then

MsgBox ("Select The Order"), vbCritical

ElseIf Label7.Caption = "" Then

MsgBox ("Select the Size"), vbCritical

ElseIf Text1.Text = "" Then

MsgBox ("Enter the Quantity"), vbCritical

Else

lab = Salad.Label1.Caption

pri = Val(Salad.Label7.Caption)

quan = Val(Salad.Text1.Text)

Set l = Order_Now.ListView1.ListItems.Add(, , lab)

l.SubItems(1) = pri

l.SubItems(2) = quan

Page 173: Kirtesh Khandelwal Visual Basics Project

vat = (pri * quan * 20) / 100

l.SubItems(3) = vat

cal = pri * quan + vat

l.SubItems(4) = cal

Call Saladdesc

total = 0

For i = 1 To Order_Now.ListView1.ListItems.Count

total = total + Val(Order_Now.ListView1.ListItems.Item(i).SubItems(4))

Next

Order_Now.Label4.Caption = total

End If

End Sub

Private Sub Command6_Click()

Call Saladdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command6.Caption

End Sub

Private Sub Command7_Click()

Call Saladdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command7.Caption

End Sub

Private Sub Command8_Click()

Page 174: Kirtesh Khandelwal Visual Basics Project

Call Saladdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command8.Caption

End Sub

Private Sub Command9_Click()

Call Saladdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command9.Caption

End Sub

Private Sub Form_Load()

Salad.BackColor = RGB(240, 6, 9)

Salad.Top = Salad.Height / 2.2 - Salad.Height / 3

Salad.Left = Salad.Width / 3 - Salad.Width / 3

End Sub

Private Sub Form_Activate()

Order_Now.Enabled = False

End Sub

Private Sub Form_Deactivate()

Order_Now.Enabled = True

End Sub

Private Sub Command10_Click()

Page 175: Kirtesh Khandelwal Visual Basics Project

Order_Now.Show: Order_Now.Enabled = True

End Sub

Private Sub Command11_Click()

Call check1

End Sub

Private Sub Label8_Click()

Order_Now.Show

Order_Now.Enabled = True

End Sub

Private Sub Option1_Click()

Call connect

With all

Do Until .EOF

If (Label1.Caption = .Fields(2).Value) Then

price = .Fields(3).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

End Sub

Private Sub Option2_Click()

Call connect

With all

Do Until .EOF

Page 176: Kirtesh Khandelwal Visual Basics Project

If (Label1.Caption = .Fields(2).Value) Then

price = .Fields(4).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

End Sub

Private Sub Option3_Click()

Call connect

With all

Do Until .EOF

If (Label1.Caption = .Fields(2).Value) Then

price = .Fields(5).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

End Sub

Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)

If (Text1.Text = "") Then

Else

If ((KeyCode >= 48 And KeyCode <= 57) Or (KeyCode >= 96 And KeyCode <=

105) Or KeyCode = 13 Or KeyCode = 35 Or _

KeyCode = 36 Or KeyCode = 32 Or KeyCode = 8 Or KeyCode = 16 Or KeyCode

= 37 Or KeyCode = 38 Or KeyCode = 39 Or KeyCode = 40) Then

Page 177: Kirtesh Khandelwal Visual Basics Project

Else

MsgBox ("Not Allowed")

Text1.Text = ""

End If

End If

End Sub

Sales:-

Private Sub Combo1_Click()

Sales.ListView1.ListItems.Clear

Label6.Caption = 0

Label9.Caption = ""

Label10.Caption = 0

Label12.Caption = 0

Page 178: Kirtesh Khandelwal Visual Basics Project

Call connect

Label2.Visible = False

DTPicker1.Visible = False

Label3.Visible = False

Combo2.Visible = False

Label4.Visible = False

Combo3.Visible = False

Label13.Visible = False

Combo4.Visible = False

If (Combo1.ListIndex = 0) Then

Label2.Top = 2400

Label2.Left = 1800

DTPicker1.Top = 2400

DTPicker1.Left = 5040

Label2.Visible = True

DTPicker1.Visible = True

Label8.Visible = True

Label9.Visible = True

Label11.Visible = True

Label12.Visible = True

ElseIf (Combo1.ListIndex = 1) Then

Label2.Visible = False

DTPicker1.Visible = False

Label3.Visible = False

Combo2.Visible = False

Label4.Visible = False

Combo3.Visible = False

Page 179: Kirtesh Khandelwal Visual Basics Project

Label13.Visible = False

Combo4.Visible = False

Label8.Visible = True

Label9.Visible = True

Label11.Visible = True

Label12.Visible = True

ElseIf (Combo1.ListIndex = 2) Then

Label3.Top = 2400

Label3.Left = 1800

Combo2.Top = 2400

Combo2.Left = 5040

Label3.Visible = True

Combo2.Visible = True

Label8.Visible = True

Label9.Visible = True

Label11.Visible = True

Label12.Visible = True

ElseIf (Combo1.ListIndex = 3) Then

Label4.Top = 2400

Label4.Left = 1800

Combo3.Top = 2400

Combo3.Left = 5040

Label4.Visible = True

Combo3.Visible = True

Label8.Visible = True

Label9.Visible = True

Page 180: Kirtesh Khandelwal Visual Basics Project

Label11.Visible = True

Label12.Visible = True

ElseIf (Combo1.ListIndex = 4) Then

Label13.Top = 2400

Label13.Left = 1800

Combo4.Top = 2400

Combo4.Left = 5040

Label13.Visible = True

Combo4.Visible = True

Label8.Visible = False

Label9.Visible = False

Label11.Visible = False

Label12.Visible = False

End If

End Sub

Private Sub Combo4_Click()

Sales.ListView1.ListItems.Clear

Label6.Caption = 0

Label9.Caption = ""

Label10.Caption = 0

Label12.Caption = 0

End Sub

Private Sub Command1_Click()

Sales.ListView1.ListItems.Clear

Label6.Caption = 0

Label9.Caption = ""

Page 181: Kirtesh Khandelwal Visual Basics Project

Label10.Caption = 0

Label12.Caption = 0

With pbill

If (Combo1.ListIndex = 0) Then

.MoveFirst

Do Until .EOF

If (DTPicker1.Value = .Fields(4).Value) Then

Set l = Sales.ListView1.ListItems.Add(, , .Fields(6).Value)

l.SubItems(1) = .Fields(7).Value

l.SubItems(2) = .Fields(8).Value

l.SubItems(3) = .Fields(4).Value

l.SubItems(4) = .Fields(5).Value

l.SubItems(5) = .Fields(10).Value

End If

.MoveNext

Loop

Label6.Caption = Sales.ListView1.ListItems.Count

With tbemp

.MoveFirst

Do Until .EOF

If (DTPicker1.Value = .Fields(0).Value) Then

Max = 0

For i = 1 To eidpass.RecordCount

If (Val((.Fields(i).Value)) > Max) Then

Max = .Fields(i).Value

c = i

End If

Page 182: Kirtesh Khandelwal Visual Basics Project

Next

Exit Do

End If

.MoveNext

Loop

End With

Label12.Caption = Max

With eidpass

.MoveFirst

Do Until .EOF

If (Max = .Fields(4).Value) Then

Label9.Caption = eidpass.Fields(1).Value

End If

.MoveNext

Loop

End With

total = 0

For i = 1 To Sales.ListView1.ListItems.Count

total = total + Val(Sales.ListView1.ListItems.Item(i).SubItems(5))

Next

Label10.Caption = total

total = 0

ElseIf (Combo1.ListIndex = 1) Then

.MoveFirst

Do Until .EOF

If (Date = .Fields(4).Value) Then

Set l = Sales.ListView1.ListItems.Add(, , .Fields(6).Value)

Page 183: Kirtesh Khandelwal Visual Basics Project

l.SubItems(1) = .Fields(7).Value

l.SubItems(2) = .Fields(8).Value

l.SubItems(3) = .Fields(4).Value

l.SubItems(4) = .Fields(5).Value

l.SubItems(5) = .Fields(10).Value

End If

.MoveNext

Loop

Label6.Caption = Sales.ListView1.ListItems.Count

With tbemp

.MoveFirst

Do Until .EOF

If (Date = .Fields(0).Value) Then

Max = 0

For i = 1 To eidpass.RecordCount

If (Val((.Fields(i).Value)) > Max) Then

Max = .Fields(i).Value

c = i

End If

Next

Exit Do

End If

.MoveNext

Loop

End With

Label12.Caption = Max

With eidpass

.MoveFirst

Page 184: Kirtesh Khandelwal Visual Basics Project

Do Until .EOF

If (Max = .Fields(4).Value) Then

Label9.Caption = eidpass.Fields(1).Value

End If

.MoveNext

Loop

End With

total = 0

For i = 1 To Sales.ListView1.ListItems.Count

total = total + Val(Sales.ListView1.ListItems.Item(i).SubItems(5))

Next

Label10.Caption = total

total = 0

ElseIf (Combo1.ListIndex = 2) Then

.MoveFirst

Do Until .EOF

If ((Combo2.ListIndex + 1) = Month(.Fields(4).Value)) Then

Set l = Sales.ListView1.ListItems.Add(, , .Fields(6).Value)

l.SubItems(1) = .Fields(7).Value

l.SubItems(2) = .Fields(8).Value

l.SubItems(3) = .Fields(4).Value

l.SubItems(4) = .Fields(5).Value

l.SubItems(5) = .Fields(10).Value

End If

.MoveNext

Loop

Label6.Caption = Sales.ListView1.ListItems.Count

Page 185: Kirtesh Khandelwal Visual Basics Project

With bmemp

m = 0

.MoveFirst

Do Until .EOF

If (.Fields(Combo2.ListIndex + 2).Value) > m Then

m = (.Fields(Combo2.ListIndex + 2).Value)

Label9.Caption = .Fields(1).Value

Label12.Caption = m

End If

.MoveNext

Loop

End With

total = 0

For i = 1 To Sales.ListView1.ListItems.Count

total = total + Val(Sales.ListView1.ListItems.Item(i).SubItems(5))

Next

Label10.Caption = total

total = 0

ElseIf (Combo1.ListIndex = 3) Then

.MoveFirst

Do Until .EOF

'MsgBox (Year(.Fields(3).Value))

If ((Combo3.Text) = Year(.Fields(4).Value)) Then

Set l = Sales.ListView1.ListItems.Add(, , .Fields(6).Value)

l.SubItems(1) = .Fields(7).Value

l.SubItems(2) = .Fields(8).Value

Page 186: Kirtesh Khandelwal Visual Basics Project

l.SubItems(3) = .Fields(4).Value

l.SubItems(4) = .Fields(5).Value

l.SubItems(5) = .Fields(10).Value

End If

.MoveNext

Loop

Label6.Caption = Sales.ListView1.ListItems.Count

With eidpass

m = 0

.MoveFirst

Do Until .EOF

If (.Fields(4).Value) > m Then

m = (.Fields(4).Value)

Label9.Caption = .Fields(1).Value

Label12.Caption = m

End If

.MoveNext

Loop

End With

total = 0

For i = 1 To Sales.ListView1.ListItems.Count

total = total + Val(Sales.ListView1.ListItems.Item(i).SubItems(5))

Next

Label10.Caption = total

total = 0

ElseIf (Combo1.ListIndex = 4) Then

.MoveFirst

Do Until .EOF

Page 187: Kirtesh Khandelwal Visual Basics Project

If ((Combo4.Text) = (.Fields(14).Value)) Then

Set l = Sales.ListView1.ListItems.Add(, , .Fields(6).Value)

l.SubItems(1) = .Fields(7).Value

l.SubItems(2) = .Fields(8).Value

l.SubItems(3) = .Fields(4).Value

l.SubItems(4) = .Fields(5).Value

l.SubItems(5) = .Fields(10).Value

End If

.MoveNext

Loop

Label6.Caption = Sales.ListView1.ListItems.Count

total = 0

For i = 1 To Sales.ListView1.ListItems.Count

total = total + Val(Sales.ListView1.ListItems.Item(i).SubItems(5))

Next

Label10.Caption = total

total = 0

End If

End With

End Sub

Private Sub Command4_Click()

Main_Interface.Enabled = True

Unload Me

End Sub

Private Sub DTPicker1_Change()

If (DTPicker1.Value > Date) Then

MsgBox ("Not valid date")

Page 188: Kirtesh Khandelwal Visual Basics Project

DTPicker1.Value = Date

Else

End If

End Sub

Private Sub Form_Activate()

Main_Interface.Enabled = False

Sales.ListView1.ListItems.Clear

Label6.Caption = 0

Label9.Caption = ""

Label10.Caption = 0

Label12.Caption = 0

Call connect

For i = 0 To 27

Y = 1990

Y = Y + i

Combo3.AddItem (Y)

Next

If (eidpass.RecordCount = 0) Then

Else

eidpass.MoveFirst

For i = 1 To eidpass.RecordCount

Combo4.AddItem (eidpass.Fields(1).Value)

eidpass.MoveNext

Next

End If

End Sub

Page 189: Kirtesh Khandelwal Visual Basics Project

Shakes:-

Private Sub Command1_Click()

Call Shakesdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command1.Caption

End Sub

Private Sub Command2_Click()

Call Shakesdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command2.Caption

End Sub

Page 190: Kirtesh Khandelwal Visual Basics Project

Private Sub Command3_Click()

Call Shakesdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command3.Caption

End Sub

Private Sub Command4_Click()

Call Shakesdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command4.Caption

End Sub

Private Sub Command5_Click()

If Label7.Caption = "" And Text1.Text = "" Then

MsgBox ("Select The Order"), vbCritical

ElseIf Label7.Caption = "" Then

MsgBox ("Select the Size"), vbCritical

ElseIf Text1.Text = "" Then

MsgBox ("Enter the Quantity"), vbCritical

Else

lab = Shakes.Label1.Caption

pri = Val(Shakes.Label7.Caption)

quan = Val(Shakes.Text1.Text)

Set l = Order_Now.ListView1.ListItems.Add(, , lab)

l.SubItems(1) = pri

Page 191: Kirtesh Khandelwal Visual Basics Project

l.SubItems(2) = quan

vat = (pri * quan * 20) / 100

l.SubItems(3) = vat

cal = pri * quan + vat

l.SubItems(4) = cal

Call Shakesdesc

total = 0

For i = 1 To Order_Now.ListView1.ListItems.Count

total = total + Val(Order_Now.ListView1.ListItems.Item(i).SubItems(4))

Next

Order_Now.Label4.Caption = total

End If

End Sub

Private Sub Command6_Click()

Call Shakesdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command6.Caption

End Sub

Private Sub Command7_Click()

Call Shakesdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command7.Caption

End Sub

Page 192: Kirtesh Khandelwal Visual Basics Project

Private Sub Command8_Click()

Call Shakesdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command8.Caption

End Sub

Private Sub Command9_Click()

Call Shakesdesc

Image5.Visible = False

Frame1.Visible = True

Text1.SetFocus

Label1.Caption = Command9.Caption

End Sub

Private Sub Form_Load()

Shakes.BackColor = RGB(240, 6, 9)

Shakes.Top = Shakes.Height / 2.2 - Shakes.Height / 3

Shakes.Left = Shakes.Width / 3 - Shakes.Width / 3

End Sub

Private Sub Form_Activate()

Order_Now.Enabled = False

End Sub

Private Sub Form_Deactivate()

Order_Now.Enabled = True

End Sub

Page 193: Kirtesh Khandelwal Visual Basics Project

Private Sub Command10_Click()

Order_Now.Show

Order_Now.Enabled = True

End Sub

Private Sub Command11_Click()

Call check1

End Sub

Private Sub Label8_Click()

Order_Now.Show

Order_Now.Enabled = True

End Sub

Private Sub Option1_Click()

Call connect

With all

Do Until .EOF

If (Label1.Caption = .Fields(2).Value) Then

price = .Fields(3).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

End Sub

Private Sub Option2_Click()

Page 194: Kirtesh Khandelwal Visual Basics Project

Call connect

With all

Do Until .EOF

If (Label1.Caption = .Fields(2).Value) Then

price = .Fields(4).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

End Sub

Private Sub Option3_Click()

Call connect

With all

Do Until .EOF

If (Label1.Caption = .Fields(2).Value) Then

price = .Fields(5).Value

Label7.Caption = price

End If

.MoveNext

Loop

End With

End Sub

Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)

If (Text1.Text = "") Then

Else

Page 195: Kirtesh Khandelwal Visual Basics Project

If ((KeyCode >= 48 And KeyCode <= 57) Or (KeyCode >= 96 And KeyCode <=

105) Or KeyCode = 13 Or KeyCode = 35 Or _

KeyCode = 36 Or KeyCode = 32 Or KeyCode = 8 Or KeyCode = 16 Or KeyCode

= 37 Or KeyCode = 38 Or KeyCode = 39 Or KeyCode = 40) Then

Else

MsgBox ("Not Allowed")

Text1.Text = ""

End If

End If

End Sub

Module:-

Public adname, empname

Public cal, pri, quan, vat, total, ser, find, dis, netamt, i, j, cname, phone, gbill, mid

Public l As ListItem

Public lab As String

Public con As ADODB.Connection

Public ju As ADODB.Recordset

Public all As ADODB.Recordset

Public tempbill As ADODB.Recordset

Public pbill As ADODB.Recordset

Public tmidpass As ADODB.Recordset

Public eidpass As ADODB.Recordset

Public bmemp As ADODB.Recordset

Public tbemp As ADODB.Recordset

Page 196: Kirtesh Khandelwal Visual Basics Project

Sub connect()

Set ju = New ADODB.Recordset

Set all = New ADODB.Recordset

Set tmidpass = New ADODB.Recordset

Set eidpass = New ADODB.Recordset

Set tempbill = New ADODB.Recordset

Set bmemp = New ADODB.Recordset

Set pbill = New ADODB.Recordset

Set tbemp = New ADODB.Recordset

Set con = New ADODB.Connection

con.CursorLocation = adUseClient

con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=..\project(kirtesh

chandni)30\menu.mdb;Persist Security Info=False"

ju.Open "Select * from Customer", con, adOpenKeyset, adLockOptimistic

all.Open "Select * from Menu", con, adOpenKeyset, adLockOptimistic

tmidpass.Open "Select * from Admin", con, adOpenKeyset, adLockOptimistic

eidpass.Open "Select * from Employee", con, adOpenKeyset, adLockOptimistic

tempbill.Open "Select * from temp", con, adOpenKeyset, adLockOptimistic

pbill.Open "Select * from permanent", con, adOpenKeyset, adLockOptimistic

bmemp.Open "Select * from Best_Employee", con, adOpenKeyset,

adLockOptimistic

tbemp.Open "Select * from Today_Best", con, adOpenKeyset, adLockOptimistic

End Sub

Public Sub Combodesc()

Combo.Option1.Value = False

Combo.Option2.Value = False

Combo.Option3.Value = False

Combo.Label7.Caption = ""

Combo.Text1.Text = ""

End Sub

Page 197: Kirtesh Khandelwal Visual Basics Project

Public Sub Shakesdesc()

Shakes.Option1.Value = False

Shakes.Option2.Value = False

Shakes.Option3.Value = False

Shakes.Label7.Caption = ""

Shakes.Text1.Text = ""

End Sub

Public Sub Saladdesc()

Salad.Option1.Value = False

Salad.Option2.Value = False

Salad.Option3.Value = False

Salad.Label7.Caption = ""

Salad.Text1.Text = ""

End Sub

Public Sub Icecreamdesc()

Icecream.Option1.Value = False

Icecream.Option2.Value = False

Icecream.Option3.Value = False

Icecream.Label7.Caption = ""

Icecream.Text1.Text = ""

End Sub

Public Sub Chocolatedesc()

Chocolate.Option1.Value = False

Chocolate.Option2.Value = False

Chocolate.Option3.Value = False

Chocolate.Label7.Caption = ""

Chocolate.Text1.Text = ""

End Sub

Public Sub Friesdesc()

Page 198: Kirtesh Khandelwal Visual Basics Project

Fries.Option1.Value = False

Fries.Option2.Value = False

Fries.Option3.Value = False

Fries.Text1.Text = ""

Fries.Label7.Caption = ""

End Sub

Public Sub Chickendesc()

Chicken.Option1.Value = False

Chicken.Option2.Value = False

Chicken.Option3.Value = False

Chicken.Label7.Caption = ""

Chicken.Text1.Text = ""

End Sub

Public Sub Coffeedesc()

Coffee.Option1.Value = False

Coffee.Option2.Value = False

Coffee.Option3.Value = False

Coffee.Label7.Caption = ""

Coffee.Text1.Text = ""

End Sub

Public Sub Burgerdesc()

Burger.Option1.Value = False

Burger.Option2.Value = False

Burger.Option3.Value = False

Burger.Label7.Caption = ""

Burger.Text1.Text = ""

End Sub

Public Sub check1()

Page 199: Kirtesh Khandelwal Visual Basics Project

check = MsgBox("All data wil be lost,Are you sure you wanna quit? ",

vbYesNoCancel)

If check = 6 Then

'Order_Now.Enabled = True

Order_Now.ListView1.ListItems.Clear

Order_Now.Label4.Caption = ""

Main_Interface.Show

Main_Interface.Enabled = True

ElseIf check = 7 Then

Else

End If

End Sub

Public Sub terminate()

Unload Main_Interface

Unload Burger

Unload Add_Admin

Unload Add_Emp

Unload Chicken

Unload Coffee

Unload Combo

Unload Chocolate

Unload Delete_Admin

Unload Delete_Employee

Unload Fries

Unload Icecream

Unload Join_us

Unload Login_Form

Page 200: Kirtesh Khandelwal Visual Basics Project

Unload Order_Now

Unload Salad

Unload Shakes

Unload Customer_info

Unload Modify

Unload DataReport1

Unload Blank

Unload Generate_Bill

Unload Sales

End Sub

CONCLUSION

After we have completed the project we are sure the problems in the existing system

would overcome. The “RESTAURANT BILLING SYSTEM” process made

computerized to reduce human errors and to increase the efficiency. The main focus

of this project is to lessen 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 then user

has to just type in the search string and user gets the results immediately. The editing

is also made simpler. The user has to just type in the required field and press the

update button to update the desired field.

BIBLIOGRAPHY

.Mastering Visual Basic 6.0

.MSDN Help

www.google.com

Page 201: Kirtesh Khandelwal Visual Basics Project

Thank You

Kirtesh Khandelwal

BCA – 3rd

Year

Dezyne E’ Cole College

106/10, Civil Lines,

Ajmer

Tel: 0145-2624679

www.dezyneecole.com

2015-2016