• No results found

Computer -Shop Management System

N/A
N/A
Protected

Academic year: 2021

Share "Computer -Shop Management System"

Copied!
136
0
0

Loading.... (view fulltext now)

Full text

(1)

A PROJECT REPORT

ON

COMPUTER –SHOP MANAGEMENT

SYSTEM

Master of Computer Application

Prepared

AMIT KUMAR YADAV

MCA 4

th

Sem.

Roll no. 0715514006

Ewing Christian Institute of Management and

Technology Allahabad

Under the guidance

Mr. Prabhat Kardam

(Lecturer)

(2)

PREFACE

The computer-shops are increasing day by day.There is lot of work as to sell computer system/part, to store new computer system/part, to maintain customer

balance and his information, to mantain user account, to maintain and manage shop’s information and to maintain report of sold computer system/part. But if these works is done manually, takes to much time and hard work. So there is need of a computer-software that provide good interface to done these work very efficiently. So I decide to develop software in visual-basic 6.0 for computer-shop. I give the name to my software “COMPUTER-SHOP MANAGEMENT SYSTEM”.This is self contained software.

This project report provide all the detail view of the software “Computer-shop management system”.From my point of view, there is no further system or subsystem explained elsewhere.This project report containts the introduction, objective, purpose, project scope, product perspective, product features, h/w and s/w reqirements, frontend and backend tool, product feature, process logic, logic diagram, data flow diagram, ER diagram, database detail and data structure, and bibliography.

I have exerted a conscious effort to make software oriented and user-friendly.I hope the users would find the software not only interested but also useful.

2

AMIT KUMAR YADAV

MCA 4th Sem. Roll no:-0715514006

(3)

ACKNOWLEDGEMENTS

First of all I would like to thank almighty God who gave me the inspiration to take up this task.

I would like to thank Mr. Prabhat kardam (Lecturer) Ewing Christian institute of management and technology, Allahabad, for his able guidance and all the pains he took for the completion of my project.

Special thanks to Mr. Sharad Emmanual, Lab Administrator of ECIMT, who helped us at every step in the project.

I would also like to thanks Mr.Anurag sewak (Head of department, MCA, ECIMT, Allahabad), who gave precious suggestions at every step in the project.

I would also like to thank Dr. M. Massey, Director, Dr. L.C.T. Esubius, Deputy Director and Dr. (Mrs.) Kusumlata Pandey, Academic Advisor of MCA (Master of Computer Application).

I would also like to thank Mr.Anshul Cutting (Asst. System Administrator) & Mr. Jayant Sheth, Librarian of my college without whose cooperation, this project could not have been a success.

I express my gratefulness and appreciation to all my academic colleagues who gave me valuable suggestions during the development of this software.

3

AMIT KUMAR YADAV

MCA 4th Sem. Roll no:-0715514006

(4)

Certificate

This is to certify that Mr. AMIT KUMAR YADAV (Roll No. - 0715514006) s/o SHRI SUKHARAJ YADAV is MCA 4 t h semester student

of Ewing Christian Institute of Management & Technology, Allahabad. He is enrolled in three year Master of computer application.

He has satisfactorily completed the project entitled

“COMPUTER-SHOP MANAGEMENT SYSTEM” in VISUAL BASIC 6.0 for the partial fulfillment of 4t h semester.

This application package is the original one and is never submitted elsewhere for the same purpose.

I wish him all success in future.

4

Ewing Christian institute of management & technology

Turner Building, 711- mutthigang, Allahabad-211003, U.P.

Mr. Prabhat kardam

(Lecturer)

Ewing Christian Institute of management & technology

Allahabad Date:

(5)

Table of Contents

Table of Contents……….4 Introduction………5 Objective………...……….6 Operating environment………6 1) Harware requirement…………..………6 2) Sowtware requirement………6

 Front end tool………6

 Back end tool……….………5

 Platform used………5 Purpose ……….………5 Project Scope …………...………5 Product Perspective………5 Product Features ……….………5 Process logic...2 Logic diagram……….………..7

Data flow diagram………….………8

ER diagram…...………..………11

Data structure………..12

Sreenshots ……….. 3

1) Login form……….3

(6)

2) Main form….……….4

3) Sell computer part form……….5

4)make quotation form….……….3

5) Update customer balance……….4

6) Sell computer system form………..……….5

7) Change password……….……….5

8) Create user account….……….3

9) Add company form……….4

10) Add new product form ……….5

11) Add computer system………. 12) Update shop information form….……….……….3

Test-case……….4 Coding ……….5 Future Scope……… Bibliography ……… 6

(7)

Introduction

Computer-shop management System is a project which assist in keeping the Record of what ever the sales from shop (whole seller), also it keep track of remaining balance which due after selling the product. Through this project we maintain the warranty given on particular products along with complete information related to that product.

Computer-shop management System is software for store billing management. Sell hardware systems components and accessories (keep track of sold configurations, create system configuration, sell accessories and computer components, supplying company’s administration, and many more...). Computer-shop management System is a windows based billing software designed for uses in computer stores.

Objective

The objective of my project to provides management facility to computer-shop. We have given many facilities for users in this project.

1) Welcome screen (Formsplash) 2) Login screen

3) Main form

4) Sell Computer System form 5) Sell Computer Parts form 6) Update customer Balance form 7) Product Price Report form 8) Change password form 9) Make quotation form 10) Add computer part form 11) Add computer system form 12) Create user account form 13) Update shop information form 14) Report of sold computer part 15) Report of sold computer system

(8)

Operating Environment

1) Hardware Requirement 1) 20 GB HDD Free Space 2) 128 MB RAM 3) P IV or above Processor 4) Monitor 5) Keyboard: Standard 6) Mouse: Optional 2) Software Requirement 1) MS-office-2003 2) MS Visual Basic6.0

 Front End Tool:

MS Visual Basic6.0

 Back End Tool:

MS Access

PLATFORM USED

: Windows XP, Windows 2000.

Purpose

It is the project about Computer-shop management System. It automates the Systems records, their Selling and Maintenance, Balance evaluation, due to calculation other functions. In other words you can say it a complete computer-shop management System.

In this project we can easily maintain systems sales details. It gives

information’s of Annual Transaction of products, its services, daily sales, daily Receipt & Balance. We can see the Systems details before selling the particular items & view for our requirement-satisfying item detail.

Project Scope

The scope of project ‘Computer-shop management system’ is to Develop Visual Basic based software to support for daily sale, receipt & Balance of products and maintain the all information of System related items.

This software will be very useful for the Big Computer Shop as well as the customer. It will perform as the required task of Automation of product by itself in a systematic way.

