Vous êtes sur la page 1sur 75

RECORD MANAGEMENT SYSTEM

PROJECTED BY:ANITA .M. GUPTA SADHANA .P. RASTOGI PREETI .P. BHATT ANKITA .J. GAWANKAR (CA-316) (CA-330) (CA-304) (CA-315)

SMT. P.N.DOSHI WOMENS COLLEGE AFFILIATED / CONDUCTED COLLEDGE TO S.N.D.T. WOMENS UNIVERSITY, MUMBAI (2010-2012)

-- PREFACE --

This project is developed with the aim to achieve RECORD MANAGEMENT SYSTEM .This software provides help in effective management of customer and order details with additional features of securityand reduced data inconsistency and redundancy. The following documentaion provides an insight of the existingsystem, its limitataions, the scope for improvements and the logic with its intricate details that is applied to achieve those improvements. I involved in this project has worked with commitment right from the initialization of the project and continuing all the way till its completion. Review of the project is an unending process it may contain errors, as there is always the scope for improvements.

CERTIFICATE
This is certify that Ms.Anita Gupta, Ms.Sadhana Rastogi, Ms.Preeti Bhatt, Ms.Ankita Gawankar has completed the project titled on RECORD MANAGEMENT SYSTEM as per the guideline of the S.N.D.T Womens University, Mumbai.

Project Guide Signature: Name: Date: Organization Name And Seal:

Head/Principal Signature: Name: Date: College Seal:

Internal Examiner Signature: Name: Date:

External Examiner Signature: Name: Date:

-- ACKNOWLEDGEMENT -This satisfaction that accompanies that the successfulCompletion of any task would be incomplete without the Mention of person whose ceaseless cooperation made itPossible, whose constant guidance and encouragement.Crown all effort with success.We are grateful to our project guide Mr. Paresh Gandhi for the guidance, inspiration and constructive Suggestion that Helpful us in the preparations of this project. We also thank our college guide teacher Mrs. Laxmi Pillai, Mrs. Suchita Bhor, Ms. Swati Kanani, Ms. Shruti Verma.And family who have helped in successful Completion of the project.The project would not have been completed without creativity and energy,which my friends provided.

-- INDEX --

Sr.No Title . 1 Introduction. 2 Gantt Chart. 3 Organizational Overview: a. Organization Profile b. Present System. c. Limitations of Present System. 4 Proposed System. 5 Feasibility Test. 6 Software Specifications. 6 System Documentation: 7 a. Dataflow Diagram: 1) Context Level Diagram. 2) Level-1 DFD. b. Event Table. c. System Flowchart. d. Structure chart. e. Menu Tree. f. Program List. h. Tables Used. i. Report List. j. System Coding and Conventions. 8 Program Documentation: a. Form Layout. b. Form Code. c. Testing. 10 Future Development. 11 Conclusion. 12 Bibliography.

Page no. 7 8 9-11

12-14 15 16-18 19-29

30-70

72 73 74

--Introduction -The Purpose of this Presentation is to give a Brief Information about the currently running system (SARGAM PANETAR) and steps performed by to computerize the Record Management System. About The Project: Computerized system allows processing data in variety of ways based on needs Maintain all type of information regarding customer, supplier, order,bill Reliable order processing system Automated updation of stock and generation of sales,purchase reports Automated billing process Automated processes reduce stock Handle large amount of data

--GANTT CHART --

1 1. Project Search. 2. Finalization. 3 3. Allocation. 4. Investigating system Requirements. 5. Data & Process Modeling. 6. System Design. 7. Program Design. 8. Program Coding. 9. Unit Testing. 10. System Integration. 11. Implementation. 12. Testing. 10 11 128 4 5 2

6 7 8 9 10 11 12

w1 w2 w3 26/011 2/011 7/011 12/011

w4 w5 w6 w7 w8 w9 w10 w11 w12 w13 w14 w15 w16 w17 w18 w19 w20 w21 w22 w24 22/011 15/011 29/012 9/012 12/012 5/012 15/012 19/012 24/012 27/012

TIME DURATION

-- PROFILE -Details of the Organization:Name:


Sargam Panetar Specialist in: All types of sarees, chaniya cholies and dress materials

Location:
20 A, gayatri dham, M.G road, next to haribhai kandoi, ghatkopar-East, Mumbai-400070

-- LIMITATION OF PRESENT SYSTEM -9

In present system each an every record is maintained in registers, so there may be chances of data redundancy in maintaining records of Customer and Supplier. Also there is no security as all the records are maintained in register. Modification of one record causes alteration in other related records, so it becomes very tedious and time consuming job to update the registers in case of cancellation of order. Storage of information is costly. Since bills are and accounts are maintained manually human calculation errors may

occur.Hence data entry may be inaccurate. In order to calculate monthly and yearly reports, it is critical job since each register has

to be gone through. There may be chance of inaccurate and incomplete or twice entry of records. Searching any old record of customer requires more time as each register have to be checked.

-- NEED OF COMPUTERIZATION -10

Disadvantages of Existing System: Errors and in consistencies: On registration of a new Customer order the records are

entered in the registers. There is high possibility of inconsistency and errors to occur. Absence of data validation: As storage and transaction of data is achieved only through registers, which lacks validations. There is always risk of invalid, inaccurate and incomplete data entry. Inefficient and slow data retrieval: Many a time there arise need of quick data retrieval for updating or alteration in order status .Lack of proper data retrieval facility make the job tedious. Lack of security: Registers are always vulnerable to illegal access if proper security is not enforced. Adequate security is needed to guard data against malpractices.

-- PROPOSED SYSTEM -11

Benefits of Computerized System: The proposed system will be computerized .So; it will facilitate quick processing of data. The Computerized system will be user friendly, which will not be confusing or time consuming. Stock management will be efficient .so that when the stock is on the way of finishing the user is informed of that. Data present in database will be highly secure. There is no fear of loss of data or data corruption. Searching of records will be easily & more efficiently. There will be no pain to handle large number of registers and bill records. Time and labour work will be saved due to faster access of data. Calculation of invoice and bill will become easier and accurate. No chance of invalid, inaccurate, incomplete or redundancy of data entry since proper validation will be provided for each entry. The proposed system will give accurate and up to date report of weekly, daily, monthly and yearly report will be generated automatically.

12

Features of proposed system: Computer generated forms and bills representing the existing forms used by the user, but with required validations eliminating possibility of bogus data entry. Automation achieved in the process of generation of daily, monthly and weekly reports. Easy and efficient maintenance of records. Software can be easily handled and used with little knowledge of computers. Security will be provided to data storage.

13

Overview of proposed system:The proposed system deals with the computerization of the order processing which deals with following transaction of:1) 2) 3) 4) Details of Customer Details of Supplier Purchase order Sales order

1) Customer: - Customer file contains customer records with their whole details like Customer Id, Name and Address etc. 2) Supplier: - Supplier file contains supplier records with their complete details like Supplier Id, Name, Address, Contact no. etc. 3) Item details: - Item file contains all the description of item such as Item no., description, quantity and rate. 4) Purchase: - Purchase order contains the details of confirmed purchase order. 5) Sales: - Sales order contains the details of confirmed sales order. 6) Report: - Reports are generated with specified details.

14

Feasibility Test
Technical feasibility:
Considering the following aspects, feasibility study is done; the feasibility study is a deciding factor which determines what are the technical resources that are required for designing and developing the system.

