final documentation...1

Upload: sadhana-rastogi

Post on 05-Apr-2018

227 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/31/2019 Final Documentation...1

    1/75

    RECORD MANAGEMENT SYSTEM

    PROJECTED BY:-

    ANITA .M. GUPTA (CA-316)

    SADHANA .P. RASTOGI (CA-330)

    PREETI .P. BHATT (CA-304)

    ANKITA .J. GAWANKAR (CA-315)

    SMT. P.N.DOSHI WOMENS COLLEGEAFFILIATED / CONDUCTED COLLEDGE TO

    S.N.D.T. WOMENS UNIVERSITY, MUMBAI

    (2010-2012)

    1

  • 7/31/2019 Final Documentation...1

    2/75

    -- 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 additionalfeatures 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 itmay contain errors, as there is always the scope for improvements.

    2

  • 7/31/2019 Final Documentation...1

    3/75

    3

  • 7/31/2019 Final Documentation...1

    4/75

    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 Head/Principal

    Signature: Signature:

    Name: Name:

    Date: Date:

    Organization Name College Seal:

    And Seal:

    Internal Examiner External Examiner

    Signature: Signature:

    Name: Name:

    Date: Date:

    4

  • 7/31/2019 Final Documentation...1

    5/75

    -- 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.

    5

  • 7/31/2019 Final Documentation...1

    6/75

    -- INDEX --

    Sr.No

    .

    Title Page no.

    1 Introduction. 72 Gantt Chart. 8

    3 Organizational Overview: 9-11

    a. Organization Profile

    b. Present System.

    c. Limitations of Present System.

    4 Proposed System. 12-14

    5 Feasibility Test. 15

    6 Software Specifications. 16-18

    6 System Documentation: 19-29

    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: 30-70

    a. Form Layout.

    b. Form Code.

    c. Testing.

    10 Future Development. 72

    11 Conclusion. 73

    12 Bibliography. 74

    6

  • 7/31/2019 Final Documentation...1

    7/75

    --Introduction --

    The Purpose of this Presentation is to give a Brief Information about thecurrently running system (SARGAM PANETAR) and steps performed by to computerize theRecord 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

    7

  • 7/31/2019 Final Documentation...1

    8/75

    --GANTT CHART --

    1. Project Search.

    2. Finalization.

    3. Allocation.

    4. Investigating systemRequirements.

    5. Data & Process

    Modeling.

    6. System Design.

    7. Program Design.

    8. Program Coding.

    9. Unit Testing.

    10. System Integration.

    11. Implementation.

    12. Testing.

    w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w13 w14 w15 w16 w17 w18 w19 w20 w21 w22 w24

    26/011 2/011 7/011 12/011 22/011 15/011 29/012 9/012 12/012 5/012 15/012 19/012 24/012 27/012

    8

    2

    4

    3

    5

    7

    6

    8

    1

    TIME DURATION

    8

    9

    10

    11

    128

  • 7/31/2019 Final Documentation...1

    9/75

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

  • 7/31/2019 Final Documentation...1

    10/75

    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

  • 7/31/2019 Final Documentation...1

    11/75

    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

  • 7/31/2019 Final Documentation...1

    12/75

    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

  • 7/31/2019 Final Documentation...1

    13/75

    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

  • 7/31/2019 Final Documentation...1

    14/75

    Overview of proposed system:-

    Theproposed system deals with the computerization of the order processing which deals

    with following transaction of:-

    1) Details of Customer

    2) Details of Supplier

    3) Purchase order

    4) 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

  • 7/31/2019 Final Documentation...1

    15/75

    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 developingthe 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 intoconsideration while designing the system.

    The required cost of the newly developed system is low; therefore, the system is economicallyfeasible.

    Operational feasibility:

    1) Total working capacity will be improved.

    2) Because of implementation computerized system time is nicely organized.

    3) The manpower required for clerical work will be reduced.4) The system is operationally feasible because of above tested benefits.

    15

  • 7/31/2019 Final Documentation...1

    16/75

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

  • 7/31/2019 Final Documentation...1

    17/75

    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 byreplacing some of the complicated work with easy-to-use templates. While using Access can besomewhat 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

  • 7/31/2019 Final Documentation...1

    18/75

    --ENTITY RELATIONSHIP DIAGRAM--

    18

    CUSTOMER ORDER

    Purcha

    se

    order

    Checks

    item

    availabili

    ty

  • 7/31/2019 Final Documentation...1

    19/75

    19

    ITEM MASTER

    BILL PAYMENTMASTER

    Prepar

    e

    Pai

    d

  • 7/31/2019 Final Documentation...1

    20/75

    Record

    Management

    System

    Customer

    Stock

    Supplier

    -- DATA FLOW DIAGRAM --

    1. Context Level Diagram:-

    Product from the supplier

    Product enquiry Acknowledgement

    Product and Information

    Reciept

    Product supply

    20

  • 7/31/2019 Final Documentation...1

    21/75

    2. Level-1 DFD:-

    Master details

    Get details

    Supplier Details

    Order

    Supply Items Enquiry Details

    21

    1. 0

    Input

    Masters

    Owner

    Policyholder Master

    Supplier Details

    Customer Details

    Item Details

    2. 0

    Supplier

    Transaction

    Supplier

  • 7/31/2019 Final Documentation...1

    22/75

    -- EVENT-TABLE --

    EVENT TRIGGER SOURCE ACTIVITY RESPONSEDESTINATI

    ON

    Owner wants

    to add newCustomer and

    Supplier

    Adding NewCustomer and

    Supplier

    OwnerLook up listof Customer

    and Supplier

    Requestconfirmed

    Owner

    Customer

    wants to place

    order

    Create new

    Sales OrderCustomer

    Look the

    status of

    Quotation

    Order

    confirmationCustomer

    Owner wants

    to place order

    to the Supplier

    Create new

    Purchase

    Order

    Owner

    Place

    Purchase

    order

    Request order

    confirmation

    Supplier

    Supplier

    wants toconfirm order

    Orderconfirmation

    Supplier

    Confirm

    Purchaseorder

    Order

    confirmed Supplier

    Supplierdelivers the

    order

    Order delivery SupplierLook orderdetails

    Order deliverySupplier

    22

  • 7/31/2019 Final Documentation...1

    23/75

    -- SYSTEM FLOW CHART --

    23

    Customer

    Entry

    Form

    CustomerDatabase

    Customer

    Report

    Item

    Entry

    Take

    CustomerI/P

    TakeItemI/P

    TakeExpenseI/P

    Expence

    Entry

    Form

    Expense

    Table

    Item

    Table

    Item

    Report Employee

    Report

    Supplier

    ReportSupplier

    Table

    TakeSupplierI/P

    Supplier

    Entry

    Form

  • 7/31/2019 Final Documentation...1

    24/75

    -- STRUCTURED CHART --

    24

    Record ManagementSystem

    Owner Customer

    Manage Master

    Records

    Item

    details

    Supplier

    Details

    Supplier

    details

    Customer

    details

  • 7/31/2019 Final Documentation...1

    25/75

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

  • 7/31/2019 Final Documentation...1

    26/75

    -- PROGRAM LIST --

    26

    Sr.

    No.Form Name Description

    1 FrmSplash This form provides information about the inventory.

    2 FrmLoginThis form allows user to make entry in system with valid

    password

    3 MDIThis form provides information about system, menus,working session

    4 frm_supplier This form provides master information about Supplier andallows new entry of Supplier

    5 frm_customer This form provides master information about the newCustomer

    6 frm_itemThis form provides information about the Items in the

    Inventory.

    7 frm_OrderDetails This form confirms urchase order or sales order.

    8 frm_paydetailsThis form keeps information about the payment mode of the

    Customer.

    9 frm_About This form provides information about the System.

  • 7/31/2019 Final Documentation...1

    27/75

    -- TABLES USED --

    1] Table Name: Cust_details:Description: It contains master information of Customer:

    Field Data type Size Description

    Cust_code Number 10 Contains the Customer code

    Cust_name Text 15 Contains the Customer name

    Cust_add Text 50 Contains the Customer address

    CCity Text 12 Contains the Customer city

    CPhone Number 10 Contains the contact number of the Customer

    CMobile Number 15 Contains the mobile number of the Customer

    Email Text 30 Contains the Email Id of Customer Fax Number 10 Contains the Fax number of the Customer

    CState Text 15 Contains the state of Customer

    CPincode Number 15 Contains the Pin number

    2] Table Name: Supplier_details:

    Description: It contains master information of Supplier:

    Field Data type Size Description

    Sup_code Number 10 Contains the Supplier code

    Sup_name Text 15 Contains the Supplier name

    Sup_add Text 50 Contains the Supplier address

    City Text 12 Contains the Supplier city

    Phone Number 10 Contains the contact number of the Supplier

    Mobile Number 15 Contains the mobile number of the Supplier

    Email Text 30 Contains the Email Id of Supplier

    Fax Number 10 Contains the Fax number of the Supplier

    State Text 15 Contains the state of Supplier

    Pincode Number 15 Contains the Pin number

    27

  • 7/31/2019 Final Documentation...1

    28/75

    3] Table Name: Item_details:

    Description: It contains master information of items in the inventory:

    Field Data type Size Description

    Item_code Text 10 Contains the Item code

    Item_name Text 15 Contains the Item name

    Descrip Text 15 Contains the description of ItemMaxqty Number 10 Contains the maximum quantity of Item in

    Inventory

    Qty Number 10 Contains the current quantity of item in the

    inventory

    Minqty Number 7 Contains the minimum quantity of items in the

    inventory

    Pur_rate Number 10 Contains the purchase rate of item

    Sale_rate Number 10 Contains the sales rate of item

    Category Text 15 Contains the category of the item

    4] Table Name: Order_Details:

    Description: It contains information of order details.

    Field Data type Size Description

    Order_no Text 5 Contains order number.

    Order_dt Date/Time - Contains order date..

    Quote_no Text 5 Contains quotation number.

    Sup_code/Cust_code Text 5 Contains customer code or supplier code.

    Amt_paid Number 10 Contains amount paid.Bal_amt Number 10 Contains balance amount to be paid.

    5] Table Name: Pay_details:

    Description: It contains information of the bill payment mode.

    Field Data type Size Description

    Pay_no Text 5 Contains payment number.

    Order_no Text 5 Contains order number.Bill_no Text 5 Contains bill number.

    Pay_mode Text 10 Contains payment mode.

    Amt_paid Number 10 Contains amount paid.

    Bal_amt Number 10 Contains balance amount to be paid.

    Pay_Date Date/Time - Contains payment date.

    28

  • 7/31/2019 Final Documentation...1

    29/75

    -- REPORTS LIST --

    29

    Sr.

    No.

    Report Name Description

    1 RptSup This report provides Supplier records

    2 RptCust This report provides Customer records

    3 RptItem This report provides stock report

  • 7/31/2019 Final Documentation...1

    30/75

    -- SYSTEM CODING & CONVENTIONS --

    1] Common module for all forms:

    Module Name SrNo. Variables Type DescriptionModule1.bas 1 Con Connection To connect to

    Database.

    2 Rs Recordset To add details in

    login table.

    3 rs1 Recordset To generate id

    4 Rspay Recordset To update details

    in payment table.

    5 Rscust Recordset To update details

    in Customer table.

    6 Rssup Recordset To update detailsin Supplier table.

    7 Rsitem Recordset To update details

    in item table.

    8 rseq_sup Recordset To add details

    enquiry supplier

    9 Rssearch Recordset To add detailssearch

    10 Rsorder Recordset To update detailsin order table.

    30

  • 7/31/2019 Final Documentation...1

    31/75

    --PROGRAM DOCUMENTATION--

    -- SPLASH SCREEN

    31

  • 7/31/2019 Final Documentation...1

    32/75

    CODE:

    Option Explicit

    Private Sub Form_KeyPress(KeyAscii As Integer)

    Unload MeEnd 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 MeEnd Sub

    Private Sub Timer1_Timer()pg1.Value = pg1.Value + 10

    If pg1.Value >= pg1.Max Then

    Timer1.Enabled = False

    Unload MeLoad frmLogin

    frmLogin.Show

    End IfEnd Sub

    32

  • 7/31/2019 Final Documentation...1

    33/75

    -- LOGIN FORM

    33

  • 7/31/2019 Final Documentation...1

    34/75

    CODE:

    Option ExplicitPrivate Sub cmd_cancel_Click()

    End

    Unload MeEnd 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.SetFocusElse

    txt_Username.SetFocus

    End IfExit Sub

    End If

    Set rs = New ADODB.Recordsetrs.CursorLocation = adUseClient

    rs.Open "select user_id ,user_name,Pword from login where user_name='" & txt_Username & "'and

    Pword='" & txt_Password & "'", con, adOpenDynamic, adLockOptimisticIf rs.RecordCount > 0 Then

    If Mid(rs.Fields("user_id").Value, 1, 1) = "A" Then

    MDIInventory.mnu_admins.Visible = True

    ElseMDIInventory.mnu_admins.Visible = False

    End If

    Unload Me

    Load MDIInventoryMDIInventory.Show

    ElseMsgBox "Invalid login..., try again!", vbInformation, " record management system "

    txt_Password.Text = ""

    txt_Password.SetFocus

    End IfUnload Me

    End Sub

    34

  • 7/31/2019 Final Documentation...1

    35/75

    -- MDI FORM

    35

  • 7/31/2019 Final Documentation...1

    36/75

    CODE:

    Private Sub MDIForm_Load()

    Set con = New ADODB.Connectioncon.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.ShowfrmAbout.SetFocus

    End Sub

    Private Sub mnu_bd_Click()

    Load frm_BillDetails

    frm_BillDetails.Showfrm_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.SetFocusEnd 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 ObjectSet wBook = exApplication.Workbooks.Open(App.Path & "\Book1.xls")Set wSheet = wBook.Worksheets(1)

    exApplication.Visible = True

    Dim i As IntegerwSheet.Unprotect ("")

    Set rscustrpt = New ADODB.Recordset

    i = 12

    rscustrpt.Open "Select * from Cust_details ", con, adOpenDynamic, adLockOptimistic

    36

  • 7/31/2019 Final Documentation...1

    37/75

    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.MoveNexti = i + 1

    WendwSheet.Protect

    End Sub

    Private Sub mnu_exit_Click()

    Load frmExit

    frmExit.ShowEnd Sub

    Private Sub mnu_itemdetails_Click()

    Load frm_item

    frm_item.Show

    frm_item.SetFocusEnd Sub

    Private Sub mnu_orderdetails_Click()Load frm_OrderDetails

    frm_OrderDetails.Show

    frm_OrderDetails.SetFocus

    End Sub

    Private Sub mnu_pay_Click()

    Load frm_paydetailsfrm_paydetails.Show

    End Sub

    Private Sub mnu_porder_Click()

    Load frm_OrderDetails

    frm_OrderDetails.Showfrm_OrderDetails.SetFocus

    End Sub

    Private Sub mnu_purrpt_Click()

    Purrpt.DataFiles(0) = App.Path & "/inventory.mdb"

    Purrpt.DiscardSavedData = True

    Purrpt.Action = 1End Sub

    Private Sub mnu_s_Click()

    37

  • 7/31/2019 Final Documentation...1

    38/75

    Load frm_search

    frm_search.Show

    End Sub

    Private Sub mnu_search_Click()

    Load frm_searchfrm_search.Show

    End Sub

    Private Sub mnu_sales_Click()Salesrpt.DataFiles(0) = App.Path & "/inventory.mdb"

    Salesrpt.DiscardSavedData = True

    Salesrpt.Action = 1End Sub

    Private Sub mnu_stockrpt_Click()Set exApplication = CreateObject("Excel.Application")

    Dim wSheet As Object

    Dim wBook As ObjectSet wBook = exApplication.Workbooks.Open(App.Path & "\Book1.xls")

    Set wSheet = wBook.Worksheets(3)

    exApplication.Visible = True

    wSheet.ActivatewSheet.Unprotect ("")

    Dim i As Integer

    Set rsitemrpt = New ADODB.Recordseti = 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.MoveNexti = i + 1

    Wend

    wSheet.ProtectEnd 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

  • 7/31/2019 Final Documentation...1

    39/75

    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.ActivateDim i As Integer

    wSheet.Unprotect ("")Set rssuprpt = New ADODB.Recordset

    i = 12rssuprpt.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.MoveNexti = i + 1

    Wend

    wSheet.Protect

    End Sub

    Private Sub mnu_Th_Click()

    MDIInventory.Arrange (vbHorizontal)End Sub

    Private Sub mnu_tool_Click()

    Load frm_utilitytoolfrm_utilitytool.Show

    End Sub

    Private Sub mnu_Tv_Click()

    MDIInventory.Arrange (vbVertical)

    End Sub

    39

  • 7/31/2019 Final Documentation...1

    40/75

    -- CUSTOMER DETAILS --

    40

  • 7/31/2019 Final Documentation...1

    41/75

    -- SUPPLIER DETAILS

    41

  • 7/31/2019 Final Documentation...1

    42/75

    CODE:

    Dim flag As Integer

    Dim exApplication As Object

    Public rssuprpt As New ADODB.Recordset

    Private Sub cmd_exit_Click()

    Unload frm_supplierEnd Sub

    Private Sub cmd_first_Click()If rssup.EOF = True And rssup.BOF = True Then

    MsgBox "NO RECORDS IN THE TABLE"

    Exit Sub

    Elserssup.MoveFirst

    Call getData

    End Ifcmd_modify.Enabled = True

    cmd_del.Enabled = True

    fm_supinf.Enabled = FalseEnd Sub

    Private Sub cmd_modify_Click()flag = 2

    fm_supinf.Enabled = True

    cmd_save.Enabled = True

    cmd_cancel.Enabled = True

    fm_dis.Enabled = FalseEnd 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 = Falsecmd_cancel.Enabled = False

    fm_supinf.Enabled = Falsefm_dis.Enabled = Truers.MoveFirst

    End Sub

    Private Sub cmd_del_Click()

    Dim del As Integer

    42

  • 7/31/2019 Final Documentation...1

    43/75

    del = MsgBox("Are you sure you want to delete current record?", vbYesNo, "Comfirm record

    Deletion")

    If del = 6 Thencmd.CommandText = "delete from Supplier_details where sup_code='" & txt_supcode & "'"

    cmd.CommandType = adCmdText

    cmd.Executerssup.Requery

    End IfMsgBox "Record deleted successfully...", vbInformation, "Confirm Deletion.."

    Call clearTexttxt_supcode = ""

    fm_supinf.Enabled = True

    cmd_save.Enabled = Truecmd_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 getDataEnd If

    cmd_modify.Enabled = True

    cmd_del.Enabled = Truefm_supinf.Enabled = False

    End Sub

    Private Sub cmd_new_Click()flag = 1

    Dim no As String

    Set rs = New ADODB.Recordsetrs.CursorLocation = adUseClient

    rs.Open "select * from Supplier_details order by Sup_code", con, adOpenDynamic,

    adLockOptimisticIf Not rs.EOF = True Then

    rs.MoveLast

    no = "Sup" & Val(Mid(rs.Fields(0).Value, 4)) + 1txt_supcode.Text = no

    Else

    no = "Sup1"txt_supcode.Text = no

    End If

    Call clearText

    Call showButtonfm_supinf.Enabled = True

    cmd_save.Enabled = True

    cmd_cancel.Enabled = True

    43

  • 7/31/2019 Final Documentation...1

    44/75

    fm_dis.Enabled = False

    txt_supname.SetFocus

    rs.Closers.Open "select * from Supplier_details", con, adOpenDynamic, adLockOptimistic

    End Sub

    Private Sub cmd_next_Click()

    If rssup.EOF = True And rssup.BOF = True ThenMsgBox "NO RECORDS IN THE TABLE"

    Exit SubElse

    rssup.MoveNext

    If rssup.EOF Thenrssup.MoveFirst

    End If

    End IfCall getData

    cmd_modify.Enabled = True

    cmd_del.Enabled = Truefm_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 SubElse

    rscust.MovePrevious

    If rssup.BOF Then

    rssup.MoveLastEnd If

    End If

    Call getDatacmd_modify.Enabled = True

    cmd_del.Enabled = True

    End Sub

    Private Sub cmd_save_Click()

    Dim ins As StringIf Len(Trim(txt_supname.Text)) = 0 Then

    MsgBox "Please specify Supplier name.", vbInformation, " Record Management system."

    txt_supname.SetFocusExit 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

  • 7/31/2019 Final Documentation...1

    45/75

    Dim x As Integer

    If txt_email.Text = "" Then

    MsgBox "Please enter Email-id "txt_email.SetFocus

    Exit Sub

    Elsex = InStr(1, txt_email.Text, "@", vbTextCompare)

    If x > 0 ThenIf InStr(x, txt_email.Text, ".", vbTextCompare)

  • 7/31/2019 Final Documentation...1

    46/75

    Set cmd = New ADODB.Command

    cmd.CommandType = adCmdText

    cmd.ActiveConnection = concmd.CommandText = ins

    cmd.Execute

    rssup.Requerycmd_save.Enabled = False

    cmd_cancel.Enabled = Falsecmd_new.Enabled = True

    cmd_modify.Enabled = Truecmd_del.Enabled = True

    fm_dis.Enabled = True

    fm_supinf.Enabled = FalseEnd 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 = FalseEnd Sub

    Public Sub showButton1()cmd_new.Enabled = True

    cmd_save.Enabled = False

    cmd_modify.Enabled = Truecmd_del.Enabled = True

    End Sub

    Public Sub getData()

    On Error GoTo handleerror

    If Not rssup.EOF = True And Not rssup.BOF = True Thentxt_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).Valuetxt_mobile.Text = rssup.Fields(4).Value

    txt_email.Text = rssup.Fields(5).Value

    txt_fax.Text = rssup.Fields(6).Value

    46

  • 7/31/2019 Final Documentation...1

    47/75

    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 = "" Thenrssup.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 = Truecmd_modify.Enabled = True

    cmd_search.Enabled = True

    cmd_save.Enabled = TrueEnd Sub

    Private Sub Form_KeyPress(KeyAscii As Integer)If KeyAscii = 27 Then

    Unload Me

    End IfEnd 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

  • 7/31/2019 Final Documentation...1

    48/75

    Set rssup = New ADODB.Recordset

    rssup.CursorLocation = adUseClient

    rssup.Open "select * from Supplier_details", con, adOpenDynamic, adLockOptimisticSet cmd = New ADODB.Command

    cmd.CommandType = adCmdText

    cmd.ActiveConnection = conCall getData

    cmd_save.Enabled = Falsecmd_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 = 97 And KeyAscii = 65 And KeyAscii = 97 And KeyAscii = 48 And KeyAscii = 48 And KeyAscii = 48 And KeyAscii

  • 7/31/2019 Final Documentation...1

    49/75

    Private Sub txt_phone_KeyPress(KeyAscii As Integer)

    If (KeyAscii >= 48 And KeyAscii = 48 And KeyAscii

  • 7/31/2019 Final Documentation...1

    50/75

    -- ITEM DETAILS

    50

  • 7/31/2019 Final Documentation...1

    51/75

    CODE:

    Dim flag As Integer

    Dim c As String

    Public rsitemrpt As New ADODB.RecordsetPublic rscatnm As ADODB.Recordset

    Private Sub cmd_cancel_Click()Call clearButtons

    txt_itemcode = ""

    cmd_save.Enabled = Falsecmd_modify.Enabled = False

    cmd_new.Enabled = True

    cmd_del.Enabled = Falsecmd_cancel.Enabled = False

    fm_iteminf.Enabled = False

    fm_dis.Enabled = True

    rsitem.MoveFirstEnd 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 Thencmd.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 clearButtonsfm_iteminf.Enabled = True

    cmd_cancel.Enabled = True

    cmd_save.Enabled = TrueEnd Sub

    Private Sub cmd_exit_Click()

    Unload frm_itemEnd Sub

    Private Sub cmd_first_Click()If rsitem.EOF = True And rsitem.BOF = True Then

    MsgBox "NO RECORDS IN THE TABLE"

    Exit SubElse

    rsitem.MoveFirst

    Call getDataEnd If

    51

  • 7/31/2019 Final Documentation...1

    52/75

    fm_iteminf.Enabled = False

    cmd_modify.Enabled = True

    cmd_del.Enabled = TrueEnd Sub

    Private Sub cmd_last_Click()If rsitem.EOF = True And rsitem.BOF = True Then

    MsgBox "NO RECORDS IN THE TABLE"Exit Sub

    Elsersitem.MoveLast

    Call getData

    End Iffm_iteminf.Enabled = False

    cmd_modify.Enabled = True

    cmd_del.Enabled = TrueEnd Sub

    Private Sub cmd_modify_Click()flag = 2

    fm_iteminf.Enabled = True

    cmd_save.Enabled = True

    cmd_cancel.Enabled = Truefm_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.MoveNextIf rsitem.EOF Then

    rsitem.MoveFirst

    End IfEnd If

    Call getData

    cmd_modify.Enabled = Truecmd_del.Enabled = True

    fm_iteminf.Enabled = False

    End Sub

    Private Sub cmd_new_Click()

    flag = 1

    Dim no As StringSet rsitem = New ADODB.Recordset

    rsitem.CursorLocation = adUseClient

    52

  • 7/31/2019 Final Documentation...1

    53/75

    rsitem.Open "select * from Item_details order by Item_code", con, adOpenDynamic,

    adLockOptimistic

    If Not rsitem.EOF = True Thenrsitem.MoveLast

    no = "Item" & Val(Mid(rsitem.Fields(0).Value, 5)) + 1

    txt_itemcode.Text = noElse

    no = "Item1"txt_itemcode.Text = no

    End IfCall clearButtons

    Call showButton

    fm_iteminf.Enabled = Truecmd_save.Enabled = True

    cmd_cancel.Enabled = True

    fm_dis.Enabled = Falsetxt_itemname.SetFocus

    rsitem.Close

    rsitem.Open "select * from Item_details", con, adOpenDynamic, adLockOptimisticEnd Sub

    Private Sub cmd_pre_Click()

    If rsitem.EOF = True And rsitem.BOF = True ThenMsgBox "NO RECORDS IN THE TABLE"

    Exit Sub

    Elsersitem.MovePrevious

    If rsitem.BOF Then

    rsitem.MoveLast

    End IfEnd If

    Call getData

    cmd_modify.Enabled = Truecmd_del.Enabled = True

    fm_iteminf.Enabled = False

    End Sub

    Private Sub cmd_save_Click()

    Dim ins As StringIf Len(Trim(txt_itemname.Text)) = 0 Then

    MsgBox "Please specify Item name.", vbInformation, "Record Management System.."

    txt_itemname.SetFocusExit 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

  • 7/31/2019 Final Documentation...1

    54/75

    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 ThenMsgBox "Please specify Sales Rate.", vbInformation, " Record Management System..."

    Exit SubEnd If

    If Len(Trim(txt_qty.Text)) = 0 Then

    MsgBox "Please specify Quantity.", vbInformation, " Record Management System..."Exit Sub

    End If

    If flag = 1 Thenins = "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.SetFocusins = " 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 & "' whereItem_code='" & txt_itemcode.Text & "'"

    MsgBox "Modified record saved successfully...", vbInformation, "Confirm Insertion.."

    End If

    Set cmd = New ADODB.Commandcmd.CommandType = adCmdText

    cmd.ActiveConnection = con

    cmd.CommandText = inscmd.Execute

    rsitem.Requery

    cmd_save.Enabled = Falsecmd_cancel.Enabled = False

    cmd_new.Enabled = True

    cmd_modify.Enabled = Truecmd_del.Enabled = True

    fm_dis.Enabled = True

    fm_iteminf.Enabled = Falsersitem.Requery

    End Sub

    Public Sub clearButtons()txt_max.Text = ""

    txt_min.Text = ""

    txt_itemname.Text = ""

    54

  • 7/31/2019 Final Documentation...1

    55/75

    txt_descrip.Text = ""

    txt_qty.Text = ""

    txt_purrate.Text = ""txt_salerate.Text = ""

    End Sub

    Public Sub showButton()

    cmd_new.Enabled = Falsecmd_save.Enabled = True

    cmd_modify.Enabled = Falsecmd_del.Enabled = False

    End Sub

    Public Sub showButton1()

    cmd_new.Enabled = True

    cmd_save.Enabled = Falsecmd_modify.Enabled = True

    cmd_del.Enabled = True

    End Sub

    Private Sub cmd_search_Click()

    nm = InputBox("Enter the Item Name", "Search")

    On Error GoTo handleerrorIf 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 = Truecmd_del.Enabled = True

    cmd_modify.Enabled = True

    cmd_search.Enabled = True

    cmd_save.Enabled = TrueEnd Sub

    55

  • 7/31/2019 Final Documentation...1

    56/75

    Private Sub Form_Load()

    fm_iteminf.Enabled = False

    Set rsitem = New ADODB.Recordsetrsitem.CursorLocation = adUseClient

    rsitem.Open "select * from Item_details", con, adOpenDynamic, adLockOptimistic

    If Not rsitem.EOF = True And Not rsitem.BOF = True ThenSet cmd = New ADODB.Command

    cmd.CommandType = adCmdTextcmd.ActiveConnection = con

    rsitem.MoveFirstCall getData

    Else

    MsgBox "table is empty"End If

    cmd_save.Enabled = False

    cmd_cancel.Enabled = FalseEnd Sub

    Public Sub getData()

    txt_itemcode.Text = rsitem.Fields(0).Value

    txt_itemname.Text = rsitem.Fields(1).Value

    txt_descrip.Text = rsitem.Fields(2).Valuetxt_max.Text = rsitem.Fields(3).Value

    txt_qty.Text = rsitem.Fields(4).Value

    txt_min.Text = rsitem.Fields(5).Valuetxt_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 = 65 And KeyAscii = 97 And KeyAscii = 48 And KeyAscii = 48 And KeyAscii

  • 7/31/2019 Final Documentation...1

    57/75

    End If

    End Sub

    Private Sub txt_salerate_KeyPress(KeyAscii As Integer)

    If (KeyAscii >= 48 And KeyAscii

  • 7/31/2019 Final Documentation...1

    58/75

    -- ORDER DETAILS --

    58

  • 7/31/2019 Final Documentation...1

    59/75

    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 = Falserspur.MoveFirst

    Call showsearch

    Call getDatafm_purinf.Enabled = False

    End Sub

    Private Sub cmd_Back_Click()Unload frm_OrderDetails

    Load frm_QuoteMasterfrm_QuoteMaster.WindowState = 2

    frm_QuoteMaster.Show

    End Sub

    Private Sub cmd_modify_Click()

    flag = 2

    fm_purinf.Enabled = Truecmd_save.Enabled = True

    cmd_cancel.Enabled = Truefm_dis.Enabled = FalseCall showsearch

    End Sub

    Private Sub cmd_cancel_Click()Call clearButtons

    txt_orderno = ""

    cmd_save.Enabled = Falsecmd_modify.Enabled = False

    cmd_new.Enabled = True

    cmd_del.Enabled = Falsecmd_cancel.Enabled = False

    fm_purinf.Enabled = False

    fm_dis.Enabled = Truers.MoveFirst

    End Sub

    Private Sub cmd_del_Click()Dim del As Integer

    59

  • 7/31/2019 Final Documentation...1

    60/75

    del = MsgBox("Are you sure you want to delete current record?", vbYesNo, "Comfirm record

    Deletion")

    If del = 6 Thencmd.CommandText = "delete from Pur_order where Purorder_no='" & txt_orderno & "'"

    cmd.Execute

    rspur.RequeryEnd If

    MsgBox "Record deleted successfully...", vbInformation, "Confirm Deletion.."Call clearText

    txt_orderno = ""Call showsearch

    fm_purinf.Enabled = True

    cmd_save.Enabled = Truecmd_cancel.Enabled = True

    End Sub

    Private Sub cmd_last_Click()

    dg2.Visible = True

    dg1.Visible = Falserspur.MoveLast

    Call showsearch

    Call getData

    fm_purinf.Enabled = FalseEnd Sub

    Private Sub cmd_new_Click()dg1.Visible = True

    dg2.Visible = False

    flag = 1

    Dim no As StringSet rs = New ADODB.Recordset

    rs.CursorLocation = adUseClient

    rs.Open "select * from Order_Details order by Order_no", con, adOpenDynamic, adLockOptimisticIf Not rs.EOF = True Then

    rs.MoveLast

    no = "Order" & Val(Mid(rs.Fields(0).Value, 6)) + 1txt_orderno.Text = no

    Else

    no = "Order1"txt_orderno.Text = no

    End If

    Call clearTextCall 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 fromQuotation_Detail where Quote_no='" & txtQuote.Text & "'", con, adOpenDynamic, adLockOptimistic

    Set dg1.DataSource = rsquote_details

    fm_purinf.Enabled = True

    60

  • 7/31/2019 Final Documentation...1

    61/75

    cmd_save.Enabled = True

    cmd_cancel.Enabled = True

    fm_dis.Enabled = FalseEnd Sub

    Private Sub cmd_next_Click()dg2.Visible = True

    dg1.Visible = Falserspur.MoveNext

    If rspur.EOF Thenrspur.MoveFirst

    End If

    Call getDatafm_purinf.Enabled = False

    End Sub

    Private Sub cmd_pre_Click()

    dg2.Visible = True

    dg1.Visible = Falserspur.MovePrevious

    If rspur.BOF Then

    rspur.MoveLast

    End IfCall showsearch

    Call getData

    fm_purinf.Enabled = FalseEnd Sub

    Private Sub cmd_save_Click()

    Dim ins As StringSet cmd = New ADODB.Command

    cmd.CommandType = adCmdText

    cmd.ActiveConnection = conIf 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.RequeryMsgBox "Record saved successfully...", vbInformation, "Confirm Insertion.."

    End If

    If flag = 2 Thendc_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

  • 7/31/2019 Final Documentation...1

    62/75

    cmd.Execute

    End If

    cmd_save.Enabled = Falsecmd_cancel.Enabled = False

    cmd_new.Enabled = True

    cmd_modify.Enabled = Truecmd_del.Enabled = True

    fm_dis.Enabled = Truefm_purinf.Enabled = False

    Call showsearchEnd 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 = Falsecmd_save.Enabled = True

    cmd_modify.Enabled = False

    cmd_del.Enabled = FalseEnd Sub

    Public Sub showButton1()

    cmd_new.Enabled = Truecmd_save.Enabled = False

    cmd_modify.Enabled = True

    cmd_del.Enabled = TrueEnd Sub

    Public Sub getData()If (rsorder.EOF = True And rsorder.BOF = True) Then

    MsgBox "Table is empty ....", vbOKOnly, "No Data"

    Exit SubElse

    txt_orderno.Text = rsorder.Fields(0).Value

    dc_item.Text = rs1.Fields(5).Valuedc_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).Valuetxt_qty.Text = rs1.Fields(6).Value

    txt_quote_no.Text = rs1.Fields(8).Value

    End If

    62

  • 7/31/2019 Final Documentation...1

    63/75

    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

    ElseDim ins As String

    rspur.MoveFirstCall showsearch

    If rspur.BOF And rspur.EOF Then

    MsgBox "Record not found???", vbInformation, "Search Engine!!!"Else

    Call clearText

    Call getDataEnd If

    End If

    End Sub

    Private Sub dc_item_Click(Area As Integer)

    fm_item.Visible = True

    fm_supinf.Visible = Falsersitem.MoveFirst

    rsitem.Find "Item_code='" & dc_item.Text & "'"

    If (rsitem.EOF = True) Or (rsitem.BOF = True) ThenElse

    txt_itemcode = rsitem.Fields(0).Value

    txt_itemname = rsitem.Fields(1).Value

    txt_descrip = rsitem.Fields(2).Valuetxt_rate = rsitem.Fields(4).Value

    End If

    End Sub

    Private Sub dc_item_LostFocus()

    fm_item.Visible = FalseEnd 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

  • 7/31/2019 Final Documentation...1

    64/75

    rsquote_details.Open "select Item_code,Qty from Quotation_Detail where Quote_no='" &

    dc_quote.Text & "'", con, adOpenDynamic, adLockOptimistic

    Set dg1.DataSource = rsquote_detailsrsquoteo.Find "Quoteo_no='" & dc_quote.Text & "'"

    End Sub

    Private Sub dc_sup_Click(Area As Integer)

    fm_supinf.Visible = Truerssup.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).Valuetxt_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 MeEnd If

    End Sub

    Private Sub Form_Load()

    fm_purinf.Enabled = False

    Set rsorder = New ADODB.Recordset

    rsorder.CursorLocation = adUseClientrsorder.Open "select * from Order_Details ", con, adOpenDynamic, adLockOptimistic

    Set rsquote_Master = New ADODB.Recordset

    rsquote_Master.CursorLocation = adUseClientrsquote_Master.Open "select * from Quotation_Master", con, adOpenDynamic, adLockOptimistic

    Set cmd = New ADODB.Command

    cmd.CommandType = adCmdTextcmd.ActiveConnection = con

    rsorder.MoveFirst

    Call getDataFor i = 0 To rsorder.Fields.Count - 1

    Set dg2.DataSource = rsorder

    cmd_save.Enabled = Falsecmd_cancel.Enabled = False

    End Sub

    -- PAYMENT DETAILS --64

  • 7/31/2019 Final Documentation...1

    65/75

    CODE:

    65

  • 7/31/2019 Final Documentation...1

    66/75

    Dim flag As Integer

    Private Sub cmd_cancel_Click()

    Call clearButtons

    txt_order = ""cmd_save.Enabled = False

    cmd_modify.Enabled = Falsecmd_new.Enabled = True

    cmd_del.Enabled = Falsecmd_cancel.Enabled = False

    fm_payinf.Enabled = False

    fm_dis.Enabled = Truers.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.RequeryEnd 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.MoveFirstCall getData

    fm_payinf.Enabled = False

    End Sub

    Private Sub cmd_last_Click()

    rspay.MoveLastCall getData

    fm_payinf.Enabled = False

    End Sub

    Private Sub cmd_modify_Click()

    flag = 2

    fm_payinf.Enabled = Truecmd_save.Enabled = True

    cmd_cancel.Enabled = True

    fm_dis.Enabled = False

    66

  • 7/31/2019 Final Documentation...1

    67/75

    End Sub

    Private Sub cmd_next_Click()rspay.MoveNext

    If rspay.EOF Then

    rspay.MoveFirstEnd If

    Call getDatafm_payinf.Enabled = False

    End Sub

    Private Sub cmd_new_Click()

    flag = 1Dim no As String

    Set rs = New ADODB.Recordset

    rs.CursorLocation = adUseClientrs.Open "select * from Pay_details order by Pay_no", con, adOpenDynamic, adLockOptimistic

    If Not rs.EOF = True Then

    rs.MoveLastno = "Pay" & Val(Mid(rs.Fields(0).Value, 4)) + 1

    txt_Payno.Text = no

    Else

    no = "Pay1"txt_Payno.Text = no

    End If

    Call clearButtonsCall showButton

    fm_payinf.Enabled = True

    fm_cheque.Enabled = False

    cmd_save.Enabled = Truecmd_cancel.Enabled = True

    End Sub

    Private Sub cmd_pre_Click()

    rspay.MovePrevious

    If rspay.BOF Thenrspay.MoveLast

    End If

    Call getDatafm_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

  • 7/31/2019 Final Documentation...1

    68/75

    opt_val = "Cheque"

    End If

    If flag = 1 Thenins = "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 = Falsecmd_cancel.Enabled = False

    cmd_new.Enabled = Truecmd_modify.Enabled = True

    cmd_del.Enabled = True

    fm_dis.Enabled = TrueEnd 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 = Truecmd_modify.Enabled = False

    cmd_del.Enabled = False

    End Sub

    Public Sub showButton1()

    cmd_new.Enabled = True

    cmd_save.Enabled = Falsecmd_modify.Enabled = True

    cmd_del.Enabled = True

    End Sub

    Private Sub dc_order_Click(Area As Integer)

    rs2.MoveFirstrs2.Find "Sorder_no='" & dc_order.Text & "'"

    End Sub

    Private Sub Form_Load()

    fm_payinf.Enabled = False

    Set rspay = New ADODB.Recordset

    rspay.CursorLocation = adUseClientrspay.Open "select * from Pay_details", con, adOpenDynamic, adLockOptimistic

    Set cmd = New ADODB.Command

    cmd.CommandType = adCmdText

    68

  • 7/31/2019 Final Documentation...1

    69/75

    cmd.ActiveConnection = con

    If rspay.EOF = True And rspay.BOF = True Then

    MsgBox "No records in the table"Else

    rspay.MoveFirst

    End IfCall getData

    fm_cheque.Visible = Falsecmd_save.Enabled = False

    cmd_cancel.Enabled = FalseEnd Sub

    Private Sub Form_Unload(Cancel As Integer)rspay.Close

    End Sub

    Public Sub getData()

    Dim order As String

    Dim pay As StringIf 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 payCase "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).Valuetxt_bankname.Text = rspay.Fields(5).Value

    txt_accno.Text = rspay.Fields(6).Value

    txt_chequeno.Text = rspay.Fields(7).ValueElse

    MsgBox "Table is empty"

    End IfEnd Sub

    Private Sub txt_catname_KeyPress(KeyAscii As Integer)If (KeyAscii >= 65 And KeyAscii = 97 And KeyAscii

  • 7/31/2019 Final Documentation...1

    70/75

    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 = Truefm_cheque.Enabled = True

    End Sub

    -- EXIT --

    70

  • 7/31/2019 Final Documentation...1

    71/75

    -- Module--

    71

  • 7/31/2019 Final Documentation...1

    72/75

    Public con As ADODB.ConnectionPublic rs As ADODB.Recordset

    Public rs1 As ADODB.Recordset

    Public rspay As ADODB.RecordsetPublic rsinv As ADODB.Recordset

    Public rsorder As ADODB.RecordsetPublic rscat As ADODB.Recordset

    Public rsitem As ADODB.RecordsetPublic rscust As ADODB.Recordset

    Public rssup As ADODB.Recordset

    Public rssup1 As ADODB.RecordsetPublic rseq_Master As ADODB.Recordset

    Public rseq_details As ADODB.Recordset

    Public rssup_Enquiry As ADODB.RecordsetPublic rssearch As ADODB.Recordset

    Public rsquote_details As ADODB.Recordset

    Public rsquote_Master As ADODB.RecordsetPublic 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 = 0tbox.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

  • 7/31/2019 Final Documentation...1

    73/75

    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

  • 7/31/2019 Final Documentation...1

    74/75

    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

  • 7/31/2019 Final Documentation...1

    75/75

    -- BIBLIOGRAPHY --

    Books referred :-

    Sr.No. Type Description

    1.

    Book name :

    Author :

    Publication :

    Programming in visual basic 6.0

    Julia case Bradley, Anita C Millspough

    Tata Mc-Graw Hill Edition

    2.

    Book name :

    Author :

    Publication :

    Mastering VB6 (1st Indian Edition)

    Evangelos Petront Sos

    BPB publications, B-14 connaugh place New

    Delhi

    3.

    Book name :

    Author :

    Publication :

    The Complete Reference VB6(5th Reprint)

    Nel Jerka

    Tata Mcgraw Hill publishing company Ltd.,

    New Delhi