(9)

It will also save lots of time, as system will perform all tasks in quick time profiting customer and shop owner as well, so it will prove very economical in every respect.

Product Perspective

The Computer-shop Management System is the new, self-contained product. The Computer-shop management system is using vb6.0 platform. All components follow Model-View-Controller pattern. The user can retrieve information of their shop progress. All pages of the system are following a consistent theme and clear structure. The occurrence of errors should be minimized through the use of checkboxes and scroll down in order to reduce the amount of text input from user. Error message should be located beside the error input which clearly highlight and tell user how to solve it. If system error, it should provide the contact methods. The page should display the project process in different color to clearly reflect the various states. Each level of user will have its own interface and privilege to mange and modify the project information. User interface elements are easy to understand. Part of user interface is well-organized on screen and the parts are concatenated right. When users look at the interface, they understand which pane is used for which purpose. Each task of an interface is specified clearly and users use them correctly. For example, when users press to any button on interface, they can know which operations are done by pressing this button.

The user interface is easy to learn. When users use the user interface, they can know which element is used to which operations. The interface actions and elements is consistent. When users press any button, required actions is done by the system.

The screen layout and color of the user interface is appealing. When users look at the screen, it will have a nice vision. Colors will be selected clearly, thus eyes of users won’t be tired.To inhance the graphical user interface I use xp button, lv button

and vk frame.

Since the application must run on the PC, all the hardware shall require to connect the PC will be hardware interface for the system.The main interface would be the monitor, Keyboard and mouse.

Product Features

• NETWORK SUPPORT. You can use more than one computer to work with Computer-shop Maintenance System.

• Support for VAT tax system. Also you can

(10)

• make system configuration

• Create System configuration and use it later for selling purposes! • Quickly create database backup!

• Enter and print (optionally) component serial numbers when you selling systems! • Customize bills that you print!

• Create estimates and latter convert it into bills!

• Reports to make comparisons between months (total sum, or sum by employees)! • User can see profit of a sold computer system during bill creating!

• Manufacturers administration. • Print bills with currency sign.

• See number of available components (for selected component in group) when you selling system configuration!

• Different kind of reports. • Keep track of you suppliers!

• Check out earnings and get information about charged items!

• Each sold system is registered in database with date of sale and notification if customer has paid!

• Computer- shop management software provides full billing and income control and Supports different password protected employee accounts!

• Server database is protected from unauthorized modifications! • Process payments quickly and efficiently!

• Unique design with very functional user interface!

• Improve your store business with various reports and statistics! And many more...

Process Logic

1. Login Form

In this form, existing user/administrator enters the user-name and password and access the main form. If user forgets his password then he can click on button forget password and then entering his e-mail id can get user name and password. This form contains user name and password as sub module.

2. Main Form

If administrator accesses this form using authentic login-name and password then the administrator has administrative power as add the product, create user account, add new branded computer system, add company, change the shop record . Administrator have full power But user have some restricted power only which is provided by administrator.

In this main form user can sell computer part/assemble computer system/branded computer system, update customer record, change the password, make quotation. Using this form the user/administrator can see the report of sold computer part, branded computer system in any time duration. In this form, there is option to exit & log-off

3. Sell Computer System Module There are two sub modules:

(11)

1) Sell branded computer system

2) Sell assembled computer system/computer part

In sell branded computer system module, user/administrator can sell available branded computer system. In this form, the user/administrator enters the customer name, address & phone number and chooses any branded computer system to sell. This form also so the all information of chosen branded computer system as category, model number, monitor type, hard-disk range, ram, processor, price etc. After selling, the user/administrator can print and save the receipt.

In sell assembled computer system/computer part module, user/administrator can sell available computer part and assembled computer system. In this form, the user/administrator enters the customer name, address & phone number and chooses all computer part to sell according to request of customer. The user/administrator can chose any product, its type, range, its serial number using combo-box. After choosing the serial number of product the price of the product and total price (including vat, tax) automatically generate. After selling, the user/administrator can print and save the receipt. The invoice number and customer number automatically generate by this software when this form is loaded.

4. Update Customer Balance Module

In this module, there is information related to balance of customer, customer name and address. In future if any customer paid the balance amount then it can be update.

5. Make Quotation Module

In this module, the user/administrator makes quotation according to request of the customer. This quotation provide information about the price, range, type & company name of all product to customer before purchasing the computer parts/assembled computer system. This quotation also provides total price (including vat) assembled computer system.

6. Change Password Module

In this module, the user/administrator can change his/her password by entering login-name and old password and new password. So this provide security from unauthorized access.

7. Create user account Module

In this module, the administrator can create new user by providing him login-name and password. In this module, the administrator can update user information as name, address and phone number of exiting user. He can delete exiting user account. The administrator can see the entire exiting user. The administrator can also give administrator power to any user. In this module, there is information related to the entire user working in the computer-shop as name, address, e-mail id, phone number etc. Here admin can take information related to user.

8. Add Product Module

(12)

In this module, the administrator can add new product by entering its name, company name, range, type, serial number, and its price. Here administrator can also see the available product and its information. And the administrator can also delete any product.

9. Add computer system Module

In this module, the administrator can add new branded computer system by entering its category, model number, company name, ram capacity and its speed, monitor type, Hard-disk capacity and its interface, processor clock speed and its L2cach, motherboard company-name and its chipset, its selling and buying price and other description. Here administrator can also see the available computer system and its information. And the administrator can also delete any computer system.

10. Add company Module

In this module, the administrator can add any company information whose product are available at the computer shop. This module contains the name of company, contact person, address, phone number, website, and fax number.

11. Change Shop information Module

In this module, the administrator save/update the information related to his computer-shop as name of computer-shop, address, phone-number, and registration number.

12. Product Price Report:

This report shows the price of all available products and its detail as item-name, company-item-name, type, range, and serial-number.

13.

Sold computer part Report:

This report show the sold computer part in any time duration. The administrator/user can see the detail of sold computer part in specified time duration. This report show the name of customer, item-name, company-name, type, range, serial-number, and price of sold product.

14. Sold computer system Report:

This report shows the sold computer system in any time duration. The administrator/user can see the detail of sold computer system in specified time duration. This report shows the name of customer, category, company-name, model-number, ram capacity and its speed, monitor type, Hard-disk capacity and its interface, processor clock speed and its L2cach, motherboard company-name and its chipset, its price and other description.

(13)

LOGICAL DIAGRAM

LOGIN FORM Sell computer system Administrator Make quotation Assemble computer/Computer part Change password REPORT Branded computer system Add Computer part Update customer Balance Add computer system Add company Create user account Sold computer system report Price Report MAIN FORM Sold Computer part report Change password Add company Change shop information 13