Economical feasibility:
Economical feasibility study is the actual cost and benefits of the system. The actual cost of the system is calculated in this study so as to inform the user and the management about the system and also outputs of the benefits. So the actual cost of the system is important before designing of new system. One or more factor regarding the member of years the proposed system would prove beneficial is taken into consideration while designing the system. The required cost of the newly developed system is low; therefore, the system is economically feasible.

Operational feasibility:
1) 2) 3) 4) Total working capacity will be improved. Because of implementation computerized system time is nicely organized. The manpower required for clerical work will be reduced. The system is operationally feasible because of above tested benefits.

15

-- SOFTWARE SPECIFICATION --

Software requirements for the system are as follows:


For our project RECORD MANAGEMENT SYSTEM" we use following software for desire output. Visual Basic

Microsoft Access (All the forms are design in the VB. The MS-ACCESS is used to store the database.

I. Visual Basic (VB)


Visual Basic was designed to be easily learned and used by beginner programmers. The language not only allows programmers to create simple GUI applications, but can also develop complex applications. Programming in VB is a combination of visually arranging components or controls on a form, specifying attributes and actions of those components, and writing additional lines of code for more functionality.

Advantages of VB
The structure of the Basic programming language is very simple

Easy to get a program up & running quickly.

Vb gives interactive development environment ("IDE").

Excellent as a prototyping tool.

Quite cheap. 16

Provide wizards to assist users

II. Microsoft Access


With Microsoft Access, the average user can work with databases without being highly skilled in the field. Microsoft made it easy for just about anyone to learn how to work with databases by replacing some of the complicated work with easy-to-use templates. While using Access can be somewhat of a challenge just because of the extensive options it offers, it's user-friendly enough to have a database up and running before you know it. Advantages of Microsoft access Makes manipulating data manageable for users

Helps to keep records

Provide flexibility

User friendly

Average user can work with databases

Fast & correct result

Easy to understand 17

--ENTITY RELATIONSHIP DIAGRAM--

CUSTOMER

Purcha se order

ORDER

Checks item availabili ty

18

ITEM MASTER

Prepar e

BILL

Pai d

PAYMENT MASTER

19

-- DATA FLOW DIAGRAM --

1. Context Level Diagram:-

Product from the supplier

Stock

Customer

Product enquiry Product and Reciept

Record Management System

Acknowledgement Information

Supplier
Product supply

20

2. Level-1 DFD:-

Owner

Master details Get details

1. 0

Policyholder Master Customer Details Supplier Details Item Details

Input Masters

Supplier Details

Supplier

Order Supply Items

2. 0

Supplier Transaction

Enquiry Details

21

-- EVENT-TABLE -EVENT Owner wants to add new Customer and Supplier Customer wants to place order Owner wants to place order to the Supplier Supplier wants to confirm order Supplier delivers the order TRIGGER Adding New Customer and Supplier Create new Sales Order Create new Purchase Order Order confirmation Order delivery SOURCE Owner ACTIVITY Look up list of Customer and Supplier Look the status of Quotation Place Purchase order Confirm Purchase order Look order details RESPONSE Request confirmed Order confirmation Request order confirmation Order confirmed Order delivery Supplier DESTINATI ON Owner

Customer Owner Supplier Supplier

Customer Supplier Supplier

22

-- SYSTEM FLOW CHART --

Take Customer I/P

Customer Entry Form

Customer Database

Customer Report

Take Item I/P

Take Expense I/P

Item Entry

Expence Entry Form

Item Table

Expense Table

Item Report

Employee Report

Take Supplier I/P

Supplier Entry Form

Supplier Table

Supplier Report

23

-- STRUCTURED CHART --

Record Management System

Owner

Customer

Supplier

Manage Master Records Details Customer details Supplier details Item details

24

--MENU TREE
MDI

Masters Customer Details Supplier Details Item Details Order Details

Transactions

Payment Details Bill Details

View Customer report Supplier report Stock Report Enquiry Report Bill Report

About Exit

25

-- PROGRAM LIST --

Sr. No. 1 2 3 4 5 6 7 8 9

Form Name FrmSplash FrmLogin MDI frm_supplier frm_customer frm_item frm_OrderDetails frm_paydetails frm_About

Description This form provides information about the inventory. This form allows user to make entry in system with valid password This form provides information about system, menus, working session This form provides master information about Supplier and allows new entry of Supplier This form provides master information about the new Customer This form provides information about the Items in the Inventory. This form confirms urchase order or sales order. This form keeps information about the payment mode of the Customer. This form provides information about the System.

26

-- TABLES USED --

1] Table Name: Cust_details: Description: It contains master information of Customer: Field Cust_code Cust_name Cust_add CCity CPhone CMobile Email Fax CState CPincode Data type Number Text Text Text Number Number Text Number Text Number Size 10 15 50 12 10 15 30 10 15 15 Description Contains the Customer code Contains the Customer name Contains the Customer address Contains the Customer city Contains the contact number of the Customer Contains the mobile number of the Customer Contains the Email Id of Customer Contains the Fax number of the Customer Contains the state of Customer Contains the Pin number

2] Table Name: Supplier_details: Description: It contains master information of Supplier: Field Sup_code Sup_name Sup_add City Phone Mobile Email Fax State Pincode Data type Number Text Text Text Number Number Text Number Text Number Size 10 15 50 12 10 15 30 10 15 15 Description Contains the Supplier code Contains the Supplier name Contains the Supplier address Contains the Supplier city Contains the contact number of the Supplier Contains the mobile number of the Supplier Contains the Email Id of Supplier Contains the Fax number of the Supplier Contains the state of Supplier Contains the Pin number

27

3] Table Name: Item_details: Description: It contains master information of items in the inventory: Field Item_code Item_name Descrip Maxqty Qty Minqty Pur_rate Sale_rate Category Data type Text Text Text Number Number Number Number Number Text Size 10 15 15 10 10 7 10 10 15 Description Contains the Item code Contains the Item name Contains the description of Item Contains the maximum quantity of Item in Inventory Contains the current quantity of item in the inventory Contains the minimum quantity of items in the inventory Contains the purchase rate of item Contains the sales rate of item Contains the category of the item

4] Table Name: Order_Details: Description: It contains information of order details. Field Order_no Order_dt Quote_no Sup_code/Cust_code Amt_paid Bal_amt Data type Text Date/Time Text Text Number Number Size 5 5 5 10 10 Description Contains order number. Contains order date.. Contains quotation number. Contains customer code or supplier code. Contains amount paid. Contains balance amount to be paid.

5] Table Name: Pay_details:

Description: It contains information of the bill payment mode. Field Pay_no Order_no Bill_no Pay_mode Amt_paid Bal_amt Pay_Date Data type Text Text Text Text Number Number Date/Time Size 5 5 5 10 10 10 Description Contains payment number. Contains order number. Contains bill number. Contains payment mode. Contains amount paid. Contains balance amount to be paid. Contains payment date.

28

-- REPORTS LIST --

Sr. No. 1 2 3

Report Name RptSup RptCust RptItem

Description This report provides Supplier records This report provides Customer records This report provides stock report

29

-- SYSTEM CODING & CONVENTIONS -1] Common module for all forms: Module Name Module1.bas SrNo. 1 2 3 4 5 6 7 8 9 10 Variables Con Rs rs1 Rspay Rscust Rssup Rsitem rseq_sup Rssearch Rsorder Type Connection Recordset Recordset Recordset Recordset Recordset Recordset Recordset Recordset Recordset Description To connect to Database. To add details in login table. To generate id To update details in payment table. To update details in Customer table. To update details in Supplier table. To update details in item table. To add details enquiry supplier To add details search To update details in order table.

