Professional Documents
Culture Documents
3rd Floor, Maratha Mandir Annex, Babasaheb Gawde Chowk, Dr. A.B. Nair Road, Mumbai Central, Mumbai 400 008
CERTIFICATE
This is to Certify that the group of the following students 1. 2. 3. 4. Has Satisfactory carried out the project work entitled Partial fulfillment of______________________________ Of the Maharashtra State Board Of Technical Education, Mumbai, during the year 2007-2008
Project Guide Head of Department
Principal
External Examiner
PROJECT REPORT ON
GROUP MEMBERS:-
ACKNOLEDGEMENT
It gives us great pleasure in presenting this project titled CUSTOMER DATA ENTRY. We are pleased with our collages teaching & non teaching staff members, who have been very much helpful and kind towards us in preparing this project. We are very much thankful to our project guide Prof. , who had been there for help whenever required.
INDEX
Contents Introduction
1.
Page No.
4 6 7
System Design
ABSTRACT
LOGIC SOLUTIONS is Specially Designed for the Computer Hardware Shops and Customer Supported Companies. In our research we found that there is no special software for Hardware vendors and Customer Supported Companies to keep their data properly. Most of the user use TALLY for store there data, but it is not sufficient to store their data properly specially with the specific serial numbers of the products.
Detailed Description
In market survey we had found that there is no special package for Computer Hardware shops to store their data in proper format. Most of the shop keepers use paper work to maintain their account or Company information. This is not user friendly and prone to Human error. To maintain Records Shop Holders require professional person because of that cost increases. Thus we decided to proceed for the analytical studies of the concerned project named LOGIC SOLUTIONS
How to use?
It is very easy to use LOGIC SOLUTIONS as the user just has to fill the correct entries in the respective blocks. The package is fully validated so that it is protected from wrong entries where ever concerned. To design this package we have used 2 applications:1) Visual Basic 6.0 : Designing & Coding 2) Microsoft Access: Storage of data (Back End)
MICROSOFT ACCESS We have used Microsoft Access for the storage of our customer database. The database created by using Microsoft Access uses less storage space
PROBLEM STATEMENT
10
PRELIMINARY SURVEY
Before start of the project we performed a basic preliminary market survey. In the survey we found the lack of proper package for storing computer shop records in the market which is (i)
(ii)
No special package for such a purpose designed till date. Some shops use Tally and some use paper work for these tasks in which using Tally increases the cost for a trained person and paper work which is usually prone to human errors.
FEASIABILITY STUDY
(i)
(ii)
(iii)
(iv)
We chose Microsoft Visual Basic 6.0 for designing model because the G.U.I it provided is of high quality and the file size is less. It gives the freedom to use the predefined controls for designing. For the storing purpose we use the Microsoft Access which allows us to store large data in small size. Then after the completion of the designing and coding the whole process will be converted into .exe file.
11
SYSTEM DESIGN
12
SYSTEM FLOWCHART
13
START
YES
Supplier
Purchase product
Bill
Payment to Shopkeeper
14
ER DIAGRAM
15
Name
ID
Comp. Name
Serial No.
CUSTOMER
BU Y Name
Product
Contact No.
Quantit y
D.O.E
D.O.P
Brand Name
Check Availabilit y
No Create Bill
Date BILL
Amount
Cash
PAYMENT
Cheque
Cards
16
A
Order No. Brand
Supplier ID
Add.
ORDER
Conta ct Suppli er
SUPPLIER
Date
Amount
Cash
Create Bill
BILL
Pay Bill
PAYMENT
Product Name
Cheque
Cards
17
18
LEVEL 0
STOCK
CUSTOMER
Product Order
PURCHAS E 1.0
BILL
Customer Database
Customer Info.
19
LEVEL 1
STOCK
CUSTOMER
Product Order Payment by Customer
1.0
CHECK PRODUCT AVAILABILITY
PRODUCT PURCHASE
1.2 PURCHAS E
1.1 PURCHAS E
BILL
Entry in DB
CUSTOMER DATABASE
Customer Info.
20
LEVEL 2
STOCK
1.3
PLACE ORDER
CUSTOMER
Product Order Payment by Customer
1.0
CHECK PRODUCT AVAILABILITY
PRODUCT PURCHASE
SUPPLIER
1.2 PURCHAS E
1.1 PURCHAS E
1.4
SUPPLY PRODUCT
BILL
Entry in DB
Customer Info.
1.5
PAYMENT TO SUPPLIER
PRODUCT RECIEVED
21
22
15 Days
Feasibility Study
28 Days
Information Gathering
72 Days
Testing
GANTT CHART
23
24
LOGIN FORM
25
26
27
28
Private Sub Form_Load() Set CON = New ADODB.Connection CON.Open "dsn=AMAR" Set REC = New ADODB.Recordset REC.Open "select * from LOGIN", CON, adOpenDynamic, adLockOptimistic End Sub
29
30
31
Private Sub rexit_Click() End End Sub Private Sub rocinf_Click() frmCustomerInfoAll.Show End Sub Private Sub rosupinf_Click() frmSupplierInfoAll.Show End Sub Private Sub rover_Click() frmDailyReportAll.Show End Sub Private Sub roverempinf_Click() frmEmployeeInfoAll.Show End Sub Private Sub roverinf_Click() frmBranchInfoAll.Show End Sub Private Sub roverpi_Click() frmPurchaseInfoAll.Show End Sub Private Sub roverstk_Click() frmProductInfoAll.Show End Sub Private Sub rpro_Click() frmProductInfo.Show End Sub Private Sub rpur_Click() frmPurchaseInfo.Show End Sub Private Sub rrep_Click() frmReplacementInfo.Show End Sub Customer Data Entry 32
Private Sub rstock_Click() frmStockStatus.Show End Sub Private Sub rsupinf_Click() frmSupplierInfo.Show End Sub
33
34
Text9.Enabled = True Text10.Enabled = True End Sub Private Sub CmdLast_Click() REC.MoveLast recordtotext Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True End Sub Private Sub CmdModify_Click(Index As Integer) Dim a As Variant a = MsgBox("Do you Really Want to Modify?", vbYesNo) If a = vbYes Then TEXTTORECORD REC.Update MsgBox ("Your Record is Modify") Else MsgBox "Your Record is Not Modify" End If End Sub Private Sub CmdNew_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" Text10.Text = "" Customer Data Entry 36
Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True Text1.SetFocus CmdNew.Enabled = False CmdSave.Enabled = True CmdModify(0).Enabled = False CmdDelete.Enabled = False End Sub Private Sub CmdNext_Click() REC.MoveNext If REC.EOF Then MsgBox "Last Record" REC.MovePrevious End If recordtotext Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True End Sub
37
Private Sub CmdPrevious_Click() REC.MovePrevious If REC.BOF Then MsgBox "First Record" REC.MoveNext End If TEXTTORECORD Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True End Sub Private Sub CmdSave_Click() Dim a As Variant a = MsgBox("Do you Really Want to save?", vbYesNo) If a = vbYes Then REC.AddNew TEXTTORECORD REC.Update MsgBox ("Your Record is Save") Else MsgBox "Your Record is Not Save" End If CmdSave.Enabled = False CmdNew.Enabled = True CmdModify(0).Enabled = True CmdDelete.Enabled = True End Sub Private Sub CmdSearch_Click() Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Customer Data Entry 38
Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True a = TxtName.Text REC.MoveFirst If Combo1.Text = "Branch Code" Then a = CInt(TxtName.Text) Do While Not REC.EOF = True If REC.Fields(0) = a Then flag = 1 recordtotext Exit Sub Else REC.MoveNext flag = 0 End If Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" End If ElseIf Combo1.Text = "Branch Name" Then a = CStr(TxtName.Text) Do While Not REC.EOF = True If REC.Fields(1) = a Then flag = 1 recordtotext Exit Sub Else REC.MoveNext flag = 0 End If Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" End If End If End Sub
39
Private Sub CmdShowall_Click() frmBranchInfoAll.Show End Sub Private Sub Form_Load() Set CON = New ADODB.Connection CON.Open "dsn=AMAR" Set REC = New ADODB.Recordset REC.Open "select * from BRANCHINFO", CON, adOpenDynamic, adLockOptimistic Text1.Enabled = False Text2.Enabled = False Text3.Enabled = False Text4.Enabled = False Text5.Enabled = False Text6.Enabled = False Text7.Enabled = False Text8.Enabled = False Text9.Enabled = False Text10.Enabled = False CmdSave.Enabled = False End Sub Private Sub TEXTTORECORD() REC.Fields(0) = Text1.Text REC.Fields(1) = Text2.Text REC.Fields(2) = Text3.Text REC.Fields(3) = Text4.Text REC.Fields(4) = Text5.Text REC.Fields(5) = Text6.Text REC.Fields(6) = Text7.Text REC.Fields(7) = Text8.Text REC.Fields(8) = Text9.Text REC.Fields(9) = Text10.Text End Sub
40
Private Sub recordtotext() Text1.Text = REC.Fields(0) Text2.Text = REC.Fields(1) Text3.Text = REC.Fields(2) Text4.Text = REC.Fields(3) Text5.Text = REC.Fields(4) Text6.Text = REC.Fields(5) Text7.Text = REC.Fields(6) Text8.Text = REC.Fields(7) Text9.Text = REC.Fields(8) Text10.Text = REC.Fields(9) End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text1_Validate(Cancel As Boolean) If (Text1.Text = "") Then MsgBox "Enter Branch Code" Cancel = True End If End Sub Private Sub Text10_Validate(Cancel As Boolean) If (Text10.Text = "") Then MsgBox "Enter Email Id" Cancel = True End If End Sub Private Sub Text2_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub
41
Private Sub Text2_Validate(Cancel As Boolean) If (Text2.Text = "") Then MsgBox "Enter Branch Name" Cancel = True End If End Sub Private Sub Text3_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text3_Validate(Cancel As Boolean) If (Text3.Text = "") Then MsgBox "Enter Address" Cancel = True End If End Sub Private Sub Text4_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text4_Validate(Cancel As Boolean) If (Text4.Text = "") Then MsgBox "Enter City Name" Cancel = True End If End Sub Private Sub Text5_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub
42
Private Sub Text5_Validate(Cancel As Boolean) If (Text5.Text = "") Then MsgBox "Enter Pin Code" Cancel = True End If End Sub Private Sub Text6_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text6_Validate(Cancel As Boolean) If (Text6.Text = "") Then MsgBox "Enter Name of Contact Person" Cancel = True End If End Sub Private Sub Text7_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text7_Validate(Cancel As Boolean) If (Text7.Text = "") Then MsgBox "Enter Post Of Person" Cancel = True End If End Sub Private Sub Text8_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub
43
Private Sub Text8_Validate(Cancel As Boolean) If (Text8.Text = "") Then MsgBox "Enter Phone no" Cancel = True End If End Sub Private Sub Text9_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text9_Validate(Cancel As Boolean) If (Text9.Text = "") Then MsgBox "Enter Fax No" Cancel = True End If End Sub
44
45
Text9.Enabled = True Text10.Enabled = True End Sub Private Sub CmdLast_Click() REC.MoveLast recordtotext Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True End Sub Private Sub CmdModify_Click(Index As Integer) Dim a As Variant a = MsgBox("Do you Really Want to Modify?", vbYesNo) If a = vbYes Then TEXTTORECORD REC.Update MsgBox ("Your Record is Modify") Else MsgBox "Your Record is Not Modify" End If End Sub Private Sub CmdNew_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" Text10.Text = "" Customer Data Entry 47
Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True Text1.SetFocus CmdNew.Enabled = False CmdSave.Enabled = True CmdModify(0).Enabled = False CmdDelete.Enabled = False End Sub Private Sub CmdNext_Click() REC.MoveNext If REC.EOF Then MsgBox "Last Record" REC.MovePrevious End If recordtotext Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True End Sub
48
Private Sub CmdPrevious_Click() REC.MovePrevious If REC.BOF Then MsgBox "First Record" REC.MoveNext End If TEXTTORECORD Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True End Sub Private Sub CmdSave_Click() Dim a As Variant a = MsgBox("Do you Really Want to save?", vbYesNo) If a = vbYes Then REC.AddNew TEXTTORECORD REC.Update MsgBox ("Your Record is Save") Else MsgBox "Your Record is Not Save" End If CmdSave.Enabled = False CmdNew.Enabled = True CmdModify(0).Enabled = True CmdDelete.Enabled = True End Sub Private Sub CmdSearch_Click() Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Customer Data Entry 49
Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True a = TxtName.Text REC.MoveFirst If Combo1.Text = "Branch Code" Then a = CInt(TxtName.Text) Do While Not REC.EOF = True If REC.Fields(0) = a Then flag = 1 recordtotext Exit Sub Else REC.MoveNext flag = 0 End If Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" End If ElseIf Combo1.Text = "Branch Name" Then a = CStr(TxtName.Text) Do While Not REC.EOF = True If REC.Fields(1) = a Then flag = 1 recordtotext Exit Sub Else REC.MoveNext flag = 0 End If Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" End If End If End Sub Customer Data Entry 50
Private Sub CmdShowall_Click() frmBranchInfoAll.Show End Sub Private Sub Form_Load() Set CON = New ADODB.Connection CON.Open "dsn=AMAR" Set REC = New ADODB.Recordset REC.Open "select * from BRANCHINFO", CON, adOpenDynamic, adLockOptimistic Text1.Enabled = False Text2.Enabled = False Text3.Enabled = False Text4.Enabled = False Text5.Enabled = False Text6.Enabled = False Text7.Enabled = False Text8.Enabled = False Text9.Enabled = False Text10.Enabled = False CmdSave.Enabled = False End Sub Private Sub TEXTTORECORD() REC.Fields(0) = Text1.Text REC.Fields(1) = Text2.Text REC.Fields(2) = Text3.Text REC.Fields(3) = Text4.Text REC.Fields(4) = Text5.Text REC.Fields(5) = Text6.Text REC.Fields(6) = Text7.Text REC.Fields(7) = Text8.Text REC.Fields(8) = Text9.Text REC.Fields(9) = Text10.Text End Sub Private Sub recordtotext() Text1.Text = REC.Fields(0) Text2.Text = REC.Fields(1) Text3.Text = REC.Fields(2) Customer Data Entry 51
Text4.Text = REC.Fields(3) Text5.Text = REC.Fields(4) Text6.Text = REC.Fields(5) Text7.Text = REC.Fields(6) Text8.Text = REC.Fields(7) Text9.Text = REC.Fields(8) Text10.Text = REC.Fields(9) End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text1_Validate(Cancel As Boolean) If (Text1.Text = "") Then MsgBox "Enter Branch Code" Cancel = True End If End Sub Private Sub Text10_Validate(Cancel As Boolean) If (Text10.Text = "") Then MsgBox "Enter Email Id" Cancel = True End If End Sub Private Sub Text2_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text2_Validate(Cancel As Boolean) If (Text2.Text = "") Then MsgBox "Enter Branch Name" Cancel = True End If End Sub Customer Data Entry
52
Private Sub Text3_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text3_Validate(Cancel As Boolean) If (Text3.Text = "") Then MsgBox "Enter Address" Cancel = True End If End Sub Private Sub Text4_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text4_Validate(Cancel As Boolean) If (Text4.Text = "") Then MsgBox "Enter City Name" Cancel = True End If End Sub Private Sub Text5_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text5_Validate(Cancel As Boolean) If (Text5.Text = "") Then MsgBox "Enter Pin Code" Cancel = True End If End Sub Customer Data Entry 53
Private Sub Text6_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text6_Validate(Cancel As Boolean) If (Text6.Text = "") Then MsgBox "Enter Name of Contact Person" Cancel = True End If End Sub Private Sub Text7_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text7_Validate(Cancel As Boolean) If (Text7.Text = "") Then MsgBox "Enter Post Of Person" Cancel = True End If End Sub Private Sub Text8_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text8_Validate(Cancel As Boolean) If (Text8.Text = "") Then MsgBox "Enter Phone no" Cancel = True End If End Sub
54
Private Sub Text9_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text9_Validate(Cancel As Boolean) If (Text9.Text = "") Then MsgBox "Enter Fax No" Cancel = True End If End Sub
55
56
Text3.Enabled = True Text4.Enabled = True End Sub Private Sub CmdModify_Click(Index As Integer) Dim a As Variant a = MsgBox("Do you Really Want to Modify?", vbYesNo) If a = vbYes Then TEXTTORECORD REC.Update MsgBox ("Your Record is Modify") Else MsgBox "Your Record is Not Modify" End If End Sub Private Sub CmdNew_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text1.SetFocus CmdNew.Enabled = False CmdSave.Enabled = True CmdModify(0).Enabled = False CmdDelete.Enabled = False End Sub Private Sub CmdNext_Click() REC.MoveNext If REC.EOF Then MsgBox "Last Record" REC.MovePrevious End If recordtotext Customer Data Entry
58
Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True End Sub Private Sub CmdPrevious_Click() REC.MovePrevious If REC.BOF Then MsgBox "First Record" REC.MoveNext End If TEXTTORECORD Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True End Sub Private Sub CmdSave_Click() Dim a As Variant a = MsgBox("Do you Really Want to save?", vbYesNo) If a = vbYes Then REC.AddNew TEXTTORECORD REC.Update MsgBox ("Your Record is Save") Else MsgBox "Your Record is Not Save" End If CmdSave.Enabled = False CmdNew.Enabled = True CmdModify(0).Enabled = True CmdDelete.Enabled = True End Sub Private Sub CmdSearch_Click() Text1.Enabled = True Text2.Enabled = True Customer Data Entry 59
Text3.Enabled = True Text4.Enabled = True a = TxtName.Text REC.MoveFirst If Combo1.Text = "Call No" Then a = CInt(TxtName.Text) Do While Not REC.EOF = True If REC.Fields(0) = a Then flag = 1 recordtotext Exit Sub Else REC.MoveNext flag = 0 End If Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" End If End If End Sub Private Sub CmdShowall_Click() frmCallReportAll.Show End Sub Private Sub Form_Load() Set CON = New ADODB.Connection CON.Open "dsn=AMAR" Set REC = New ADODB.Recordset REC.Open "select * from CALLREPORT", CON, adOpenDynamic, adLockOptimistic Text1.Enabled = False Text2.Enabled = False Text3.Enabled = False Text4.Enabled = False CmdSave.Enabled = False End Sub
60
Private Sub TEXTTORECORD() REC.Fields(0) = Text1.Text REC.Fields(1) = DTPicker1.Value REC.Fields(2) = Text2.Text REC.Fields(3) = DTPicker2.Value REC.Fields(4) = Text3.Text REC.Fields(5) = Text4.Text REC.Fields(6) = Option1 REC.Fields(7) = Option2 REC.Fields(8) = Option3 End Sub Private Sub recordtotext() Text1.Text = REC.Fields(0) DTPicker1.Value = REC.Fields(1) Text2.Text = REC.Fields(2) DTPicker2.Value = REC.Fields(3) Text3.Text = REC.Fields(4) Text4.Text = REC.Fields(5) Option1 = REC.Fields(6) Option2 = REC.Fields(7) Option3 = REC.Fields(8) End Sub Private Sub Option1_Validate(Cancel As Boolean) If (Option1.Value = False And Option2.Value = False And Option3.Value = False) Then MsgBox "Enter Call Status" End If End Sub Private Sub Option2_Validate(Cancel As Boolean) If (Option1.Value = False And Option2.Value = False And Option3.Value = False) Then MsgBox "Enter Call Status" End If End Sub Private Sub Option3_Validate(Cancel As Boolean) If (Option1.Value = False And Option2.Value = False And Option3.Value = False) Then MsgBox "Enter Call Status" End If End Sub Customer Data Entry 61
Private Sub Text1_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text1_Validate(Cancel As Boolean) If (Text1.Text = "") Then MsgBox "Enter Call No" Cancel = True End If End Sub Private Sub Text2_Validate(Cancel As Boolean) If (Text2.Text = "") Then MsgBox "Enter Engg. Arrived Time" Cancel = True End If End Sub Private Sub Text4_Validate(Cancel As Boolean) If (Text4.Text = "") Then MsgBox "Enter Action Taken" Cancel = True End If End Sub Private Sub Text4_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text3_Validate(Cancel As Boolean) If (Text3.Text = "") Then MsgBox "Enter Call Completeted Time" Cancel = True End If End Sub
62
63
Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True Option1.Enabled = True Option2.Enabled = True End Sub Private Sub CmdLast_Click() REC.MoveLast recordtotext Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True Option1.Enabled = True Option2.Enabled = True End Sub Private Sub CmdModify_Click(Index As Integer) Dim a As Variant a = MsgBox("Do you Really Want to Modify?", vbYesNo) If a = vbYes Then TEXTTORECORD REC.Update MsgBox ("Your Record is Modify") Else MsgBox "Your Record is Not Modify" End If End Sub Private Sub CmdNew_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Customer Data Entry 65
Text6.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" Text10.Text = "" Option1.Value = False Option2.Value = False Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True Option1.Enabled = True Option2.Enabled = True Text1.SetFocus CmdNew.Enabled = False CmdSave.Enabled = True CmdModify(0).Enabled = False CmdDelete.Enabled = False End Sub Private Sub CmdNext_Click() REC.MoveNext If REC.EOF Then MsgBox "Last Record" REC.MovePrevious End If recordtotext Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Customer Data Entry 66
Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True Option1.Enabled = True Option2.Enabled = True End Sub Private Sub CmdPrevious_Click() REC.MovePrevious If REC.BOF Then MsgBox "First Record" REC.MoveNext End If TEXTTORECORD Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True Option1.Enabled = True Option2.Enabled = True End Sub Private Sub CmdSave_Click() Dim a As Variant a = MsgBox("Do you Really Want to save?", vbYesNo) If a = vbYes Then REC.AddNew TEXTTORECORD REC.Update MsgBox ("Your Record is Save") Else MsgBox "Your Record is Not Save" End If CmdSave.Enabled = False CmdNew.Enabled = True CmdModify(0).Enabled = True Customer Data Entry 67
CmdDelete.Enabled = True End Sub Private Sub CmdSearch_Click() Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True Option1.Enabled = True Option2.Enabled = True a = TxtName.Text REC.MoveFirst If Combo1.Text = "Customer Id" Then a = CInt(TxtName.Text) Do While Not REC.EOF = True If REC.Fields(0) = a Then flag = 1 recordtotext Exit Sub Else REC.MoveNext flag = 0 End If Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" End If ElseIf Combo1.Text = "Company Name" Then a = CStr(TxtName.Text) Do While Not REC.EOF = True If REC.Fields(1) = a Then flag = 1 recordtotext Exit Sub Else REC.MoveNext Customer Data Entry 68
flag = 0 End If Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" End If End If End Sub Private Sub CmdShowall_Click() frmCustomerInfoAll.Show End Sub Private Sub Form_Load() Set CON = New ADODB.Connection CON.Open "dsn=AMAR" Set REC = New ADODB.Recordset REC.Open "select * from CUSTOMERINFO", CON, adOpenDynamic, adLockOptimistic Text1.Enabled = False Text2.Enabled = False Text3.Enabled = False Text4.Enabled = False Text5.Enabled = False Text6.Enabled = False Text7.Enabled = False Text8.Enabled = False Text9.Enabled = False Text10.Enabled = False Option1.Enabled = False Option2.Enabled = False CmdSave.Enabled = False End Sub Private Sub TEXTTORECORD() REC.Fields(0) = Text1.Text REC.Fields(1) = Text2.Text REC.Fields(2) = Text3.Text REC.Fields(3) = Text4.Text REC.Fields(4) = Text5.Text REC.Fields(5) = Text6.Text Customer Data Entry 69
REC.Fields(6) = Text7.Text REC.Fields(7) = Text8.Text REC.Fields(8) = Text9.Text REC.Fields(9) = Text10.Text REC.Fields(10) = Option1.Value REC.Fields(10) = Option2.Value End Sub Private Sub recordtotext() Text1.Text = REC.Fields(0) Text2.Text = REC.Fields(1) Text3.Text = REC.Fields(2) Text4.Text = REC.Fields(3) Text5.Text = REC.Fields(4) Text6.Text = REC.Fields(5) Text7.Text = REC.Fields(6) Text8.Text = REC.Fields(7) Text9.Text = REC.Fields(8) Text10.Text = REC.Fields(9) Option1.Value = REC.Fields(10) Option2.Value = REC.Fields(11) End Sub Private Sub Option1_Validate(Cancel As Boolean) If (Option1.Value = False And Option2.Value = False) Then MsgBox "Select Customer type" End If End Sub Private Sub Option2_Validate(Cancel As Boolean) If (Option1.Value = False And Option2.Value = False) Then MsgBox "Select Customer type" End If End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub
70
Private Sub Text1_Validate(Cancel As Boolean) If (Text1.Text = "") Then MsgBox "Enter Customer Id" Cancel = True End If End Sub Private Sub Text10_Validate(Cancel As Boolean) If (Text10.Text = "") Then MsgBox "Enter Email Id" Cancel = True End If End Sub Private Sub Text2_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text2_Validate(Cancel As Boolean) If (Text2.Text = "") Then MsgBox "Enter Company Name" Cancel = True End If End Sub Private Sub Text3_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub
71
Private Sub Text3_Validate(Cancel As Boolean) If (Text3.Text = "") Then MsgBox "Enter Contact Name" Cancel = True End If End Sub Private Sub Text4_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text4_Validate(Cancel As Boolean) If (Text4.Text = "") Then MsgBox "Enter Post Of Person" Cancel = True End If End Sub Private Sub Text5_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text5_Validate(Cancel As Boolean) If (Text5.Text = "") Then MsgBox "Enter Address" Cancel = True End If End Sub Private Sub Text6_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 Customer Data Entry 72
End If End Sub Private Sub Text6_Validate(Cancel As Boolean) If (Text6.Text = "") Then MsgBox "Enter City Name" Cancel = True End If End Sub Private Sub Text7_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text7_Validate(Cancel As Boolean) If (Text7.Text = "") Then MsgBox "Enter Pin Code" Cancel = True End If End Sub Private Sub Text8_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text8_Validate(Cancel As Boolean) If (Text8.Text = "") Then MsgBox "Enter Phone No" Cancel = True End If End Sub Private Sub Text9_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Customer Data Entry 73
Private Sub Text9_Validate(Cancel As Boolean) If (Text9.Text = "") Then MsgBox "Enter Fax No" Cancel = True End If End Sub
74
75
Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True End Sub Private Sub CmdModify_Click(Index As Integer) Dim a As Variant a = MsgBox("Do you Really Want to Modify?", vbYesNo) If a = vbYes Then TEXTTORECORD REC.Update MsgBox ("Your Record is Modify") Else MsgBox "Your Record is Not Modify" End If End Sub Private Sub CmdNew_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text1.SetFocus CmdNew.Enabled = False CmdSave.Enabled = True CmdModify(0).Enabled = False CmdDelete.Enabled = False End Sub Customer Data Entry 77
Private Sub CmdNext_Click() REC.MoveNext If REC.EOF Then MsgBox "Last Record" REC.MovePrevious End If recordtotext Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True End Sub Private Sub CmdPrevious_Click() REC.MovePrevious If REC.BOF Then MsgBox "First Record" REC.MoveNext End If recordtotext Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True End Sub Private Sub CmdSave_Click() Dim a As Variant a = MsgBox("Do you Really Want to save?", vbYesNo) If a = vbYes Then REC.AddNew TEXTTORECORD REC.Update MsgBox ("Your Record is Save") Else MsgBox "Your Record is Not Save" End If Customer Data Entry
78
CmdSave.Enabled = False CmdNew.Enabled = True CmdModify(0).Enabled = True CmdDelete.Enabled = True End Sub Private Sub CmdSearch_Click() Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True a = TxtName.Text REC.MoveFirst If Combo1.Text = "Order No" Then a = CInt(TxtName.Text) Do While Not REC.EOF = True If REC.Fields(1) = a Then flag = 1 recordtotext Exit Sub Else REC.MoveNext flag = 0 End If Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" End If ElseIf Combo1.Text = "Product Name" Then a = CStr(TxtName.Text) Do While Not REC.EOF = True If REC.Fields(2) = a Then flag = 1 recordtotext Exit Sub Else REC.MoveNext flag = 0 End If Customer Data Entry 79
Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" End If ElseIf Combo1.Text = "Company Name" Then a = CStr(TxtName.Text) Do While Not REC.EOF = True If REC.Fields(3) = a Then flag = 1 recordtotext Exit Sub Else REC.MoveNext flag = 0 End If Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" End If End If End Sub Private Sub CmdShowall_Click() frmDailyReportAll.Show End Sub Private Sub Form_Load() Set CON = New ADODB.Connection CON.Open "dsn=AMAR" Set REC = New ADODB.Recordset REC.Open "select * from DAILYENTRY", CON, adOpenDynamic, adLockOptimistic Text1.Enabled = False Text2.Enabled = False Text3.Enabled = False Text4.Enabled = False Text5.Enabled = False Text6.Enabled = False CmdSave.Enabled = False End Sub Customer Data Entry 80
Private Sub TEXTTORECORD() REC.Fields(1) = Text1.Text REC.Fields(2) = Text2.Text REC.Fields(3) = Text3.Text REC.Fields(4) = Text4.Text REC.Fields(5) = Text5.Text REC.Fields(6) = Text6.Text REC.Fields(0) = DTPicker1.Value End Sub Private Sub recordtotext() Text1.Text = REC.Fields(1) Text2.Text = REC.Fields(2) Text3.Text = REC.Fields(3) Text4.Text = REC.Fields(4) Text5.Text = REC.Fields(5) Text6.Text = REC.Fields(6) DTPicker1.Value = REC.Fields(0) End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text1_Validate(Cancel As Boolean) If (Text1.Text = "") Then MsgBox "Enter Order No." Cancel = True End If End Sub Private Sub Text2_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text2_Validate(Cancel As Boolean) If (Text2.Text = "") Then MsgBox "Enter Product Name" Customer Data Entry 81
Cancel = True End If End Sub Private Sub Text3_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text3_Validate(Cancel As Boolean) If (Text3.Text = "") Then MsgBox "Enter Company Name" Cancel = True End If End Sub Private Sub Text4_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text4_Validate(Cancel As Boolean) If (Text4.Text = "") Then MsgBox "Enter Quantity" Cancel = True End If End Sub Private Sub Text5_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Customer Data Entry 82
Private Sub Text5_Validate(Cancel As Boolean) If (Text5.Text = "") Then MsgBox "Enter Amount" Cancel = True End If End Sub Private Sub Text6_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text6_Validate(Cancel As Boolean) If (Text6.Text = "") Then MsgBox "Enter Bill No." Cancel = True End If End Sub
83
84
Private Sub CmdLast_Click() REC.MoveLast recordtotext Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True End Sub Private Sub CmdModify_Click(Index As Integer) Dim a As Variant a = MsgBox("Do you Really Want to Modify?", vbYesNo) If a = vbYes Then TEXTTORECORD REC.Update MsgBox ("Your Record is Modify") Else MsgBox "Your Record is Not Modify" End If End Sub Private Sub CmdNew_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" Text10.Text = "" Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Customer Data Entry 86
Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True Text1.SetFocus CmdNew.Enabled = False CmdSave.Enabled = True CmdModify(0).Enabled = False CmdDelete.Enabled = False End Sub Private Sub CmdNext_Click() REC.MoveNext If REC.EOF Then MsgBox "Last Record" REC.MovePrevious End If recordtotext Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True End Sub Private Sub CmdPrevious_Click() REC.MovePrevious If REC.BOF Then MsgBox "First Record" REC.MoveNext End If TEXTTORECORD Text1.Enabled = True Text2.Enabled = True Customer Data Entry 87
Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True End Sub Private Sub CmdSave_Click() Dim a As Variant a = MsgBox("Do you Really Want to save?", vbYesNo) If a = vbYes Then REC.AddNew TEXTTORECORD REC.Update MsgBox ("Your Record is Save") Else MsgBox "Your Record is Not Save" End If CmdSave.Enabled = False CmdNew.Enabled = True CmdModify(0).Enabled = True CmdDelete.Enabled = True End Sub Private Sub CmdSearch_Click() Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True a = TxtName.Text REC.MoveFirst Customer Data Entry 88
If Combo1.Text = "Employee Id" Then a = CInt(TxtName.Text) Do While Not REC.EOF = True If REC.Fields(0) = a Then flag = 1 recordtotext Exit Sub Else REC.MoveNext flag = 0 End If Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" End If ElseIf Combo1.Text = "First Name" Then a = CStr(TxtName.Text) Do While Not REC.EOF = True If REC.Fields(1) = a Then flag = 1 recordtotext Exit Sub Else REC.MoveNext flag = 0 End If Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" End If ElseIf Combo1.Text = "Post of Person" Then a = CStr(TxtName.Text) Do While Not REC.EOF = True If REC.Fields(3) = a Then flag = 1 recordtotext Exit Sub Else REC.MoveNext flag = 0 End If Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" Customer Data Entry 89
End If End If End Sub Private Sub CmdShowall_Click() frmEmployeeInfoAll.Show End Sub Private Sub Form_Load() Set CON = New ADODB.Connection CON.Open "dsn=AMAR" Set REC = New ADODB.Recordset REC.Open "select * from EMPLOYEEINFO", CON, adOpenDynamic, adLockOptimistic Text1.Enabled = False Text2.Enabled = False Text3.Enabled = False Text4.Enabled = False Text5.Enabled = False Text6.Enabled = False Text7.Enabled = False Text8.Enabled = False Text9.Enabled = False Text10.Enabled = False CmdSave.Enabled = False End Sub Private Sub TEXTTORECORD() REC.Fields(0) = Text1.Text REC.Fields(6) = DTPicker1.Value REC.Fields(7) = DTPicker2.Value REC.Fields(1) = Text2.Text REC.Fields(2) = Text3.Text REC.Fields(3) = Text4.Text REC.Fields(4) = Text5.Text REC.Fields(5) = Text6.Text REC.Fields(8) = Text7.Text REC.Fields(9) = Text8.Text REC.Fields(10) = Text9.Text REC.Fields(11) = Text10.Text End Sub Private Sub recordtotext() Text1.Text = REC.Fields(0) DTPicker1.Value = REC.Fields(6) Customer Data Entry 90
DTPicker2.Value = REC.Fields(7) Text2.Text = REC.Fields(1) Text3.Text = REC.Fields(2) Text4.Text = REC.Fields(3) Text5.Text = REC.Fields(4) Text6.Text = REC.Fields(5) Text7.Text = REC.Fields(8) Text8.Text = REC.Fields(9) Text9.Text = REC.Fields(10) Text10.Text = REC.Fields(11) End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text1_Validate(Cancel As Boolean) If (Text1.Text = "") Then MsgBox "Enter Employee Id" Cancel = True End If End Sub Private Sub Text9_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text9_Validate(Cancel As Boolean) If (Text9.Text = "") Then MsgBox "Enter Pin Code" Cancel = True End If End Sub Private Sub Text10_Validate(Cancel As Boolean) If (Text10.Text = "") Then MsgBox "Enter Email Id" Cancel = True End If End Sub Private Sub Text2_KeyPress(KeyAscii As Integer) Customer Data Entry 91
If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text2_Validate(Cancel As Boolean) If (Text2.Text = "") Then MsgBox "Enter First Name" Cancel = True End If End Sub Private Sub Text3_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text3_Validate(Cancel As Boolean) If (Text3.Text = "") Then MsgBox "Enter Lst Name" Cancel = True End If End Sub Private Sub Text4_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text4_Validate(Cancel As Boolean) If (Text4.Text = "") Then MsgBox "Enter Post of Person" Cancel = True End If End Sub Customer Data Entry 92
Private Sub Text5_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text5_Validate(Cancel As Boolean) If (Text5.Text = "") Then MsgBox "Enter Mobile No" Cancel = True End If End Sub Private Sub Text6_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text6_Validate(Cancel As Boolean) If (Text6.Text = "") Then MsgBox "Enter Phone No" Cancel = True End If End Sub Private Sub Text7_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub
93
Private Sub Text7_Validate(Cancel As Boolean) If (Text7.Text = "") Then MsgBox "Enter Address" Cancel = True End If End Sub Private Sub Text8_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text8_Validate(Cancel As Boolean) If (Text8.Text = "") Then MsgBox "Enter City Name" Cancel = True End If End Sub
94
95
Private Sub CmdLast_Click() REC.MoveLast recordtotext Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True End Sub Private Sub CmdModify_Click(Index As Integer) Dim a As Variant a = MsgBox("Do you Really Want to Modify?", vbYesNo) If a = vbYes Then TEXTTORECORD REC.Update MsgBox ("Your Record is Modify") Else MsgBox "Your Record is Not Modify" End If End Sub Private Sub CmdNew_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Customer Data Entry 98
Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text1.SetFocus CmdNew.Enabled = False CmdSave.Enabled = True CmdModify(0).Enabled = False CmdDelete.Enabled = False End Sub Private Sub CmdNext_Click() REC.MoveNext If REC.EOF Then MsgBox "Last Record" REC.MovePrevious End If recordtotext Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True End Sub Private Sub CmdPrevious_Click() REC.MovePrevious If REC.BOF Then MsgBox "First Record" REC.MoveNext End If TEXTTORECORD Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Customer Data Entry 99
Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True End Sub Private Sub CmdSave_Click() Dim a As Variant a = MsgBox("Do you Really Want to save?", vbYesNo) If a = vbYes Then REC.AddNew TEXTTORECORD REC.Update MsgBox ("Your Record is Save") Else MsgBox "Your Record is Not Save" End If CmdSave.Enabled = False CmdNew.Enabled = True CmdModify(0).Enabled = True CmdDelete.Enabled = True End Sub Private Sub CmdSearch_Click() Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True a = TxtName.Text REC.MoveFirst If Combo1.Text = "Product Id" Then a = CInt(TxtName.Text) Do While Not REC.EOF = True If REC.Fields(0) = a Then flag = 1 Customer Data Entry 100
recordtotext Exit Sub Else REC.MoveNext flag = 0 End If Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" End If ElseIf Combo1.Text = "Product Name" Then a = CStr(TxtName.Text) Do While Not REC.EOF = True If REC.Fields(1) = a Then flag = 1 recordtotext Exit Sub Else REC.MoveNext flag = 0 End If Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" End If ElseIf Combo1.Text = "Manufacturer" Then a = CStr(TxtName.Text) Do While Not REC.EOF = True If REC.Fields(2) = a Then flag = 1 recordtotext Exit Sub Else REC.MoveNext flag = 0 End If Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" End If End If End Sub Customer Data Entry 101
Private Sub CmdShowall_Click() frmProductInfoAll.Show End Sub Private Sub Form_Load() Set CON = New ADODB.Connection CON.Open "dsn=AMAR" Set REC = New ADODB.Recordset REC.Open "select * from PRODUCTINFO", CON, adOpenDynamic, adLockOptimistic Text1.Enabled = False Text2.Enabled = False Text3.Enabled = False Text4.Enabled = False Text5.Enabled = False Text6.Enabled = False Text7.Enabled = False Text8.Enabled = False Text9.Enabled = False CmdSave.Enabled = False End Sub Private Sub TEXTTORECORD() REC.Fields(0) = Text1.Text REC.Fields(1) = Text2.Text REC.Fields(2) = Text3.Text REC.Fields(3) = Text4.Text REC.Fields(4) = Text5.Text REC.Fields(5) = Text6.Text REC.Fields(6) = Text7.Text REC.Fields(7) = Text8.Text REC.Fields(8) = Text9.Text End Sub Private Sub recordtotext() Text1.Text = REC.Fields(0) Text2.Text = REC.Fields(1) Text3.Text = REC.Fields(2) Text4.Text = REC.Fields(3) Text5.Text = REC.Fields(4) Text6.Text = REC.Fields(5) Text7.Text = REC.Fields(6) Text8.Text = REC.Fields(7) Text9.Text = REC.Fields(8) End Sub Customer Data Entry 102
Private Sub Text1_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text1_Validate(Cancel As Boolean) If (Text1.Text = "") Then MsgBox "Enter Product Id" Cancel = True End If End Sub Private Sub Text2_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text2_Validate(Cancel As Boolean) If (Text2.Text = "") Then MsgBox "Enter Product Name" Cancel = True End If End Sub Private Sub Text3_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text3_Validate(Cancel As Boolean) If (Text3.Text = "") Then MsgBox "Enter Manufacturer Name" Cancel = True End If End Sub
103
Private Sub Text4_Validate(Cancel As Boolean) If (Text4.Text = "") Then MsgBox "Enter Model No" Cancel = True End If End Sub Private Sub Text5_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text5_Validate(Cancel As Boolean) If (Text5.Text = "") Then MsgBox "Enter Quantity" Cancel = True End If End Sub Private Sub Text6_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text6_Validate(Cancel As Boolean) If (Text6.Text = "") Then MsgBox "Enter Cost of Single Piece" Cancel = True End If End Sub Private Sub Text7_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub
104
Private Sub Text7_Validate(Cancel As Boolean) If (Text7.Text = "") Then MsgBox "Enter Specification 1" Cancel = True End If End Sub Private Sub Text8_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text8_Validate(Cancel As Boolean) If (Text8.Text = "") Then MsgBox "Enter Specification 2" Cancel = True End If End Sub Private Sub Text9_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text9_Validate(Cancel As Boolean) If (Text9.Text = "") Then MsgBox "Enter Specification 3" Cancel = True End If End Sub
105
106
107
Private Sub CmdLast_Click() REC.MoveLast recordtotext Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True End Sub Private Sub CmdModify_Click(Index As Integer) Dim a As Variant a = MsgBox("Do you Really Want to Modify?", vbYesNo) If a = vbYes Then TEXTTORECORD REC.Update MsgBox ("Your Record is Modify") Else MsgBox "Your Record is Not Modify" End If End Sub Private Sub CmdNew_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Customer Data Entry 108
Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text1.SetFocus CmdNew.Enabled = False CmdSave.Enabled = True CmdModify(0).Enabled = False CmdDelete.Enabled = False End Sub Private Sub CmdNext_Click() REC.MoveNext If REC.EOF Then MsgBox "Last Record" REC.MovePrevious End If recordtotext Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True End Sub Private Sub CmdPrevious_Click() REC.MovePrevious If REC.BOF Then MsgBox "First Record" REC.MoveNext End If TEXTTORECORD Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Customer Data Entry 109
Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True End Sub Private Sub CmdSave_Click() Dim a As Variant a = MsgBox("Do you Really Want to save?", vbYesNo) If a = vbYes Then REC.AddNew TEXTTORECORD REC.Update MsgBox ("Your Record is Save") Else MsgBox "Your Record is Not Save" End If CmdSave.Enabled = False CmdNew.Enabled = True CmdModify(0).Enabled = True CmdDelete.Enabled = True End Sub Private Sub CmdSearch_Click() Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True a = TxtName.Text REC.MoveFirst If Combo1.Text = "Order No" Then a = CInt(TxtName.Text) Do While Not REC.EOF = True If REC.Fields(0) = a Then flag = 1 recordtotext Exit Sub Else Customer Data Entry 110
REC.MoveNext flag = 0 End If Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" End If ElseIf Combo1.Text = "Manufacturer" Then a = CStr(TxtName.Text) Do While Not REC.EOF = True If REC.Fields(1) = a Then flag = 1 recordtotext Exit Sub Else REC.MoveNext flag = 0 End If Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" End If ElseIf Combo1.Text = "Supplier Id" Then a = CInt(TxtName.Text) Do While Not REC.EOF = True If REC.Fields(6) = a Then flag = 1 recordtotext Exit Sub Else REC.MoveNext flag = 0 End If Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" End If \End If End Sub Private Sub CmdShowall_Click() frmPurchaseInfoAll.Show End Sub Customer Data Entry 111
Private Sub Form_Load() Set CON = New ADODB.Connection CON.Open "dsn=AMAR" Set REC = New ADODB.Recordset REC.Open "select * from PURCHASEINFO", CON, adOpenDynamic, adLockOptimistic Text1.Enabled = False Text2.Enabled = False Text3.Enabled = False Text4.Enabled = False Text5.Enabled = False Text6.Enabled = False Text7.Enabled = False Text8.Enabled = False Text9.Enabled = False CmdSave.Enabled = False End Sub Private Sub TEXTTORECORD() REC.Fields(0) = Text1.Text REC.Fields(1) = Text2.Text REC.Fields(2) = Text3.Text REC.Fields(3) = Text4.Text REC.Fields(4) = Text5.Text REC.Fields(5) = Text6.Text REC.Fields(6) = Text7.Text REC.Fields(7) = DTPicker1.Value REC.Fields(8) = Text8.Text REC.Fields(9) = Text9.Text End Sub Private Sub recordtotext() Text1.Text = REC.Fields(0) Text2.Text = REC.Fields(1) Text3.Text = REC.Fields(2) Text4.Text = REC.Fields(3) Text5.Text = REC.Fields(4) Text6.Text = REC.Fields(5) Text7.Text = REC.Fields(6) DTPicker1.Value = REC.Fields(7) Text8.Text = REC.Fields(8) Text9.Text = REC.Fields(9) End Sub Customer Data Entry 112
Private Sub Text1_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text1_Validate(Cancel As Boolean) If (Text1.Text = "") Then MsgBox "Enter Order No" Cancel = True End If End Sub Private Sub Text9_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text9_Validate(Cancel As Boolean) If (Text9.Text = "") Then MsgBox "Enter Total Current Amount" Cancel = True End If End Sub Private Sub Text2_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text2_Validate(Cancel As Boolean) If (Text2.Text = "") Then MsgBox "Enter Manufacturer Name" Cancel = True End If End Sub
56
Private Sub Text3_Validate(Cancel As Boolean) If (Text3.Text = "") Then MsgBox "Enter Model No" Cancel = True End If End Sub Private Sub Text4_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text4_Validate(Cancel As Boolean) If (Text4.Text = "") Then MsgBox "Enter Quantity" Cancel = True End If End Sub Private Sub Text5_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text5_Validate(Cancel As Boolean) If (Text5.Text = "") Then MsgBox "Enter Cost Of Product" Cancel = True End If End Sub Private Sub Text6_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text6_Validate(Cancel As Boolean) If (Text6.Text = "") Then MsgBox "Enter Balance Amount" Cancel = True End If End Sub Customer Data Entry
56
Private Sub Text7_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text7_Validate(Cancel As Boolean) If (Text7.Text = "") Then MsgBox "Enter Supplier Id" Cancel = True End If End Sub
Private Sub Text8_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text8_Validate(Cancel As Boolean) If (Text8.Text = "") Then MsgBox "Enter Recepite No" Cancel = True End If End Sub
56
56
Private Sub CmdModify_Click(Index As Integer) Dim a As Variant a = MsgBox("Do you Really Want to Modify?", vbYesNo) If a = vbYes Then TEXTTORECORD REC.Update MsgBox ("Your Record is Modify") Else MsgBox "Your Record is Not Modify" End If End Sub Private Sub CmdNew_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True DTPicker1.SetFocus CmdNew.Enabled = False CmdSave.Enabled = True CmdModify(0).Enabled = False CmdDelete.Enabled = False End Sub Private Sub CmdNext_Click() REC.MoveNext If REC.EOF Then MsgBox "Last Record" REC.MovePrevious End If recordtotext Text1.Enabled = True Text2.Enabled = True Customer Data Entry 56
Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True End Sub Private Sub CmdPrevious_Click() REC.MovePrevious If REC.BOF Then MsgBox "First Record" REC.MoveNext End If TEXTTORECORD Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True End Sub Private Sub CmdSave_Click() Dim a As Variant a = MsgBox("Do you Really Want to save?", vbYesNo) If a = vbYes Then REC.AddNew TEXTTORECORD REC.Update MsgBox ("Your Record is Save") Else MsgBox "Your Record is Not Save" End If CmdSave.Enabled = False CmdNew.Enabled = True CmdModify(0).Enabled = True CmdDelete.Enabled = True End Sub Private Sub CmdSearch_Click() Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Customer Data Entry 56
a = TxtName.Text REC.MoveFirst If Combo1.Text = "Product Id" Then a = CInt(TxtName.Text) Do While Not REC.EOF = True If REC.Fields(1) = a Then flag = 1 recordtotext Exit Sub Else REC.MoveNext flag = 0 End If Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" End If ElseIf Combo1.Text = "Product Name" Then a = CStr(TxtName.Text) Do While Not REC.EOF = True If REC.Fields(2) = a Then flag = 1 recordtotext Exit Sub Else REC.MoveNext flag = 0 End If Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" End If End If End Sub Private Sub CmdShowall_Click() frmReplacementInfoAll.Show End Sub Private Sub Form_Load() Set CON = New ADODB.Connection CON.Open "dsn=AMAR" Set REC = New ADODB.Recordset REC.Open "select * from REPLACEMENTINFO", CON, adOpenDynamic, adLockOptimistic Customer Data Entry 56
Text1.Enabled = False Text2.Enabled = False Text3.Enabled = False Text4.Enabled = False Text5.Enabled = False CmdSave.Enabled = False End Sub Private Sub recordtotext() DTPicker1.Value = REC.Fields(0) Text1.Text = REC.Fields(1) Text2.Text = REC.Fields(2) Text3.Text = REC.Fields(3) Text4.Text = REC.Fields(4) Text5.Text = REC.Fields(5) End Sub Private Sub TEXTTORECORD() REC.Fields(0) = DTPicker1.Value REC.Fields(1) = Text1.Text REC.Fields(2) = Text2.Text REC.Fields(3) = Text3.Text REC.Fields(4) = Text4.Text REC.Fields(5) = Text5.Text End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text1_Validate(Cancel As Boolean) If (Text1.Text = "") Then MsgBox "enter product id" Cancel = True End If End Sub
56
Private Sub Text2_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text2_Validate(Cancel As Boolean) If (Text2.Text = "") Then MsgBox "enter product name" Cancel = True End If End Sub Private Sub Text3_Validate(Cancel As Boolean) If (Text3.Text = "") Then MsgBox "enter model no" Cancel = True End If End Sub Private Sub Text4_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text4_Validate(Cancel As Boolean) If (Text4.Text = "") Then MsgBox "enter old serial no" Cancel = True End If End Sub Private Sub Text5_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub
56
Private Sub Text5_Validate(Cancel As Boolean) If (Text5.Text = "") Then MsgBox "enter new serial no" Cancel = True End If End Sub
56
56
Option Explicit Dim CON As ADODB.Connection Dim REC As ADODB.Recordset Dim a As Variant Dim flag As Variant Private Sub CmdFirst_Click() REC.MoveFirst recordtotext End Sub Private Sub CmdLast_Click() REC.MoveLast recordtotext End Sub Private Sub CmdNext_Click() REC.MoveNext If REC.EOF Then MsgBox "Last Record" REC.MovePrevious End If recordtotext End Sub Private Sub CmdPrevious_Click() REC.MovePrevious If REC.BOF Then MsgBox "First Record" REC.MoveNext End If TEXTTORECORD End Sub Private Sub CmdSearch_Click() a = TxtName.Text REC.MoveFirst If Combo1.Text = "Product Id" Then a = CInt(TxtName.Text) Do While Not REC.EOF = True If REC.Fields(0) = a Then flag = 1 recordtotext Customer Data Entry 56
Exit Sub Else REC.MoveNext flag = 0 End If Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" End If ElseIf Combo1.Text = "Product Name" Then a = CStr(TxtName.Text) Do While Not REC.EOF = True If REC.Fields(1) = a Then flag = 1 recordtotext Exit Sub Else REC.MoveNext flag = 0 End If Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" End If ElseIf Combo1.Text = "Manufacturer" Then a = CStr(TxtName.Text) Do While Not REC.EOF = True If REC.Fields(2) = a Then flag = 1 recordtotext Exit Sub Else REC.MoveNext flag = 0 End If Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" End If End If End Sub
56
Private Sub Form_Load() Set CON = New ADODB.Connection CON.Open "dsn=AMAR" Set REC = New ADODB.Recordset REC.Open "select * from PRODUCTINFO", CON, adOpenDynamic, adLockOptimistic End Sub Private Sub recordtotext() Text1.Text = REC.Fields(0) Text2.Text = REC.Fields(1) Text3.Text = REC.Fields(2) Text4.Text = REC.Fields(3) Text5.Text = REC.Fields(4) Text6.Text = REC.Fields(5) Text7.Text = REC.Fields(6) Text8.Text = REC.Fields(7) Text9.Text = REC.Fields(8) End Sub Private Sub TEXTTORECORD() REC.Fields(0) = Text1.Text REC.Fields(1) = Text2.Text REC.Fields(2) = Text3.Text REC.Fields(3) = Text4.Text REC.Fields(4) = Text5.Text REC.Fields(5) = Text6.Text REC.Fields(6) = Text7.Text REC.Fields(7) = Text8.Text REC.Fields(8) = Text9.Text End Sub
56
56
56
Private Sub CmdLast_Click() REC.MoveLast recordtotext Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True End Sub Private Sub CmdModify_Click(Index As Integer) Dim a As Variant a = MsgBox("Do you Really Want to Modify?", vbYesNo) If a = vbYes Then TEXTTORECORD REC.Update MsgBox ("Your Record is Modify") Else MsgBox "Your Record is Not Modify" End If End Sub Private Sub CmdNew_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" Text10.Text = "" Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Customer Data Entry 56
Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True Text1.SetFocus CmdNew.Enabled = False CmdSave.Enabled = True CmdModify(0).Enabled = False CmdDelete.Enabled = False End Sub Private Sub CmdNext_Click() REC.MoveNext If REC.EOF Then MsgBox "Last Record" REC.MovePrevious End If recordtotext Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True End Sub Private Sub CmdPrevious_Click() REC.MovePrevious If REC.BOF Then MsgBox "First Record" REC.MoveNext End If TEXTTORECORD Text1.Enabled = True Text2.Enabled = True Customer Data Entry 56
Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True End Sub Private Sub CmdSave_Click() Dim a As Variant a = MsgBox("Do you Really Want to save?", vbYesNo) If a = vbYes Then REC.AddNew TEXTTORECORD REC.Update MsgBox ("Your Record is Save") Else MsgBox "Your Record is Not Save" End If CmdSave.Enabled = False CmdNew.Enabled = True CmdModify(0).Enabled = True CmdDelete.Enabled = True End Sub Private Sub CmdSearch_Click() Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True a = TxtName.Text REC.MoveFirst If Combo1.Text = "Supplier Id" Then a = CInt(TxtName.Text) Customer Data Entry 56
Do While Not REC.EOF = True If REC.Fields(0) = a Then flag = 1 recordtotext Exit Sub Else REC.MoveNext flag = 0 End If Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" End If ElseIf Combo1.Text = "Company Name" Then a = CStr(TxtName.Text) Do While Not REC.EOF = True If REC.Fields(1) = a Then flag = 1 recordtotext Exit Sub Else REC.MoveNext flag = 0 End If Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" End If ElseIf Combo1.Text = "Supplier Name" Then a = CStr(TxtName.Text) Do While Not REC.EOF = True If REC.Fields(2) = a Then flag = 1 recordtotext Exit Sub Else REC.MoveNext flag = 0 End If Loop If flag = 0 Then MsgBox "RECORD NOT FOUND" End If Customer Data Entry 56
End If End Sub Private Sub CmdShowall_Click() frmSupplierInfoAll.Show End Sub Private Sub Form_Load() Set CON = New ADODB.Connection CON.Open "dsn=AMAR" Set REC = New ADODB.Recordset REC.Open "select * from SUPPLIERINFO", CON, adOpenDynamic, adLockOptimistic Text1.Enabled = False Text2.Enabled = False Text3.Enabled = False Text4.Enabled = False Text5.Enabled = False Text6.Enabled = False Text7.Enabled = False Text8.Enabled = False Text9.Enabled = False Text10.Enabled = False CmdSave.Enabled = False End Sub Private Sub TEXTTORECORD() REC.Fields(0) = Text1.Text REC.Fields(1) = Text2.Text REC.Fields(2) = Text3.Text REC.Fields(3) = Text4.Text REC.Fields(4) = Text5.Text REC.Fields(5) = Text6.Text REC.Fields(6) = Text7.Text REC.Fields(7) = Text8.Text REC.Fields(8) = Text9.Text REC.Fields(9) = Text10.Text End Sub Private Sub recordtotext() Text1.Text = REC.Fields(0) Text2.Text = REC.Fields(1) Text3.Text = REC.Fields(2) Text4.Text = REC.Fields(3) Customer Data Entry 56
Text5.Text = REC.Fields(4) Text6.Text = REC.Fields(5) Text7.Text = REC.Fields(6) Text8.Text = REC.Fields(7) Text9.Text = REC.Fields(8) Text10.Text = REC.Fields(9) End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text1_Validate(Cancel As Boolean) If (Text1.Text = "") Then MsgBox "Enter Supplier Id" Cancel = True End If End Sub Private Sub Text10_Validate(Cancel As Boolean) If (Text10.Text = "") Then MsgBox "Enter Email id" Cancel = True End If End Sub Private Sub Text2_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text2_Validate(Cancel As Boolean) If (Text2.Text = "") Then MsgBox "Enter Company Name" Cancel = True End If End Sub Private Sub Text3_KeyPress(KeyAscii As Integer)
If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then
56
Private Sub Text3_Validate(Cancel As Boolean) If (Text3.Text = "") Then MsgBox "Enter Supplier Name" Cancel = True End If End Sub Private Sub Text4_KeyPress(KeyAscii As Integer)
If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then
KeyAscii = 0 End If End Sub Private Sub Text4_Validate(Cancel As Boolean) If (Text4.Text = "") Then MsgBox "Enter Post of Person" Cancel = True End If End Sub Private Sub Text5_KeyPress(KeyAscii As Integer)
If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then
KeyAscii = 0 End If End Sub Private Sub Text5_Validate(Cancel As Boolean) If (Text5.Text = "") Then MsgBox "Enter Address" Cancel = True End If End Sub Private Sub Text6_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text6_Validate(Cancel As Boolean) If (Text6.Text = "") Then MsgBox "Enter City Name" Cancel = True End If End Sub Customer Data Entry
56
Private Sub Text7_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text7_Validate(Cancel As Boolean) If (Text7.Text = "") Then MsgBox "Enter Pin Code" Cancel = True End If End Sub Private Sub Text8_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text8_Validate(Cancel As Boolean) If (Text8.Text = "") Then MsgBox "Enter Phone No" Cancel = True End If End Sub Private Sub Text9_KeyPress(KeyAscii As Integer) If Not ((KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii = 8)) Then KeyAscii = 0 End If End Sub Private Sub Text9_Validate(Cancel As Boolean) If (Text9.Text = "") Then MsgBox "Enter Fax No" Cancel = True End If End Sub
56
Hardware Requirements Computer with Windows OS (98 or above) Free space up to 10 MB on hard disk drive Pentium III or higher processor Software Requirements
56
56
Advantages
1. Very less space required to store 2. This package will provide graphical user interface (G.U.I). 3. It provides proper format to store Customer record/s, stock information & supplier details. 4. Easy to operate so no trained person required. 5. Overall tax calculations possible that are associated in buying computer systems.
Disadvantages
1. No provision for printing bills and providing to the customer.
Future Scope
1. New features can be added in future if any required. 2. Can be made adaptable to another OS other than Windows.
56
CONCLUSION
56
Thus we have created a project on CUSTOMER DATA ENTRY named LOGIC SOLUTIONS for a computer hardware shop as a complete toolkit for data record storage of their customers, stocks & suppliers in a proper & formatted order.
56