START

(14)

Data Flow Diagram:

Zero Level DFD:

Req.

Resp.

First Level DFD:

Sold computer part History

sold computer system history

I sold computer system detail

Login Issue detail

Login Detail Rep. Detail

Search criteria

Update History

Search detail 14

Customer

Computer-shop

management

System

Customer

Sold compute r part

Item

Update Login Report User/admin Customer Add compute r part Search Add compute r system Sold Compute r system

(15)

Customer detail Customer

Computer part Record

Second Level DFD:

1. Sell computer part/system

Computer part/system Record

Issue detail

Customer

Customer detail Comp.part/system detail

Verify sold detail Sell computer part/system

Sold History 15 Computer part/system User Customer Compter Part Detail

Computer Part Detail Compter

(16)

2.Update customer balance:

Sold computer part/system History Issue detail

Balance detail

Verify balance detail

Balance Record of customer

3. Search The Item:

Sold History

Sold detail

Balance History

Search Detail

Balance Detail

Customer Detail 16

Update

Balance

User

Search

User

(17)

Customer & Item Info.

Customer Record

Item Detail

Computer part/system Record

ER Diagram:

-

17

Customer

user_addres s user_ph.n o. user_name Login-name&pas sword Item_pric e Item_nam e Brand_name Item_type Warranty.per d Serial.No.

BALANCE Balance Date C_name

Computer system_detail system_name Brand_name configuratio n Warranty_period serial_no. Warranty_period Item_pric e

(18)

n

DATA STRUCTURE

1.

Balance Table

Key Column Name Data Type Width

Primary key InvoiceNo. Alphanumeric 5

Customername Alphanumeric 25

Customer address Alphanumeric 6

Customer phone no. Numeric 6

Paidamount Numeric 8

Totalamount Numeric

Date Date

2. Computer part Detail

Column Name Data Type Width

Itemname Alphanumeric 15 Brandname Alphanumeric 25 Sell computer system/pa rt 18

User Computer part_DETAIL Invoiceno . Tot.amount Paid_amoun t Paid Amou nt

Customer

c_name

c_address

c_Balance c_ph.no. Invoice no.

(19)

Type Alphanumeric 5

Price Numeric 6

Primary key Serialno. Alphanumeric 5

warranty Numeric 1

3. Customer

key Column Name Data Type Width Customer_name Alphanumeric 25 Customer_Address Alphanumeric 30 Primary key Customer_Phone.no. Numeric 10 Customer_Balance Numeric 8

4. Computer system detail 

key Column Name Data Type Width Systemname Alphanumeric 15

Brandname Alphanumeric 25

Categary Alphanumeric 5

Price Numeric 6

Primary key Model no. Alphanumeric 5

warranty Numeric 1

Ram Alphanumeric 8

Mother-board Alphanumeric 10

Monitor Alphanumeric 10

Processor Alphanumeric 10

Other description Alphanumeric 45

5.Troubleshoot

key Column Name Data Type Width

Primary key Invoice no Alphanumeric 5

Customer_name Alphanumeric 25 Customer_Address Alphanumeric 30 Customer_phoneno. Numeric 10 Problem Alphanumeric 25 Service_date Date 8 Charge Numeric 10 19

(20)

6.Employee Table

Key Column Name Data Type Width

Primary key Employee-id Alphanumeric 12

Employee_name Alphanumeric 15

Employee_address Alphanumeric 45

Employee_phoneno Numeric 10

Email_id Alphanumeric 20

7.Warranty

Key Column Name Data Type Width

Invoice_no. Alphanumeric 8

Primary key Serial_no. Alphanumeric 20

Bill_no. Alphanumeric 10 New_Serial no Alphanumeric 15 Problem Alphanumeric 25 Service_date Date 8 Delivery_date Date 8

SCREENSHOTS

Loginform

20

(21)

Main form

Sold computer Parts

(22)

Make quotation

Update customer balance

22

(23)

Change password form

Create user account

(24)

Add company Form

Add New Product form

24

(25)

Add computer system form

Update shop-information form

(26)
(27)

Test case

If connection of database is not closed at unload of this form then this error occurred.so needs to close connection of database as

Private Sub Form_Unload(Cancel As Integer) con.Close

End Sub

In database setsold table has p2 field, this field have to allow zero lenth.

(28)

I the database there is field name “login name’ have no value so this error occurred. So insert login name and password.

This error occure when in database the data type is not matching. So need to give correct data type.

(29)

There is not any item in the database in the requested field. So need to insert a item or generate a message.

The insert into command have syntax error. So need to write correct syntax.

(30)

When execute the insert into statement, there is any extra parameter.

In database customeaddressfield not found because I have write wrong table name.

(31)

Conection to database should be open when we execute any database statment.

I dcrease the size of all text field and labels to correct this error

(32)
(33)
(34)
(35)
(36)
(37)
(38)

(39)

(40)

Login form

Private Sub Form_Load()

Call connectdatabase rs.ActiveConnection = con

rs.CursorLocation = adUseClient rs.CursorType = adOpenDynamic rs.Source = "select *from usertable" rs.Open

Frame1.Left = -8000 End Sub

Private Sub lvButtons_H1_Click()

a = MsgBox("Do you really want to quit?", vbYesNo, "Endnow") If a = 6 Then

End End If End Sub

Private Sub lvButtons_H2_Click()

If Text1.Text = "" And Text2.Text = "" Then

MsgBox "Please enter the Login name & password!" Exit Sub

End If

If Text2.Text = "" And Text1.Text <> "" Then MsgBox "Enter Your Password"

Text2.SetFocus Exit Sub

End If

If Text2.Text <> "" And Text1.Text = "" Then MsgBox "Enter Your Username"

Exit Sub End If rs.MoveFirst

For i = 1 To rs.RecordCount

If rs.Fields(2) = Text1.Text And rs.Fields(3) = Text2.Text Then If rs.Fields(6) = ("admin") Then

mainfrm.Show Unload Me con.Close Exit Sub End If

If rs.Fields(6) = ("employee") Then mainfrm.Show

mainfrm.admin.Visible = False

(41)

Unload Me con.Close Exit Sub End If End If rs.MoveNext Next i

If rs.EOF = True Then

MsgBox "Invalid login name & password!" Text2.Text = ""

Text2.SetFocus End If

End Sub

Private Sub Text1_Change() Text1.BackColor = &HC0FFC0 End Sub

Private Sub Text1_Click()

Text1.BackColor = &H80000009 Text2.BackColor = &HC0FFC0 End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then