30

--PROGRAM DOCUMENTATION--

-- SPLASH SCREEN

31

CODE:
Option Explicit Private Sub Form_KeyPress(KeyAscii As Integer) Unload Me End Sub Private Sub Form_Load() Set con = New ADODB.Connection con.Open "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\inventory.mdb;persist security info=false" End Sub Private Sub Frame1_Click() Unload Me End Sub Private Sub Timer1_Timer() pg1.Value = pg1.Value + 10 If pg1.Value >= pg1.Max Then Timer1.Enabled = False Unload Me Load frmLogin frmLogin.Show End If End Sub

32

-- LOGIN FORM

33

CODE:
Option Explicit Private Sub cmd_cancel_Click() End Unload Me End Sub Private Sub cmd_OK_Click() If txt_Username.Text = Empty Or txt_Password.Text = Empty Then MsgBox "Please fill the textbox....", vbInformation, "record management system" If txt_Username.Text = "" Then txt_Username.SetFocus Else txt_Username.SetFocus End If Exit Sub End If Set rs = New ADODB.Recordset rs.CursorLocation = adUseClient rs.Open "select user_id ,user_name,Pword from login where user_name='" & txt_Username & "'and Pword='" & txt_Password & "'", con, adOpenDynamic, adLockOptimistic If rs.RecordCount > 0 Then If Mid(rs.Fields("user_id").Value, 1, 1) = "A" Then MDIInventory.mnu_admins.Visible = True Else MDIInventory.mnu_admins.Visible = False End If Unload Me Load MDIInventory MDIInventory.Show Else MsgBox "Invalid login..., try again!", vbInformation, " record management system " txt_Password.Text = "" txt_Password.SetFocus End If Unload Me End Sub

34

-- MDI FORM

35

CODE:
Private Sub MDIForm_Load() Set con = New ADODB.Connection con.Open "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\inventory.mdb;persist security info=false" End Sub Private Sub mnu_about_Click() Load frmAbout frmAbout.Show frmAbout.SetFocus End Sub Private Sub mnu_bd_Click() Load frm_BillDetails frm_BillDetails.Show frm_BillDetails.SetFocus End Sub Private Sub mnu_cd_Click() MDIInventory.Arrange (vbCascade) End Sub Private Sub mnu_custd_Click() Load frm_customer frm_customer.Show frm_customer.SetFocus End Sub Private Sub mnu_enquiryout_Click() Load frm_enquiryout frm_enquiryout.Show End Sub Private Sub mnu_custrpt_Click() Set exApplication = CreateObject("Excel.Application") Dim wSheet As Object Dim wBook As Object Set wBook = exApplication.Workbooks.Open(App.Path & "\Book1.xls") Set wSheet = wBook.Worksheets(1) exApplication.Visible = True Dim i As Integer wSheet.Unprotect ("") Set rscustrpt = New ADODB.Recordset i = 12 rscustrpt.Open "Select * from Cust_details ", con, adOpenDynamic, adLockOptimistic 36

While Not rscustrpt.EOF wSheet.range("A" & i) = rscustrpt.Fields("Cust_code") wSheet.range("B" & i) = rscustrpt.Fields("Cust_name") wSheet.range("C" & i) = rscustrpt.Fields("Cust_add") wSheet.range("D" & i) = rscustrpt.Fields("CPhone") wSheet.range("E" & i) = rscustrpt.Fields("Email") wSheet.range("F" & i) = rscustrpt.Fields("Fax") rscustrpt.MoveNext i=i+1 Wend wSheet.Protect End Sub Private Sub mnu_exit_Click() Load frmExit frmExit.Show End Sub Private Sub mnu_itemdetails_Click() Load frm_item frm_item.Show frm_item.SetFocus End Sub Private Sub mnu_orderdetails_Click() Load frm_OrderDetails frm_OrderDetails.Show frm_OrderDetails.SetFocus End Sub Private Sub mnu_pay_Click() Load frm_paydetails frm_paydetails.Show End Sub Private Sub mnu_porder_Click() Load frm_OrderDetails frm_OrderDetails.Show frm_OrderDetails.SetFocus End Sub Private Sub mnu_purrpt_Click() Purrpt.DataFiles(0) = App.Path & "/inventory.mdb" Purrpt.DiscardSavedData = True Purrpt.Action = 1 End Sub Private Sub mnu_s_Click() 37

Load frm_search frm_search.Show End Sub Private Sub mnu_search_Click() Load frm_search frm_search.Show End Sub Private Sub mnu_sales_Click() Salesrpt.DataFiles(0) = App.Path & "/inventory.mdb" Salesrpt.DiscardSavedData = True Salesrpt.Action = 1 End Sub Private Sub mnu_stockrpt_Click() Set exApplication = CreateObject("Excel.Application") Dim wSheet As Object Dim wBook As Object Set wBook = exApplication.Workbooks.Open(App.Path & "\Book1.xls") Set wSheet = wBook.Worksheets(3) exApplication.Visible = True wSheet.Activate wSheet.Unprotect ("") Dim i As Integer Set rsitemrpt = New ADODB.Recordset i = 13 rsitemrpt.Open "Select * from Item_details ", con, adOpenDynamic, adLockOptimistic While Not rsitemrpt.EOF wSheet.range("A" & i) = rsitemrpt.Fields("Item_code") wSheet.range("B" & i) = rsitemrpt.Fields("Item_name") wSheet.range("C" & i) = rsitemrpt.Fields("Descrip") wSheet.range("D" & i) = rsitemrpt.Fields("Qty") wSheet.range("E" & i) = rsitemrpt.Fields("Pur_rate") wSheet.range("F" & i) = rsitemrpt.Fields("Maxqty") rsitemrpt.MoveNext i=i+1 Wend wSheet.Protect End Sub Private Sub mnu_supd_Click() Load frm_supplier frm_supplier.Show frm_supplier.SetFocus End Sub Private Sub mnu_suprpt_Click() Set exApplication = CreateObject("Excel.Application") 38

Dim wSheet As Object Dim wBook As Object Set wBook = exApplication.Workbooks.Open(App.Path & "\Book1.xls") Set wSheet = wBook.Worksheets(2) exApplication.Visible = True wSheet.Activate Dim i As Integer wSheet.Unprotect ("") Set rssuprpt = New ADODB.Recordset i = 12 rssuprpt.Open "Select * from Supplier_details ", con, adOpenDynamic, adLockOptimistic While Not rssuprpt.EOF wSheet.range("A" & i) = rssuprpt.Fields("Sup_code") wSheet.range("B" & i) = rssuprpt.Fields("Sup_name") wSheet.range("C" & i) = rssuprpt.Fields("Sup_add") wSheet.range("D" & i) = rssuprpt.Fields("Phone") wSheet.range("E" & i) = rssuprpt.Fields("Email") wSheet.range("F" & i) = rssuprpt.Fields("Pincode") rssuprpt.MoveNext i=i+1 Wend wSheet.Protect End Sub Private Sub mnu_Th_Click() MDIInventory.Arrange (vbHorizontal) End Sub Private Sub mnu_tool_Click() Load frm_utilitytool frm_utilitytool.Show End Sub Private Sub mnu_Tv_Click() MDIInventory.Arrange (vbVertical) End Sub