Text2.SetFocus End If

End Sub

Private Sub Text2_Change() Text2.BackColor = &HC0FFC0 End Sub

Private Sub Text2_Click()

Text2.BackColor = &H80000009 Text1.BackColor = &HC0FFC0 End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then

Call lvButtons_H2_Click End If

End Sub

Private Sub Timer2_Timer() Frame1.Left = Frame1.Left + 200 If Frame1.Left = 3000 Then Timer2.Enabled = False

(42)

End If End Sub

Main form

Private Sub about_Click() aboutfrm.Show

End Sub

Private Sub asssembled_Click() sellcomputer.Show

End Sub

Private Sub bronded_Click() Sellbrondedcom.Show End Sub

Private Sub brondedreport_Click() reportcomputersys.Show

End Sub

Private Sub company_Click() addcompany.Show

End Sub

Private Sub component_Click() DataReport1.Show

End Sub

Private Sub computersystem_Click() addcomputersystem.Show

End Sub

Private Sub customer_Click() customeraccount.Show End Sub

Private Sub emloyee_Click() user.Show

End Sub

Private Sub Exit_Click()

b = MsgBox("Do you really want to quit?", vbYesNo, "Conformation") If b = 6 Then

End Else

(43)

End If End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single)

Frame1.BackColor = &H404040 End Sub

Private Sub group_Click() End Sub

Private Sub logo_Click() shop.Show

End Sub

Private Sub logoff_Click() loginform.Show

Unload Me End Sub

Private Sub part_Click() sellcomputerpart.Show End Sub

Private Sub monthly_Click() End Sub

Private Sub pass_Click() changepasswd.Show End Sub

Private Sub payment_Click() End Sub

Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single)

Frame1.BackColor = &H40& End Sub

Private Sub product_Click() addproduct.Show

End Sub

(44)

Private Sub quatation_Click() quotation.Show

End Sub

Private Sub soldcom_Click() reportpart.Show

End Sub

Private Sub Timer1_Timer()

ibldate.Caption = Format(Date, "dd-mmm-yyyy") iblday.Caption = Format(Date, "dddd")

ibltime.Caption = Time End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button) Select Case Button.Index

Case 1: Case 2: asssembled_Click Case 3: bronded_Click Case 4: logoff_Click Case 5: Exit_Click End Select End Sub

Sell computer part

Dim price As Double Dim temp As String Dim bool As Boolean Dim p1, p2 As Double Dim w1, w2 As Integer Private Sub Clearall_Click() End Sub

Private Sub Combo19_Click() Combo27.Clear

temp = "RAM"

If rs3.State = adStateOpen Then rs3.Close

(45)

rs3.Open "select Range from itemdetail where Itemname='" & temp & "' and Company='" & Comboram.Text & "' and Type='" & Combo19.Text & "'" While rs3.EOF = False

Combo27.AddItem rs3(0) rs3.MoveNext

Wend End Sub

Private Sub Combo20_Click() Combo28.Clear

temp = "Processor"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Range from itemdetail where Itemname='" & temp & "' and Company='" & ComboProcessor.Text & "' and Type='" & Combo20.Text & "'" While rs3.EOF = False

Combo28.AddItem rs3(0) rs3.MoveNext

Wend End Sub

Private Sub Combo21_Click() Combo29.Clear

temp = "MotherBoard"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Range from itemdetail where Itemname='" & temp & "' and Company='" & Combomotherboard.Text & "' and Type='" & Combo21.Text & "'" While rs3.EOF = False

Combo29.AddItem rs3(0) rs3.MoveNext

Wend End Sub

Private Sub Combo22_Click() temp = "Mouse"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Serialno from itemdetail where Itemname='" & temp & "' and Company='" & Combomouse.Text & "' and Type='" & Combo22.Text & "'" While rs3.EOF = False

Combo45.AddItem rs3(0) rs3.MoveNext

Wend End Sub

(46)

Private Sub Combo23_Click() Combo30.Clear

temp = "Speaker"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Range from itemdetail where Itemname='" & temp & "' and Company='" & Combospeaker.Text & "' and Type='" & Combo23.Text & "'" While rs3.EOF = False

Combo30.AddItem rs3(0) rs3.MoveNext

Wend End Sub

Private Sub Combo24_Click() Combo31.Clear

temp = "Monitor"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Range from itemdetail where Itemname='" & temp & "' and Company='" & Combomonitor.Text & "' and Type='" & Combo24.Text & "'" While rs3.EOF = False

Combo31.AddItem rs3(0) rs3.MoveNext

Wend End Sub

Private Sub Combo25_Click() temp = "Modem"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Serialno from itemdetail where Itemname='" & temp & "' and Company='" & Combomodem.Text & "' and Type='" & Combo25.Text & "'" While rs3.EOF = False

Combo49.AddItem rs3(0) rs3.MoveNext

Wend End Sub

Private Sub Combo27_Click() temp = "RAM"

Combo38.Clear

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Serialno from itemdetail where Itemname='" & temp & "' and Company='" & Comboram.Text & "' and Type='" & Combo19.Text & "' and Range='" & Combo27.Text & "'"

While rs3.EOF = False Combo38.AddItem rs3(0) rs3.MoveNext

(47)

Wend End Sub

Private Sub Combo28_Click() Combo39.Clear

temp = "Processor"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Serialno from itemdetail where Itemname='" & temp & "' and Company='" & ComboProcessor.Text & "' and Type='" & Combo20.Text & "' and Range='" & Combo28.Text & "'"

While rs3.EOF = False Combo39.AddItem rs3(0) rs3.MoveNext

Wend End Sub

Private Sub Combo29_Click() Combo40.Clear

temp = "MotherBoard"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Serialno from itemdetail where Itemname='" & temp & "' and Company='" & Combomotherboard.Text & "' and Type='" & Combo21.Text & "' and Range='" & Combo29.Text & "'"

While rs3.EOF = False Combo40.AddItem rs3(0) rs3.MoveNext

Wend End Sub

Private Sub Combo30_Click() temp = "Speaker"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Serialno from itemdetail where Itemname='" & temp & "' and Company='" & Combospeaker.Text & "' and Type='" & Combo23.Text & "' and Range='" & Combo30.Text & "'"

While rs3.EOF = False Combo46.AddItem rs3(0) rs3.MoveNext

Wend End Sub

Private Sub Combo31_Click() temp = "Monitor"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Serialno from itemdetail where Itemname='" & temp & "' and Company='" & Combomonitor.Text & "' and Type='" & Combo24.Text & "' and Range='" & Combo31.Text & "'"

While rs3.EOF = False Combo47.AddItem rs3(0) rs3.MoveNext

(48)

Wend End Sub

Private Sub Combo34_Click() temp = "Printer"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Serialno from itemdetail where Itemname='" & temp & "' and Company='" & Comboprinter.Text & "' and Type='" & Combo34.Text & "'" While rs3.EOF = False

Combo51.AddItem rs3(0) rs3.MoveNext

Wend End Sub

Private Sub Combo35_Click() Static i As Integer

Static hdprice As Double

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Price from itemdetail where Serialno='" & Combo35.Text & "'" text4.Text = rs3(0)

If i = 0 Then

hdprice = Val(text4) price = price + hdprice Else

price = price - hdprice hdprice = Val(text4) price = price + hdprice End If

i = i + 1

Text21 = price

Text22 = price * 4 / 100 Text23 = price + Val(Text22) End Sub

Private Sub Combo36_Click() Static cdrprice As Double Static i As Integer

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Price from itemdetail where Serialno='" & Combo36.Text & "'" Text5.Text = rs3(0)

If i = 0 Then

cdrprice = Val(Text5) price = price + cdrprice Else

price = price - cdrprice cdrprice = Val(Text5)

(49)

price = price + cdrprice End If

i = i + 1

Text21 = price

Text22 = price * 4 / 100 Text23 = price + Val(Text22) End Sub

Private Sub Combo37_Click() Static cdwprice As Double Static i As Integer

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Price from itemdetail where Serialno='" & Combo37.Text & "'" Text6.Text = rs3(0)

If i = 0 Then

cdwprice = Val(Text6) price = price + cdwprice Else

price = price - cdwprice cdwprice = Val(Text6) price = price + cdwprice End If

i = i + 1

Text21 = price

Text22 = price * 4 / 100 Text23 = price + Val(Text22) End Sub

Private Sub Combo38_Click() Static ramprice As Double Static i As Integer

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Price from itemdetail where Serialno='" & Combo38.Text & "'" Text7.Text = rs3(0)

If i = 0 Then

ramprice = Val(Text7) price = price + ramprice Else

price = price - ramprice ramprice = Val(Text7) price = price + ramprice End If

i = i + 1

Text21 = price

Text22 = price * 4 / 100 Text23 = price + Val(Text22) End Sub

(50)

Private Sub Combo39_Click() Static proprice As Double Static i As Integer

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Price from itemdetail where Serialno='" & Combo39.Text & "'" Text8.Text = rs3(0)

If i = 0 Then

proprice = Val(Text8) price = price + proprice Else

price = price - proprice proprice = Val(Text8) price = price + proprice End If

i = i + 1

Text21 = price

Text22 = price * 4 / 100 Text23 = price + Val(Text22) End Sub

Private Sub Combo40_Click() Static mbprice As Double Static i As Integer

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Price from itemdetail where Serialno='" & Combo40.Text & "'" Text9.Text = rs3(0)

If i = 0 Then

mbprice = Val(Text9) price = price + mbprice Else

price = price - mbprice mbprice = Val(Text9) price = price + mbprice End If

i = i + 1

Text21 = price

Text22 = price * 4 / 100 Text23 = price + Val(Text22) End Sub

Private Sub Combo41_Click() Static fdprice As Double Static i As Integer

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Price from itemdetail where Serialno='" & Combo41.Text & "'" Text10 = rs3(0)

(51)

If i = 0 Then

fdprice = Val(Text10) price = price + fdprice Else

price = price - fdprice fdprice = Val(Text10) price = price + fdprice End If

i = i + 1

Text21 = price

Text22 = price * 4 / 100 Text23 = price + Val(Text22) End Sub

Private Sub Combo42_Click() Static dvdrprice As Double Static i As Integer

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Price from itemdetail where Serialno='" & Combo42.Text & "'" Text11.Text = rs3(0)

If i = 0 Then

dvdrprice = Val(Text11) price = price + dvdrprice Else

price = price - dvdrprice dvdrprice = Val(Text11) price = price + dvdrprice End If

i = i + 1

Text21 = price

Text22 = price * 4 / 100 Text23 = price + Val(Text22) End Sub

Private Sub Combo43_Click() Static dvdwprice As Double Static i As Integer

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Price from itemdetail where Serialno='" & Combo43.Text & "'" Text12.Text = rs3(0)

If i = 0 Then

dvdwprice = Val(Text12) price = price + dvdwprice Else

price = price - dvdwprice dvdwprice = Val(Text12) price = price + dvdwprice End If

(52)

i = i + 1

Text21 = price

Text22 = price * 4 / 100 Text23 = price + Val(Text22) End Sub

Private Sub Combo44_Click() Static kbdprice As Double Static i As Integer

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Price from itemdetail where Serialno='" & Combo44.Text & "'" Text13.Text = rs3(0)

If i = 0 Then

kbdprice = Val(Text13) price = price + kbdprice Else

price = price - kbdprice kbdprice = Val(Text13) price = price + kbdprice End If

i = i + 1

Text21 = price

Text22 = price * 4 / 100 Text23 = price + Val(Text22) End Sub

Private Sub Combo45_Click() Static msprice As Double Static i As Integer

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Price from itemdetail where Serialno='" & Combo45.Text & "'" Text14.Text = rs3(0)

If i = 0 Then

msprice = Val(Text14) price = price + msprice Else

price = price - msprice msprice = Val(Text14) price = price + msprice End If

i = i + 1

Text21 = price

Text22 = price * 4 / 100 Text23 = price + Val(Text22)

(53)

End Sub

Private Sub Combo46_Click() Static spkprice As Double Static i As Integer

'temp = "Speaker"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Price from itemdetail where Serialno='" & Combo46.Text & "'" Text15.Text = rs3(0)

If i = 0 Then

spkprice = Val(Text15) price = price + spkprice Else

price = price - spkprice spkprice = Val(Text15) price = price + spkprice End If

i = i + 1

Text21 = price

Text22 = price * 4 / 100 Text23 = price + Val(Text22) End Sub

Private Sub Combo47_Click() Static monprice As Double Static i As Integer

'temp = "Monitor"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Price from itemdetail where Serialno='" & Combo47.Text & "'" Text16.Text = rs3(0)

If i = 0 Then

monprice = Val(Text16) price = price + monprice Else

price = price - monprice monprice = Val(Text16) price = price + monprice End If

i = i + 1

Text21 = price

Text22 = price * 4 / 100 Text23 = price + Val(Text22) End Sub

Private Sub Combo48_Click()

(54)

Static upsprice As Double Static i As Integer