39

-- CUSTOMER DETAILS --

40

-- SUPPLIER DETAILS

41

CODE:
Dim flag As Integer Dim exApplication As Object Public rssuprpt As New ADODB.Recordset Private Sub cmd_exit_Click() Unload frm_supplier End Sub Private Sub cmd_first_Click() If rssup.EOF = True And rssup.BOF = True Then MsgBox "NO RECORDS IN THE TABLE" Exit Sub Else rssup.MoveFirst Call getData End If cmd_modify.Enabled = True cmd_del.Enabled = True fm_supinf.Enabled = False End Sub Private Sub cmd_modify_Click() flag = 2 fm_supinf.Enabled = True cmd_save.Enabled = True cmd_cancel.Enabled = True fm_dis.Enabled = False End Sub Private Sub cmd_cancel_Click() Call clearText txt_supcode = "" cmd_save.Enabled = False cmd_modify.Enabled = False cmd_new.Enabled = True cmd_del.Enabled = False cmd_cancel.Enabled = False fm_supinf.Enabled = False fm_dis.Enabled = True rs.MoveFirst End Sub Private Sub cmd_del_Click() Dim del As Integer 42

del = MsgBox("Are you sure you want to delete current record?", vbYesNo, "Comfirm record Deletion") If del = 6 Then cmd.CommandText = "delete from Supplier_details where sup_code='" & txt_supcode & "'" cmd.CommandType = adCmdText cmd.Execute rssup.Requery End If MsgBox "Record deleted successfully...", vbInformation, "Confirm Deletion.." Call clearText txt_supcode = "" fm_supinf.Enabled = True cmd_save.Enabled = True cmd_cancel.Enabled = True End Sub Private Sub cmd_last_Click() If rssup.EOF = True And rssup.BOF = True Then MsgBox "NO RECORDS IN THE TABLE" Exit Sub Else rssup.MoveLast Call getData End If cmd_modify.Enabled = True cmd_del.Enabled = True fm_supinf.Enabled = False End Sub Private Sub cmd_new_Click() flag = 1 Dim no As String Set rs = New ADODB.Recordset rs.CursorLocation = adUseClient rs.Open "select * from Supplier_details order by Sup_code", con, adOpenDynamic, adLockOptimistic If Not rs.EOF = True Then rs.MoveLast no = "Sup" & Val(Mid(rs.Fields(0).Value, 4)) + 1 txt_supcode.Text = no Else no = "Sup1" txt_supcode.Text = no End If Call clearText Call showButton fm_supinf.Enabled = True cmd_save.Enabled = True cmd_cancel.Enabled = True 43

fm_dis.Enabled = False txt_supname.SetFocus rs.Close rs.Open "select * from Supplier_details", con, adOpenDynamic, adLockOptimistic End Sub Private Sub cmd_next_Click() If rssup.EOF = True And rssup.BOF = True Then MsgBox "NO RECORDS IN THE TABLE" Exit Sub Else rssup.MoveNext If rssup.EOF Then rssup.MoveFirst End If End If Call getData cmd_modify.Enabled = True cmd_del.Enabled = True fm_supinf.Enabled = False End Sub Private Sub cmd_pre_Click() If rssup.EOF = True And rssup.BOF = True Then MsgBox "NO RECORDS IN THE TABLE" Exit Sub Else rscust.MovePrevious If rssup.BOF Then rssup.MoveLast End If End If Call getData cmd_modify.Enabled = True cmd_del.Enabled = True End Sub Private Sub cmd_save_Click() Dim ins As String If Len(Trim(txt_supname.Text)) = 0 Then MsgBox "Please specify Supplier name.", vbInformation, " Record Management system." txt_supname.SetFocus Exit Sub End If If Len(Trim(txt_supadd.Text)) = 0 Then MsgBox "Please specify the address.", vbInformation, "Record Management system" txt_supadd.SetFocus Exit Sub End If 44

Dim x As Integer If txt_email.Text = "" Then MsgBox "Please enter Email-id " txt_email.SetFocus Exit Sub Else x = InStr(1, txt_email.Text, "@", vbTextCompare) If x > 0 Then If InStr(x, txt_email.Text, ".", vbTextCompare) <= 0 Then MsgBox "Please enter Proper Email-id " txt_email.SetFocus Exit Sub End If Else MsgBox "Please enter Proper Email-id " txt_email.SetFocus Exit Sub End If End If If Len(Trim(txt_mobile.Text)) = 0 Then MsgBox "Please specify contact no.", vbInformation, " Record Management system.." txt_mobile.SetFocus Exit Sub End If If Len(Trim(txt_phone.Text)) = 0 Then MsgBox "Please specify contact no.", vbInformation, " Record Management system.." txt_phone.SetFocus Exit Sub End If If Len(Trim(txt_pin.Text)) = 0 Then MsgBox "Please specify the pincode.", vbInformation, " Record Management system.." txt_pin.SetFocus Exit Sub End If If flag = 1 Then ins = "insert into Supplier_details values ('" & txt_supcode & "','" & txt_supname & "','" & txt_supadd & "','" & txt_phone & "','" & txt_mobile & "','" & txt_email & "','" & txt_fax & "','" & txt_pin & "')" MsgBox "Record saved successfully...", vbInformation, "Confirm Insertion.." End If If flag = 2 Then txt_supname.SetFocus ins = " update Supplier_details set Sup_name='" & txt_supname & _ "',Sup_add='" & txt_supadd & _ "',Phone='" & txt_phone & "',Mobileno='" & txt_mobile & _ "',Email='" & txt_email & _ "',Fax='" & txt_fax & _ "',Pincode='" & txt_pin & _ "'where sup_code='" & txt_supcode & "'" End If 45

Set cmd = New ADODB.Command cmd.CommandType = adCmdText cmd.ActiveConnection = con cmd.CommandText = ins cmd.Execute rssup.Requery cmd_save.Enabled = False cmd_cancel.Enabled = False cmd_new.Enabled = True cmd_modify.Enabled = True cmd_del.Enabled = True fm_dis.Enabled = True fm_supinf.Enabled = False End Sub Public Sub clearText() txt_supname.Text = "" txt_email.Text = "" txt_fax.Text = "" txt_mobile.Text = "" txt_phone.Text = "" txt_pin.Text = "" txt_supadd.Text = "" End Sub Public Sub showButton() cmd_new.Enabled = False cmd_save.Enabled = True cmd_modify.Enabled = False cmd_del.Enabled = False End Sub Public Sub showButton1() cmd_new.Enabled = True cmd_save.Enabled = False cmd_modify.Enabled = True cmd_del.Enabled = True End Sub Public Sub getData() On Error GoTo handleerror If Not rssup.EOF = True And Not rssup.BOF = True Then txt_supcode.Text = rssup.Fields(0).Value txt_supname.Text = rssup.Fields(1).Value txt_supadd.Text = rssup.Fields(2).Value txt_phone.Text = rssup.Fields(3).Value txt_mobile.Text = rssup.Fields(4).Value txt_email.Text = rssup.Fields(5).Value txt_fax.Text = rssup.Fields(6).Value 46