'temp = "UPS"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Price from itemdetail where Serialno='" & Combo48.Text & "'" Text17.Text = rs3(0)

If i = 0 Then

upsprice = Val(Text17) price = price + upsprice Else

price = price - upsprice upsprice = Val(Text17) price = price + upsprice End If

i = i + 1

Text21 = price

Text22 = price * 4 / 100 Text23 = price + Val(Text22) End Sub

Private Sub Combo49_Click() Static modprice As Double Static i As Integer

'temp = "Modem"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Price from itemdetail where Serialno='" & Combo49.Text & "'" Text18.Text = rs3(0)

If i = 0 Then

modprice = Val(Text18) price = price + modprice Else

price = price - modprice modprice = Val(Text18) price = price + modprice End If

i = i + 1

Text21 = price

Text22 = price * 4 / 100 Text23 = price + Val(Text22) End Sub

(55)

Private Sub Combo50_Click() Static lcardprice As Double Static i As Integer

'temp = "LAN Card"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Price from itemdetail where Serialno='" & Combo50.Text & "'" Text19.Text = rs3(0)

If i = 0 Then

lcardprice = Val(Text19) price = price + lcardprice Else

price = price - lcarddprice lcardprice = Val(Text19) price = price + lcardprice End If

i = i + 1

Text21 = price

Text22 = price * 4 / 100 Text23 = price + Val(Text22) End Sub

Private Sub Combo51_Click() Static prprice As Double Static i As Integer

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Price from itemdetail where Serialno='" & Combo51.Text & "'" Text20.Text = rs3(0)

If i = 0 Then

prprice = Val(Text20) price = price + prprice Else

price = price - prprice prprice = Val(Text20) price = price + prprice End If

i = i + 1

Text21 = price

Text22 = price * 4 / 100 Text23 = price + Val(Text22) End Sub

(56)

Private Sub Combo52_Click() Static scnprice As Double Static i As Integer

'temp = "Scanner"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Price from itemdetail where Serialno='" & Combo52.Text & "'" Text27.Text = rs3(0)

If i = 0 Then

scnprice = Val(Text27) price = price + scnprice Else

price = price - scnprice scnprice = Val(Text27) price = price + scnprice End If

i = i + 1

Text21 = price

Text22 = price * 4 / 100 Text23 = price + Val(Text22) End Sub

Private Sub Combo53_Click() Static cabprice As Double Static i As Integer

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Price from itemdetail where Serialno='" & Combo53.Text & "'" Text28.Text = rs3(0)

If i = 0 Then

cabprice = Val(Text28) price = price + cabprice Else

price = price - cabprice cabprice = Val(Text28) price = price + cabprice End If

i = i + 1

Text21 = price

Text22 = price * 4 / 100 Text23 = price + Val(Text22) End Sub

Private Sub Combocabinet_Click() temp = "Cabinet"

If rs3.State = adStateOpen Then rs3.Close

(57)

rs3.Open "select Serialno from itemdetail where Itemname='" & temp & "' and Company='" & Combocabinet.Text & "'"

While rs3.EOF = False Combo53.AddItem rs3(0) rs3.MoveNext

Wend End Sub

Private Sub Combocdrom_Click() Combo36.Clear

temp = "CD ROM"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Serialno from itemdetail where Itemname='" & temp & "' and Company='" & Combocdrom.Text & "'"

While rs3.EOF = False Combo36.AddItem rs3(0) rs3.MoveNext

Wend End Sub

Private Sub Combocdwriter_Click() Combo37.Clear

temp = "CD Writer"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Serialno from itemdetail where Itemname='" & temp & "' and Company='" & Combocdwriter.Text & "'"

While rs3.EOF = False Combo37.AddItem rs3(0) rs3.MoveNext

Wend End Sub

Private Sub Combodvdrom_Click() temp = "DVD ROM"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Serialno from itemdetail where Itemname='" & temp & "' and Company='" & Combodvdrom.Text & "'"

While rs3.EOF = False Combo42.AddItem rs3(0) rs3.MoveNext

Wend End Sub

(58)

Private Sub Combodvdwriter_Click() temp = "DVD Writer"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Serialno from itemdetail where Itemname='" & temp & "' and Company='" & Combodvdwriter.Text & "'"

While rs3.EOF = False Combo43.AddItem rs3(0) rs3.MoveNext

Wend End Sub

Private Sub Combofloppy_Click() Combo41.Clear

temp = "Floppy Drive"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Serialno from itemdetail where Itemname='" & temp & "' and Company='" & Combofloppy.Text & "'"

While rs3.EOF = False Combo41.AddItem rs3(0) rs3.MoveNext

Wend End Sub

Private Sub Comboharddisk_Click() temp = "Hard Disk"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Company,Type from itemdetail where Itemname='" & temp & "' and Company='" & Comboharddisk.Text & "'"

While rs3.EOF = False

If rs3.Fields(0).Value = Comboharddisk.Text Then bool = True For i = 0 To Comboharddisktype.ListCount

If Comboharddisktype.List(i) = rs3(1) Then bool = False Next

If bool = True Then

Comboharddisktype.AddItem rs3(1) Else bool = True End If rs3.MoveNext Wend End Sub 58

(59)

Private Sub Comboharddiskrange_Click() Combo35.Clear

temp = "Hard Disk"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Serialno from itemdetail where Itemname='" & temp & "' and Company='" & Comboharddisk.Text & "' and Type='" & Comboharddisktype.Text & "' and Range='" & Comboharddiskrange.Text & "'"

While rs3.EOF = False Combo35.AddItem rs3(0) rs3.MoveNext

Wend End Sub

Private Sub Comboharddisktype_Click() Comboharddiskrange.Clear

harddiskprice = "" temp = "Hard Disk"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Range from itemdetail where Itemname='" & temp & "' and Company='" & Comboharddisk.Text & "' and Type='" & Comboharddisktype.Text & "'"

While rs3.EOF = False

Comboharddiskrange.AddItem rs3(0) rs3.MoveNext

Wend End Sub

Private Sub Combokeyboard_Click() temp = "Keyboad"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Serialno from itemdetail where Itemname='" & temp & "' and Company='" & Combokeyboard.Text & "'"

While rs3.EOF = False Combo44.AddItem rs3(0) rs3.MoveNext

Wend End Sub

(60)

Private Sub Combolan_Click() temp = "LAN Card"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Serialno from itemdetail where Itemname='" & temp & "' and Company='" & Combolan.Text & "'"

While rs3.EOF = False Combo50.AddItem rs3(0) rs3.MoveNext

Wend End Sub

Private Sub Combomodem_Click() temp = "Modem"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Company,Type from itemdetail where Itemname='" & temp & "' and Company='" & Combomodem.Text & "'"