txt_pin.Text = rssup.Fields(7).Value Exit Sub handleerror: MsgBox "Record Can not be displayed!!!", vbOKOnly, "Display Record" Else MsgBox "Table is Empty" End If End Sub Private Sub cmd_search_Click() nm = InputBox("Enter the Supplier Name", "Search") On Error GoTo handleerror If Not nm = "" Then rssup.MoveFirst rssup.Find "Sup_name='" & nm & "'" txt_supcode.Text = rssup.Fields("Sup_code") txt_supname.Text = rssup.Fields("Sup_name") txt_supadd.Text = rssup.Fields("Sup_add") txt_phone.Text = rssup.Fields("Phone") txt_mobile.Text = rssup.Fields("Mobile") txt_email.Text = rssup.Fields("Email") txt_fax.Text = rssup.Fields("Fax") txt_pin.Text = rssup.Fields("Pincode") Exit Sub handleerror: MsgBox "Record Not Found....", vbOKOnly, "Search" End If cmd_cancel.Enabled = True cmd_new.Enabled = True cmd_del.Enabled = True cmd_modify.Enabled = True cmd_search.Enabled = True cmd_save.Enabled = True End Sub Private Sub Form_KeyPress(KeyAscii As Integer) If KeyAscii = 27 Then Unload Me End If End Sub Private Sub Form_Load() fm_supinf.Height = 7095 fm_supinf.Left = 3240 fm_con.Height = 1095 fm_con.Left = 3240 fm_supinf.Enabled = False 47

Set rssup = New ADODB.Recordset rssup.CursorLocation = adUseClient rssup.Open "select * from Supplier_details", con, adOpenDynamic, adLockOptimistic Set cmd = New ADODB.Command cmd.CommandType = adCmdText cmd.ActiveConnection = con Call getData cmd_save.Enabled = False cmd_cancel.Enabled = False End Sub Private Sub Form_Unload(Cancel As Integer) rssup.Close End Sub Private Sub txt_supname_KeyPress(KeyAscii As Integer) If (KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 120) Or KeyAscii = 8 Or KeyAscii = 32 Then Else KeyAscii = 0 End If End Sub Private Sub txt_supadd_KeyPress(KeyAscii As Integer) If (KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 120) Or KeyAscii = 8 Or KeyAscii = 32 Or (KeyAscii >= 48 And KeyAscii <= 57) Then Else KeyAscii = 0 End If End Sub Private Sub txt_fax_KeyPress(KeyAscii As Integer) If (KeyAscii >= 48 And KeyAscii <= 57) Or KeyAscii = 8 Then Else KeyAscii = 0 End If End Sub Private Sub txt_pin_KeyPress(KeyAscii As Integer) If (KeyAscii >= 48 And KeyAscii <= 57) Or KeyAscii = 8 Or KeyAscii = 32 Then Else KeyAscii = 0 End If End Sub

48

Private Sub txt_phone_KeyPress(KeyAscii As Integer) If (KeyAscii >= 48 And KeyAscii <= 57) Or KeyAscii = 8 Then Else KeyAscii = 0 End If End Sub Private Sub txt_mobile_KeyPress(KeyAscii As Integer) If (KeyAscii >= 48 And KeyAscii <= 57) Or KeyAscii = 8 Then Else KeyAscii = 0 End If End Sub

49

-- ITEM DETAILS

50

CODE:
Dim flag As Integer Dim c As String Public rsitemrpt As New ADODB.Recordset Public rscatnm As ADODB.Recordset Private Sub cmd_cancel_Click() Call clearButtons txt_itemcode = "" cmd_save.Enabled = False cmd_modify.Enabled = False cmd_new.Enabled = True cmd_del.Enabled = False cmd_cancel.Enabled = False fm_iteminf.Enabled = False fm_dis.Enabled = True rsitem.MoveFirst End Sub Private Sub cmd_del_Click() Dim c As Integer c = MsgBox("Are you sure you want to delete the racord ?", vbYesNo, "Confirmation") If c = 6 Then cmd.CommandText = "delete from Item_details where Item_code='" & txt_itemcode & "'" cmd.Execute rsitem.Requery End If MsgBox "Record deleted successfully...", vbInformation, "Confirm Deletion.." txt_itemcode = "" Call clearButtons fm_iteminf.Enabled = True cmd_cancel.Enabled = True cmd_save.Enabled = True End Sub Private Sub cmd_exit_Click() Unload frm_item End Sub Private Sub cmd_first_Click() If rsitem.EOF = True And rsitem.BOF = True Then MsgBox "NO RECORDS IN THE TABLE" Exit Sub Else rsitem.MoveFirst Call getData End If 51

fm_iteminf.Enabled = False cmd_modify.Enabled = True cmd_del.Enabled = True End Sub Private Sub cmd_last_Click() If rsitem.EOF = True And rsitem.BOF = True Then MsgBox "NO RECORDS IN THE TABLE" Exit Sub Else rsitem.MoveLast Call getData End If fm_iteminf.Enabled = False cmd_modify.Enabled = True cmd_del.Enabled = True End Sub Private Sub cmd_modify_Click() flag = 2 fm_iteminf.Enabled = True cmd_save.Enabled = True cmd_cancel.Enabled = True fm_dis.Enabled = False End Sub Private Sub cmd_next_Click() If rsitem.EOF = True And rsitem.BOF = True Then MsgBox "NO RECORDS IN THE TABLE" Exit Sub Else rsitem.MoveNext If rsitem.EOF Then rsitem.MoveFirst End If End If Call getData cmd_modify.Enabled = True cmd_del.Enabled = True fm_iteminf.Enabled = False End Sub Private Sub cmd_new_Click() flag = 1 Dim no As String Set rsitem = New ADODB.Recordset rsitem.CursorLocation = adUseClient 52

rsitem.Open "select * from Item_details order by Item_code", con, adOpenDynamic, adLockOptimistic If Not rsitem.EOF = True Then rsitem.MoveLast no = "Item" & Val(Mid(rsitem.Fields(0).Value, 5)) + 1 txt_itemcode.Text = no Else no = "Item1" txt_itemcode.Text = no End If Call clearButtons Call showButton fm_iteminf.Enabled = True cmd_save.Enabled = True cmd_cancel.Enabled = True fm_dis.Enabled = False txt_itemname.SetFocus rsitem.Close rsitem.Open "select * from Item_details", con, adOpenDynamic, adLockOptimistic End Sub Private Sub cmd_pre_Click() If rsitem.EOF = True And rsitem.BOF = True Then MsgBox "NO RECORDS IN THE TABLE" Exit Sub Else rsitem.MovePrevious If rsitem.BOF Then rsitem.MoveLast End If End If Call getData cmd_modify.Enabled = True cmd_del.Enabled = True fm_iteminf.Enabled = False End Sub Private Sub cmd_save_Click() Dim ins As String If Len(Trim(txt_itemname.Text)) = 0 Then MsgBox "Please specify Item name.", vbInformation, "Record Management System.." txt_itemname.SetFocus Exit Sub End If If Len(Trim(txt_descrip.Text)) = 0 Then MsgBox "Please specify Description of the Item", vbInformation, " Record Management System..." txt_descrip.SetFocus Exit Sub End If 53

If Len(Trim(txt_purrate.Text)) = 0 Then MsgBox "Please specify purchase rate.", vbInformation, " Record Management System..." txt_purrate.SetFocus Exit Sub End If If Len(Trim(txt_salerate.Text)) = 0 Then MsgBox "Please specify Sales Rate.", vbInformation, " Record Management System..." Exit Sub End If If Len(Trim(txt_qty.Text)) = 0 Then MsgBox "Please specify Quantity.", vbInformation, " Record Management System..." Exit Sub End If If flag = 1 Then ins = "insert into Item_details values('" & txt_itemcode.Text & "','" & txt_itemname.Text & "','" & txt_descrip.Text & "','" & txt_max.Text & "','" & txt_qty.Text & "','" & txt_min.Text & "','" & txt_purrate.Text & "','" & txt_salerate.Text & "')" MsgBox "Record saved successfully...", vbInformation, "Confirm Insertion.." End If If flag = 2 Then txt_itemname.SetFocus ins = " update Item_details set Item_name='" & txt_itemname.Text & "',Descrip='" & txt_descrip.Text & "',Maxqty='" & txt_max.Text & "',Qty='" & txt_qty.Text & "',Minqty='" & txt_min.Text & "',Pur_rate='" & txt_purrate.Text & "',Sale_rate='" & txt_salerate.Text & "' where Item_code='" & txt_itemcode.Text & "'" MsgBox "Modified record saved successfully...", vbInformation, "Confirm Insertion.." End If Set cmd = New ADODB.Command cmd.CommandType = adCmdText cmd.ActiveConnection = con cmd.CommandText = ins cmd.Execute rsitem.Requery cmd_save.Enabled = False cmd_cancel.Enabled = False cmd_new.Enabled = True cmd_modify.Enabled = True cmd_del.Enabled = True fm_dis.Enabled = True fm_iteminf.Enabled = False rsitem.Requery End Sub Public Sub clearButtons() txt_max.Text = "" txt_min.Text = "" txt_itemname.Text = "" 54

txt_descrip.Text = "" txt_qty.Text = "" txt_purrate.Text = "" txt_salerate.Text = "" End Sub Public Sub showButton() cmd_new.Enabled = False cmd_save.Enabled = True cmd_modify.Enabled = False cmd_del.Enabled = False End Sub Public Sub showButton1() cmd_new.Enabled = True cmd_save.Enabled = False cmd_modify.Enabled = True cmd_del.Enabled = True End Sub Private Sub cmd_search_Click() nm = InputBox("Enter the Item Name", "Search") On Error GoTo handleerror If Not nm = "" Then rsitem.MoveFirst rsitem.Find "Item_name='" & nm & "'" txt_itemcode.Text = rsitem.Fields("Item_code") txt_itemname.Text = rsitem.Fields("Item_name") txt_descrip.Text = rsitem.Fields("Descrip") txt_max.Text = rsitem.Fields("Maxqty") txt_qty.Text = rsitem.Fields("Qty") txt_min.Text = rsitem.Fields("Minqty") txt_purrate.Text = rsitem.Fields("Pur_rate") txt_salerate.Text = rsitem.Fields("Sale_rate") Exit Sub handleerror: MsgBox "Record Not Found....", vbOKOnly, "Search" End If cmd_cancel.Enabled = True cmd_new.Enabled = True cmd_del.Enabled = True cmd_modify.Enabled = True cmd_search.Enabled = True cmd_save.Enabled = True End Sub

55