While rs3.EOF = False

If rs3.Fields(0).Value = Combomodem.Text Then bool = True For i = 0 To Combo25.ListCount

If Combo25.List(i) = rs3(1) Then bool = False Next

If bool = True Then Combo25.AddItem rs3(1) Else bool = True End If rs3.MoveNext Wend End Sub

Private Sub Combomonitor_Click() temp = "Monitor"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Company,Type from itemdetail where Itemname='" & temp & "' and Company='" & Combomonitor.Text & "'"

While rs3.EOF = False

If rs3.Fields(0).Value = Combomonitor.Text Then bool = True For i = 0 To Combo24.ListCount

If Combo24.List(i) = rs3(1) Then bool = False Next

If bool = True Then Combo24.AddItem rs3(1)

(61)

Else bool = True End If rs3.MoveNext Wend End Sub

Private Sub Combomotherboard_Click() temp = "MotherBoard"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Company,Type from itemdetail where Itemname='" & temp & "' and Company='" & Combomotherboard.Text & "'"

While rs3.EOF = False

If rs3.Fields(0).Value = Combomotherboard.Text Then bool = True For i = 0 To Combo21.ListCount

If Combo21.List(i) = rs3(1) Then bool = False Next

If bool = True Then Combo21.AddItem rs3(1) Else bool = True End If rs3.MoveNext Wend End Sub

Private Sub Combomouse_Click() temp = "Mouse"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Company,Type from itemdetail where Itemname='" & temp & "' and Company='" & Combomouse.Text & "'"

While rs3.EOF = False

If rs3.Fields(0).Value = Combomouse.Text Then bool = True For i = 0 To Combo22.ListCount

If Combo22.List(i) = rs3(1) Then bool = False Next

If bool = True Then Combo22.AddItem rs3(1) Else bool = True End If rs3.MoveNext Wend 61

(62)

End Sub

Private Sub Comboprinter_Click() temp = "Printer"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Company,Type from itemdetail where Itemname='" & temp & "' and Company='" & Comboprinter.Text & "'"

While rs3.EOF = False

If rs3.Fields(0).Value = Comboprinter.Text Then bool = True For i = 0 To Combo34.ListCount

If Combo34.List(i) = rs3(1) Then bool = False Next

If bool = True Then Combo34.AddItem rs3(1) Else bool = True End If rs3.MoveNext Wend End Sub

Private Sub ComboProcessor_Click() temp = "Processor"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Company,Type from itemdetail where Itemname='" & temp & "' and Company='" & ComboProcessor.Text & "'"

While rs3.EOF = False

If rs3.Fields(0).Value = ComboProcessor.Text Then bool = True For i = 0 To Combo20.ListCount

If Combo20.List(i) = rs3(1) Then bool = False Next

If bool = True Then Combo20.AddItem rs3(1) Else bool = True End If rs3.MoveNext Wend End Sub

Private Sub Comboram_Click() temp = "RAM"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Company,Type from itemdetail where Itemname='" & temp & "' and Company='" & Comboram.Text & "'"

While rs3.EOF = False

(63)

If rs3.Fields(0).Value = Comboram.Text Then bool = True For i = 0 To Combo19.ListCount

If Combo19.List(i) = rs3(1) Then bool = False Next

If bool = True Then Combo19.AddItem rs3(1) Else bool = True End If rs3.MoveNext Wend End Sub

Private Sub Comboscanner_Click() temp = "Scanner"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Serialno from itemdetail where Itemname='" & temp & "' and Company='" & Comboscanner.Text & "'"

While rs3.EOF = False Combo52.AddItem rs3(0) rs3.MoveNext

Wend End Sub

Private Sub Combospeaker_Click() temp = "Speaker"

If rs3.State = adStateOpen Then rs3.Close

rs3.Open "select Company,Type from itemdetail where Itemname='" & temp & "' and Company='" & Combospeaker.Text & "'"

While rs3.EOF = False

If rs3.Fields(0).Value = Combospeaker.Text Then bool = True For i = 0 To Combo23.ListCount

If Combo23.List(i) = rs3(1) Then bool = False Next

If bool = True Then Combo23.AddItem rs3(1) Else bool = True End If rs3.MoveNext Wend End Sub

Private Sub Comboups_Click() temp = "UPS"

If rs3.State = adStateOpen Then rs3.Close

(64)

rs3.Open "select Serialno from itemdetail where Itemname='" & temp & "' and Company='" & Comboups.Text & "'"

While rs3.EOF = False Combo48.AddItem rs3(0) rs3.MoveNext

Wend End Sub

Private Sub Form_Load() Call connectdatabase Call setsoldrecordset Call itemdetail Call customerrecordset Reciept.Visible = False text4.Enabled = False Text5.Enabled = False Text6.Enabled = False Text7.Enabled = False Text8.Enabled = False Text9.Enabled = False Text10.Enabled = False Text11.Enabled = False Text12.Enabled = False Text13.Enabled = False Text14.Enabled = False Text15.Enabled = False Text16.Enabled = False Text17.Enabled = False Text18.Enabled = False Text19.Enabled = False Text20.Enabled = False Text21.Enabled = False Text22.Enabled = False Text23.Enabled = False Text27.Enabled = False Text25.Enabled = False Text28.Enabled = False Text26.Enabled = False Label32.Visible = False Text25.Visible = False ibldate.Caption = Date

'If rs2.State = 1 Then rs2.Close

'rs2.Open "Select * from setsold", cs, adOpenKeyset, adLockOptimistic invoice.Caption = "S" & (rs2.RecordCount + 1)

(65)

invoice.FontBold = True

Label38.Caption = "cust" & (rs2.RecordCount + 1) price = 0

Dim bool As Boolean While rs3.EOF = False

If rs3.Fields(0).Value = "Hard Disk" Then bool = True

For i = 0 To Comboharddisk.ListCount

If Comboharddisk.List(i) = rs3(1) Then bool = False Next

If bool = True Then

Comboharddisk.AddItem rs3(1) Else

bool = True End If

ElseIf rs3.Fields(0).Value = "CD ROM" Then bool = True

For i = 0 To Combocdrom.ListCount

If Combocdrom.List(i) = rs3(1) Then bool = False Next

If bool = True Then

Combocdrom.AddItem rs3(1) Else

bool = True End If

ElseIf rs3.Fields(0).Value = "CD Writer" Then bool = True

For i = 0 To Combocdwriter.ListCount

If Combocdwriter.List(i) = rs3(1) Then bool = False Next

If bool = True Then

Combocdwriter.AddItem rs3(1) Else