Private Sub Form_Load() fm_iteminf.Enabled = False Set rsitem = New ADODB.Recordset rsitem.CursorLocation = adUseClient rsitem.Open "select * from Item_details", con, adOpenDynamic, adLockOptimistic If Not rsitem.EOF = True And Not rsitem.BOF = True Then Set cmd = New ADODB.Command cmd.CommandType = adCmdText cmd.ActiveConnection = con rsitem.MoveFirst Call getData Else MsgBox "table is empty" End If cmd_save.Enabled = False cmd_cancel.Enabled = False End Sub Public Sub getData() txt_itemcode.Text = rsitem.Fields(0).Value txt_itemname.Text = rsitem.Fields(1).Value txt_descrip.Text = rsitem.Fields(2).Value txt_max.Text = rsitem.Fields(3).Value txt_qty.Text = rsitem.Fields(4).Value txt_min.Text = rsitem.Fields(5).Value txt_purrate.Text = rsitem.Fields(6).Value txt_salerate.Text = rsitem.Fields(7).Value End Sub Private Sub txt_purrate_KeyPress(KeyAscii As Integer) If (KeyAscii >= 48 And KeyAscii <= 57) Or KeyAscii = 46 Or KeyAscii = 8 Then Else KeyAscii = 0 End If End Sub Private Sub txt_itemname_KeyPress(KeyAscii As Integer) If (KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or KeyAscii = 8 Or (KeyAscii >= 48 And KeyAscii <= 57) Or KeyAscii = 32 Then Else KeyAscii = 0 End If End Sub Private Sub txt_qty_KeyPress(KeyAscii As Integer) If (KeyAscii >= 48 And KeyAscii <= 57) Or KeyAscii = 8 Then Else KeyAscii = 0 56

End If End Sub Private Sub txt_salerate_KeyPress(KeyAscii As Integer) If (KeyAscii >= 48 And KeyAscii <= 57) Or KeyAscii = 46 Or KeyAscii = 8 Then Else KeyAscii = 0 End If End Sub

57

-- ORDER DETAILS --

58

CODE:
Dim flag As Integer Private Sub cmd_Exit_Click() frm_OrderDetails.Unload End Sub Private Sub cmd_first_Click() dg2.Visible = True dg1.Visible = False rspur.MoveFirst Call showsearch Call getData fm_purinf.Enabled = False End Sub Private Sub cmd_Back_Click() Unload frm_OrderDetails Load frm_QuoteMaster frm_QuoteMaster.WindowState = 2 frm_QuoteMaster.Show End Sub Private Sub cmd_modify_Click() flag = 2 fm_purinf.Enabled = True cmd_save.Enabled = True cmd_cancel.Enabled = True fm_dis.Enabled = False Call showsearch End Sub Private Sub cmd_cancel_Click() Call clearButtons txt_orderno = "" cmd_save.Enabled = False cmd_modify.Enabled = False cmd_new.Enabled = True cmd_del.Enabled = False cmd_cancel.Enabled = False fm_purinf.Enabled = False fm_dis.Enabled = True rs.MoveFirst End Sub Private Sub cmd_del_Click() Dim del As Integer 59

del = MsgBox("Are you sure you want to delete current record?", vbYesNo, "Comfirm record Deletion") If del = 6 Then cmd.CommandText = "delete from Pur_order where Purorder_no='" & txt_orderno & "'" cmd.Execute rspur.Requery End If MsgBox "Record deleted successfully...", vbInformation, "Confirm Deletion.." Call clearText txt_orderno = "" Call showsearch fm_purinf.Enabled = True cmd_save.Enabled = True cmd_cancel.Enabled = True End Sub Private Sub cmd_last_Click() dg2.Visible = True dg1.Visible = False rspur.MoveLast Call showsearch Call getData fm_purinf.Enabled = False End Sub Private Sub cmd_new_Click() dg1.Visible = True dg2.Visible = False flag = 1 Dim no As String Set rs = New ADODB.Recordset rs.CursorLocation = adUseClient rs.Open "select * from Order_Details order by Order_no", con, adOpenDynamic, adLockOptimistic If Not rs.EOF = True Then rs.MoveLast no = "Order" & Val(Mid(rs.Fields(0).Value, 6)) + 1 txt_orderno.Text = no Else no = "Order1" txt_orderno.Text = no End If Call clearText Call showButton Set rsquote_details = New ADODB.Recordset rsquote_details.CursorLocation = adUseClient rsquote_details.Open "select Item_code,Qty,Descrip,Rate,Discount,Vat,Price,Total_Amt from Quotation_Detail where Quote_no='" & txtQuote.Text & "'", con, adOpenDynamic, adLockOptimistic Set dg1.DataSource = rsquote_details fm_purinf.Enabled = True 60

cmd_save.Enabled = True cmd_cancel.Enabled = True fm_dis.Enabled = False End Sub Private Sub cmd_next_Click() dg2.Visible = True dg1.Visible = False rspur.MoveNext If rspur.EOF Then rspur.MoveFirst End If Call getData fm_purinf.Enabled = False End Sub Private Sub cmd_pre_Click() dg2.Visible = True dg1.Visible = False rspur.MovePrevious If rspur.BOF Then rspur.MoveLast End If Call showsearch Call getData fm_purinf.Enabled = False End Sub Private Sub cmd_save_Click() Dim ins As String Set cmd = New ADODB.Command cmd.CommandType = adCmdText cmd.ActiveConnection = con If flag = 1 Then ins = "insert into Order_Details values ('" & txt_orderno.Text & "','" & dt_picker1.Value & "','" & txtQuote & "','" & txt_Sup.Text & "','" & txt_Amtpaid & "'," & txt_BalAmt & ")" cmd.CommandText = ins cmd.Execute rsorder.Requery MsgBox "Record saved successfully...", vbInformation, "Confirm Insertion.." End If If flag = 2 Then dc_sup.SetFocus ins = " update Pur_order set Date='" & dt_picker1.Value & _ "',Sup_code='" & dc_sup.Text & _ "',Amt_paid=" & txt_Amtpaid & ",Balance_amt=" & txt_BalAmt & _ ",Item_code='" & dc_item.Text & _ "',Qty=" & txt_qty & ",Quotein_no='" & dc_quote.Text & _ "' where Purorder_no='" & txt_orderno.Text & "'" 61

cmd.Execute End If cmd_save.Enabled = False cmd_cancel.Enabled = False cmd_new.Enabled = True cmd_modify.Enabled = True cmd_del.Enabled = True fm_dis.Enabled = True fm_purinf.Enabled = False Call showsearch End Sub Public Sub clearText() dc_sup.Text = "" dc_item.Text = "" dc_quote.Text = "" txt_qty.Text = "" txt_amtpaid.Text = "" txt_balamt.Text = "" End Sub Public Sub showButton() cmd_new.Enabled = False cmd_save.Enabled = True cmd_modify.Enabled = False cmd_del.Enabled = False End Sub Public Sub showButton1() cmd_new.Enabled = True cmd_save.Enabled = False cmd_modify.Enabled = True cmd_del.Enabled = True End Sub Public Sub getData() If (rsorder.EOF = True And rsorder.BOF = True) Then MsgBox "Table is empty ....", vbOKOnly, "No Data" Exit Sub Else txt_orderno.Text = rsorder.Fields(0).Value dc_item.Text = rs1.Fields(5).Value dc_quote.Text = rsorder.Fields(5).Value txt_Amtpaid.Text = rsorder.Fields(3).Value txt_BalAmt.Text = rsorder.Fields(4).Value txt_itemcode.Text = rs1.Fields(6).Value txt_qty.Text = rs1.Fields(6).Value txt_quote_no.Text = rs1.Fields(8).Value End If 62

End Sub Private Sub cmd_search_Click() cmb_searchcode.Enabled = True If cmb_searchcode.ListIndex = -1 Then MsgBox "Select Supplier code for searching", vbInformation, "Search Engine!!!" cmb_searchcode.SetFocus Else Dim ins As String rspur.MoveFirst Call showsearch If rspur.BOF And rspur.EOF Then MsgBox "Record not found???", vbInformation, "Search Engine!!!" Else Call clearText Call getData End If End If End Sub Private Sub dc_item_Click(Area As Integer) fm_item.Visible = True fm_supinf.Visible = False rsitem.MoveFirst rsitem.Find "Item_code='" & dc_item.Text & "'" If (rsitem.EOF = True) Or (rsitem.BOF = True) Then Else txt_itemcode = rsitem.Fields(0).Value txt_itemname = rsitem.Fields(1).Value txt_descrip = rsitem.Fields(2).Value txt_rate = rsitem.Fields(4).Value End If End Sub Private Sub dc_item_LostFocus() fm_item.Visible = False End Sub Private Sub dc_quote_Click(Area As Integer) Set rsquotei = New ADODB.Recordset rsquotei.CursorLocation = adUseClient rsquotei.Open "select Item_code,Qty from Quote_in where Quotein_no='" & dc_quote.Text & "'", con, adOpenDynamic, adLockOptimistic txt_cust.Text = rsquoteo.Fields(2).Value Set dg1.DataSource = rsquotei rsorder.Find "Quote_no='" & dc_quote.Text & "'" Set rsquote_details = New ADODB.Recordset rsquote_details.CursorLocation = adUseClient 63

rsquote_details.Open "select Item_code,Qty from Quotation_Detail where Quote_no='" & dc_quote.Text & "'", con, adOpenDynamic, adLockOptimistic Set dg1.DataSource = rsquote_details rsquoteo.Find "Quoteo_no='" & dc_quote.Text & "'" End Sub Private Sub dc_sup_Click(Area As Integer) fm_supinf.Visible = True rssup.MoveFirst rssup.Find "sup_code='" & dc_sup.Text & "'" txt_supcode = rssup.Fields(0).Value txt_supname = rssup.Fields(1).Value txt_supadd = rssup.Fields(2).Value txt_phone = rssup.Fields(4).Value End Sub Private Sub dc_sup_LostFocus() fm_supinf.Visible = False End Sub Private Sub Form_KeyPress(KeyAscii As Integer) If KeyAscii = 27 Then Unload Me End If End Sub Private Sub Form_Load() fm_purinf.Enabled = False Set rsorder = New ADODB.Recordset rsorder.CursorLocation = adUseClient rsorder.Open "select * from Order_Details ", con, adOpenDynamic, adLockOptimistic Set rsquote_Master = New ADODB.Recordset rsquote_Master.CursorLocation = adUseClient rsquote_Master.Open "select * from Quotation_Master", con, adOpenDynamic, adLockOptimistic Set cmd = New ADODB.Command cmd.CommandType = adCmdText cmd.ActiveConnection = con rsorder.MoveFirst Call getData For i = 0 To rsorder.Fields.Count - 1 Set dg2.DataSource = rsorder cmd_save.Enabled = False cmd_cancel.Enabled = False End Sub

-- PAYMENT DETAILS -64

CODE: 65

Dim flag As Integer Private Sub cmd_cancel_Click() Call clearButtons txt_order = "" cmd_save.Enabled = False cmd_modify.Enabled = False cmd_new.Enabled = True cmd_del.Enabled = False cmd_cancel.Enabled = False fm_payinf.Enabled = False fm_dis.Enabled = True rs.MoveFirst End Sub Private Sub cmd_del_Click() Dim c As Integer c = MsgBox("Are you sure you want to delete the record ?", vbYesNo, "Confirmation") If c = 6 Then cmd.CommandText = "delete from Pay_details where Pay_no='" & txt_Payno & "'" cmd.Execute rspay.Requery End If Call clearButtons txt_Payno = "" cmd_cancel.Enabled = True cmd_save.Enabled = True fm_payinf.Enabled = False End Sub Private Sub cmd_first_Click() rspay.MoveFirst Call getData fm_payinf.Enabled = False End Sub Private Sub cmd_last_Click() rspay.MoveLast Call getData fm_payinf.Enabled = False End Sub Private Sub cmd_modify_Click() flag = 2 fm_payinf.Enabled = True cmd_save.Enabled = True cmd_cancel.Enabled = True fm_dis.Enabled = False 66

End Sub Private Sub cmd_next_Click() rspay.MoveNext If rspay.EOF Then rspay.MoveFirst End If Call getData fm_payinf.Enabled = False End Sub Private Sub cmd_new_Click() flag = 1 Dim no As String Set rs = New ADODB.Recordset rs.CursorLocation = adUseClient rs.Open "select * from Pay_details order by Pay_no", con, adOpenDynamic, adLockOptimistic If Not rs.EOF = True Then rs.MoveLast no = "Pay" & Val(Mid(rs.Fields(0).Value, 4)) + 1 txt_Payno.Text = no Else no = "Pay1" txt_Payno.Text = no End If Call clearButtons Call showButton fm_payinf.Enabled = True fm_cheque.Enabled = False cmd_save.Enabled = True cmd_cancel.Enabled = True End Sub Private Sub cmd_pre_Click() rspay.MovePrevious If rspay.BOF Then rspay.MoveLast End If Call getData fm_payinf.Enabled = False End Sub Private Sub cmd_save_Click() Dim opt_val As String If opt_cash.Value = True Then opt_val = "Cash" End If If opt_cheque.Value = True Then 67

opt_val = "Cheque" End If If flag = 1 Then ins = "insert into Pay_details values ('" & txt_Payno.Text & "','" & cmb_Orderno & "','" & cmb_Billno & "','" & opt_val & "','" & txt_amtpaid & "','" & txt_balamt & "','" & txt_bankname & "','" & txt_accno & "','" & txt_chequeno & "','" & dt_picker1 & "')" End If cmd_save.Enabled = False cmd_cancel.Enabled = False cmd_new.Enabled = True cmd_modify.Enabled = True cmd_del.Enabled = True fm_dis.Enabled = True End Sub Public Sub clearButtons() txt_bankname.Text = "" txt_accno.Text = "" txt_chequeno.Text = "" txt_amtpaid.Text = "" txt_balamt.Text = "" End Sub Public Sub showButton() cmd_new.Enabled = False cmd_save.Enabled = True cmd_modify.Enabled = False cmd_del.Enabled = False End Sub Public Sub showButton1() cmd_new.Enabled = True cmd_save.Enabled = False cmd_modify.Enabled = True cmd_del.Enabled = True End Sub Private Sub dc_order_Click(Area As Integer) rs2.MoveFirst rs2.Find "Sorder_no='" & dc_order.Text & "'" End Sub Private Sub Form_Load() fm_payinf.Enabled = False Set rspay = New ADODB.Recordset rspay.CursorLocation = adUseClient rspay.Open "select * from Pay_details", con, adOpenDynamic, adLockOptimistic Set cmd = New ADODB.Command cmd.CommandType = adCmdText 68

cmd.ActiveConnection = con If rspay.EOF = True And rspay.BOF = True Then MsgBox "No records in the table" Else rspay.MoveFirst End If Call getData fm_cheque.Visible = False cmd_save.Enabled = False cmd_cancel.Enabled = False End Sub Private Sub Form_Unload(Cancel As Integer) rspay.Close End Sub Public Sub getData() Dim order As String Dim pay As String If Not rspay.EOF = True And Not rspay.BOF = True Then txt_order.Text = rspay.Fields(0).Value pay = UCase(Mid(rspay.Fields(2).Value, 1, 1)) Select Case pay Case "C" opt_cash.Value = True Case "H" opt_cheque.Value = True End Select txt_amtpaid.Text = rspay.Fields(3).Value txt_balamt.Text = rspay.Fields(4).Value txt_bankname.Text = rspay.Fields(5).Value txt_accno.Text = rspay.Fields(6).Value txt_chequeno.Text = rspay.Fields(7).Value Else MsgBox "Table is empty" End If End Sub Private Sub txt_catname_KeyPress(KeyAscii As Integer) If (KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or KeyAscii = 8 Then Else KeyAscii = 0 End If End Sub Public Sub change_color(tbox As TextBox) tbox.BackColor = &H8000000F tbox.SelStart = 0 69

tbox.SelLength = Len(tbox.Text) End Sub Private Sub txt_catname_LostFocus() Call change_color1(txt_catname) End Sub Public Sub change_color1(tbox As TextBox) tbox.BackColor = &H80000005 End Sub Private Sub opt_cheque_Click() fm_cheque.Visible = True fm_cheque.Enabled = True End Sub

-- EXIT -70

-- Module-71

Public con As ADODB.Connection Public rs As ADODB.Recordset Public rs1 As ADODB.Recordset Public rspay As ADODB.Recordset Public rsinv As ADODB.Recordset Public rsorder As ADODB.Recordset Public rscat As ADODB.Recordset Public rsitem As ADODB.Recordset Public rscust As ADODB.Recordset Public rssup As ADODB.Recordset Public rssup1 As ADODB.Recordset Public rseq_Master As ADODB.Recordset Public rseq_details As ADODB.Recordset Public rssup_Enquiry As ADODB.Recordset Public rssearch As ADODB.Recordset Public rsquote_details As ADODB.Recordset Public rsquote_Master As ADODB.Recordset Public rsBill As ADODB.Recordset Public cmd As ADODB.Command Public rsQuotNo, rsOrderNo As ADODB.Recordset Public Sub change_color(tbox As TextBox) tbox.BackColor = &H8000000F tbox.SelStart = 0 tbox.SelLength = Len(tbox.Text) End Sub Public Sub change_color1(tbox As TextBox) tbox.BackColor = &H80000005 tbox.SelStart = 0 tbox.SelLength = Len(tbox.Text) End Sub

-- FUTURE ENHANCEMENT

72

Being a computer system, the system has lots of scope. It not only carried out work faster but also efficiently .A lots of manual work like searching ,personal alias is reduced to a large extent. As this is computerized system the management is completely depends on computer for accessing details about policyholders. Here incase there is power failure or some hardware problem which can not be fixed easily, the manager can not continue this work. He gets struck in the middle of the day and this dealing need to be postponed. Also the software need to be maintained properly from time to time, i.e. if it requires to be updated or modified etc. then the management need to take care of it. In Future Following Thing to be added in System. New Business System Examination System of New Agents Training & Lectures Scheduling System for New Agents

-- CONCLUSION
73

System helps to keep all the data about clients to be stored in computer and there is no need to do paper work. Data is going to be preserved carefully for longer period hence proper backup is required otherwise there is chance of losing entries. There are also chances that calculation error can occur which can cause huge problem.

74

-- BIBLIOGRAPHY --

Books referred :Sr.No. 1. Type Book name : Author : Description Programming in visual basic 6.0 Julia case Bradley, Anita C Millspough Tata Mc-Graw Hill Edition Mastering VB6 (1st Indian Edition) Evangelos Petront Sos BPB publications, B-14 connaugh place New Delhi The Complete Reference VB6(5th Reprint) Nel Jerka Tata Mcgraw Hill publishing company Ltd., New Delhi

Publication : Book name : 2. Author :

Publication : Book name : 3. Author :

Publication :

75

Vous aimerez peut-être aussi