bool = True End If

ElseIf rs3.Fields(0).Value = "RAM" Then bool = True

For i = 0 To Comboram.ListCount

If Comboram.List(i) = rs3(1) Then bool = False Next

If bool = True Then

Comboram.AddItem rs3(1) Else

bool = True End If

ElseIf rs3.Fields(0).Value = "Processor" Then

(66)

bool = True

For i = 0 To ComboProcessor.ListCount

If ComboProcessor.List(i) = rs3(1) Then bool = False Next

If bool = True Then

ComboProcessor.AddItem rs3(1) Else

bool = True End If

ElseIf rs3.Fields(0).Value = "MotherBoard" Then bool = True

For i = 0 To Combomotherboard.ListCount

If Combomotherboard.List(i) = rs3(1) Then bool = False Next

If bool = True Then

Combomotherboard.AddItem rs3(1) Else

bool = True End If

ElseIf rs3.Fields(0).Value = "Floppy Drive" Then bool = True

For i = 0 To Combofloppy.ListCount

If Combofloppy.List(i) = rs3(1) Then bool = False Next

If bool = True Then

Combofloppy.AddItem rs3(1) Else

bool = True End If

ElseIf rs3.Fields(0).Value = "Cabinet" Then bool = True

For i = 0 To Combocabinet.ListCount

If Combocabinet.List(i) = rs3(1) Then bool = False Next

If bool = True Then

Combocabinet.AddItem rs3(1) Else

bool = True End If

ElseIf rs3.Fields(0).Value = "DVD ROM" Then bool = True

For i = 0 To Combodvdrom.ListCount

If Combodvdrom.List(i) = rs3(1) Then bool = False Next

If bool = True Then

Combodvdrom.AddItem rs3(1)

(67)

Else

bool = True End If

ElseIf rs3.Fields(0).Value = "DVD Writer" Then bool = True

For i = 0 To Combodvdwriter.ListCount

If Combodvdwriter.List(i) = rs3(1) Then bool = False Next

If bool = True Then

Combodvdwriter.AddItem rs3(1) Else

bool = True End If

ElseIf rs3.Fields(0).Value = "Keyboad" Then bool = True

For i = 0 To Combokeyboard.ListCount

If Combokeyboard.List(i) = rs3(1) Then bool = False Next

If bool = True Then

Combokeyboard.AddItem rs3(1) Else

bool = True End If

ElseIf rs3.Fields(0).Value = "Mouse" Then bool = True

For i = 0 To Combomouse.ListCount

If Combomouse.List(i) = rs3(1) Then bool = False Next

If bool = True Then

Combomouse.AddItem rs3(1) Else

bool = True End If

ElseIf rs3.Fields(0).Value = "Speaker" Then bool = True

For i = 0 To Combospeaker.ListCount

If Combospeaker.List(i) = rs3(1) Then bool = False Next

If bool = True Then

Combospeaker.AddItem rs3(1) Else

bool = True End If

ElseIf rs3.Fields(0).Value = "Monitor" Then bool = True

For i = 0 To Combomonitor.ListCount

(68)

If Combomonitor.List(i) = rs3(1) Then bool = False Next

If bool = True Then

Combomonitor.AddItem rs3(1) Else

bool = True End If

ElseIf rs3.Fields(0).Value = "UPS" Then bool = True

For i = 0 To Comboups.ListCount

If Comboups.List(i) = rs3(1) Then bool = False Next

If bool = True Then

Comboups.AddItem rs3(1) Else

bool = True End If

ElseIf rs3.Fields(0).Value = "Modem" Then bool = True

For i = 0 To Combomodem.ListCount

If Combomodem.List(i) = rs3(1) Then bool = False Next

If bool = True Then

Combomodem.AddItem rs3(1) Else

bool = True End If

ElseIf rs3.Fields(0).Value = "LAN Card" Then bool = True

For i = 0 To Combolan.ListCount

If Combolan.List(i) = rs3(1) Then bool = False Next

If bool = True Then

Combolan.AddItem rs3(1) Else

bool = True End If

ElseIf rs3.Fields(0).Value = "Printer" Then bool = True

For i = 0 To Comboprinter.ListCount

If Comboprinter.List(i) = rs3(1) Then bool = False Next

If bool = True Then

Comboprinter.AddItem rs3(1) Else

bool = True

(69)

End If

ElseIf rs3.Fields(0).Value = "Scanner" Then bool = True

For i = 0 To Comboscanner.ListCount

If Comboscanner.List(i) = rs3(1) Then bool = False Next

If bool = True Then

Comboscanner.AddItem rs3(1) Else bool = True End If End If rs3.MoveNext Wend End Sub

Private Sub Form_Unload(cancel As Integer) con.Close

End Sub

Private Sub lvButtons_H2_Click() Unload Me

End Sub

Private Sub Reciept_Click() On Error Resume Next: sellcomputer.PrintForm End Sub

Private Sub save_Click()

b = (MsgBox("are you sure you want to save?", vbYesNo, conformation)) If b <> 6 Then Exit Sub End If If Combo35.Text = "" Then End If If Combo36.Text = "" Then End If If Combo37.Text = "" Then End If If Combo38.Text = "" Then End If If Combo39.Text = "" Then End If If Combo40.Text = "" Then End If If Combo41.Text = "" Then 69

(70)

End If If Combo42.Text = "" Then End If If Combo43.Text = "" Then End If If Combo44.Text = "" Then End If If Combo45.Text = "" Then End If If Combo46.Text = "" Then End If If Combo47.Text = "" Then End If If Combo48.Text = "" Then End If If Combo49.Text = "" Then End If If Combo50.Text = "" Then End If If Combo51.Text = "" Then End If If Combo52.Text = "" Then End If If Combo53.Text = "" Then End If If vkTextBox1.Text = "" Then

MsgBox " Customer Name is Empty" vkTextBox1.SetFocus

Exit Sub

ElseIf vkTextBox2.Text = "" Then

MsgBox " Customer Address is Empty" vkTextBox2.SetFocus

Exit Sub

ElseIf vkTextBox3.Text = "" Then

MsgBox " Customer Pnone No is Empty" vkTextBox3.SetFocus

Exit Sub End If

If text4.Text = "" And Text5.Text = "" And Text6.Text = "" And Text7.Text = "" And Text8.Text = "" _

And Text9.Text = "" And Text10.Text = "" And Text11.Text = "" And Text12.Text = "" And Text13.Text = "" _

And Text14.Text = "" And Text15.Text = "" And Text16.Text = "" And Text17.Text = "" And Text18.Text = "" _

References

Related documents