Book Shop Management

PROJECT OVERVIEW
Problem Definition:
The main aim of the project entitled “BOOK SHOP MANAGEMENT” is to provide an application for the book shop. This project is developed with four layers, which are: 1. 2. 3. 4. Security Employee Details Book Details Maintenance of Sales and Purchase

Problem Description:
1. Security: in manual book keeping all the entries are basically done through entry in the books, where chances of manipulation are more but in this project the records maintained are more secure as an outsider cannot manipulate the database without knowing the password. 2. Employee Details: This project provides a provision for maintaining the employee database apart from the maintenance of Book Database. 3. Book Details: The information regarding books i.e., book name, author, publication etc., are provided for the customers for their convenience. As this process is computerized it is easy for the owner to update the list where this process would have been difficult if he had maintained the records manually. 4. Maintenance of Sales and Purchase: All the Sales and purchases made by the owner can be recorded in the separate database provided by this tool, which would be helpful for him in the future for the development of his establishment.

The National Degree College Basavanagudi

Page 1

Book Shop Management

Components of Existing and Proposed System
Existing System Proposed System

People

Project Manager creates word file after the initial project meeting Project Manager emails tasks to specific contractors Project Manager never knows if tasks have been completed and must call or email the contractors multiple times to check task statuses Project Manager may forget pending tasks brought up at initial meeting; only tasks remembered at subsequent meetings are followed up

Project Manager creates project using new Web-based system Project Manager uses the system to email tasks to specific contractors Contractors use link in email to get to project page and check their assigned tasks Contractors use the new system to show that their task has been completed, or to show that their task has not been completed and give reasons for this Project Manager logs into the new system and checks that status of each projects‟ assigned tasks Managers can log-in to the system and create/view reports

Vendor data, contractor data, project data, task data, subtask data Data

Vendor data, contractor data, project data, task data, subtask data

None Information

Project task reports showing outstanding tasks and reasons for being outstanding Project task reports will also show counts of how many e-mail notifications have been sent and how long overdue tasks are past deadlines Project task reports need to have sorting feature Username and password verification for Project Managers only Randomly generated log-in key for contractors to only see their assigned project tasks Task status and reasons are stored based on actions taken by contractors on their project task pages

Used to create project files that shows assigned tasks in an organized manner Software Functions

Hardware

Workstations Printers Monitors

Workstations Printers Monitors Leased server space

The National Degree College Basavanagudi

Page 2

Book Shop Management

VISUAL BASIC
Introduction:
Visual basic 6.0(VB 6.0) is the recent addition to the family of Microsoft Visual Studio. VB 6.0 is specifically designed to utilize the internet. User can easily create Webbased application called ActiveX executables, which are similar to Internet Explorer 4.0 or higher Web Browsers. VB 6.0 supports ADO (Active X Data Objects), DHTML & IIS (Internet Information Services), and ISAPI‟s (Internet Server API). The formatting, string, numeric functions and new validates events for input controls increase learning rate of a novice programmer Today, VB 6.0 has become technology leader, implementing original ways of doing things before any other visual programming development tools.

History of Visual Basic:
Earlier versions of VB (1.0&2.0) were considered as “Hobbyist„s language” had limited features & dismal performance compared to applications written in other language like C. VB 3.0 became much more database friendly and MS Jet engine was introduced along with MS Access Databases. VB 4.0 supported 32-bit programs; OCX or ActiveX & DDL were introduced along with more powerful Jet engine. VB5.0 was the first version of VB, which provides a native code compiler. i.e. generates Machine code. It also supports ActiveX Documents, ActiveX DLL‟s

Power of VB 6.0:VB is an Event-driven programming language, in which the user will have full control over the execution of the program i.e. the user can click a desired button or any other control tool to invokes an event, which instantly executes the code within that event procedure by the computer. VB is by far the most popular Visual programming tool in existence. Microsoft estimates they there are more than 3,000,000 VB programmers.
The National Degree College Basavanagudi Page 3

Book Shop Management

VB was the first programming language, which pr0vides Drag-and-drop interface design to the general programmer. VB PROVIDES Intelligence (The Visual Basic Text editor uses Intelligence to make writing your code easier and more error-free. IntelliSense options Include Statement Completion, which provides quick access to valid member function or variables, including global, via the Members list. Selecting from the list inserts the member into your code) Integrated Development Environment. VB is unexcelled for RAP (Rapid Application Development) through its new Data Environment and Data Report facilities specially meant for hierarchical database organization & new wizards like Package and Development wizard and Deployment wizard and Data Object generators wizards enables the users to easily create setup programs and archives for the distribution of VB applications& components & middle tier objects that are bound to User Controls & Data Environments. Visual Basic is not a case sensitive language & if the variables are not

System requirements for Visual Basic 6.0 Programming:     
Windows 95/NT4.0 or higher environment 32MB+ RAM 1 GB hard disk or capacity Color monitor (preferably) CD-ROM drive (Visual studio is available only on CD-ROM ) Mouse or any other Pointing Device

Creating Control arrays:
A control array is a group of controls that share the same name, type and same event procedure. A control array should satisfy the following properties:  Contains at least one element and grow to as many elements as required by the application.  It may contain up to 32767 elements.  Each control has a unique index.

The National Degree College Basavanagudi

Page 4

Book Shop Management

There are three ways to create a control array at design time: 1. Assign the same name to more than one control. 2. Copy an existing control and then paste it onto the form. 3. Set the control‟s index property to a value that is not Null.

Data Access Objects (DAO):
Data Access Object was the first object-oriented interface that exposed the Microsoft Jet database engine and allowed Visual Basic developers to directly connect to access tables as well as other databases through ODBC. DAO is suited for either single-system application or for small, local deployments

The General Characteristics of DAO are:
1. Difficulty in coding 2. Flexibility, with facilities to access many different Data sources. 3. Adequate-to-slow performance. 4. Dynamic Data Language (DDl) functionality. 5. Support for complex cursors

To create a new data report:
To create a new data report with the data report designer, a simple project that was created earlier with the Data Environment designer will be used here. If the data report is not created earlier, select project menu, click Add Data Report and visual basic will add the data report to the project explorer window and display on the screen .If the designer is not on the project menu, click Components, click the designer tab and then click Data Report to add the designer to the menu. On the properties window, click Data Source and then click Data Envirnoment1.then click Student Table. Right –click the Data Report designer, a shortcut menu appear on the screen and then click Retrieve Structure to retrieve all the field structures of the command object student table to Header and other sections. The Data Report designer added a new group section to the designer .Each group section has a one-to-one correspondence to a command object in the data environment; in case the new group section corresponds to the student table command object.

The National Degree College Basavanagudi

Page 5

Consider. helps you by keeping track of your inventories. the example of a box full of index cards carrying the names and prices of the books of a particular author.B. Information in a database is stores in rows (records) and columns (fields). a record in a database contains all the information related to an item in just one line. The only is the difference is that instead of index cards. Many of the useful databases are those which can provide latest information. While each index card in the box contains information written in many lines. information regarding the price of a book or the profile of an individual in any organization. The information in a database should be organized in such a way that it is easy to update. Herein comes the role of database management system which helps in systematic organization of information. Amongst the many database management systems available in the market. a computer database is filled with records. for example. Access is quite useful and popular because of its unique features. invoicing or anything else that you consider important. payroll. KOTUR DIETAL & DIETAL Column 4 Field 4 PRICE 150 450 Table The National Degree College Basavanagudi Page 6 . it can quickly provide the information. a database is like a box containing index cards. In computers. A database has many advantages. And only then. Defining a Database A database is an organized collection of related information about a particular subject or purpose. whether electronic or manual. for instance. as shown below: Column 1 Field 1 BOOK NAME C PROGRAMMING VISUAL BASIC Column 2 Field 2 BOOK CODE 4521 4522 Column 3 Field 3 AUTHOR P.Book Shop Management MICROSOFT ACCESS Databases are store –houses of information. Any stored information or a database. For retrieving any information. we fall back on databases.

The main advantage of a relational database management system is that you can simultaneously use more than one database to see information stored in them. You can store different types of data in different tables. BOOK CODE. Objects of a Relational Database Microsoft Access is based on RDBMS. RDBMS A Relational Database Management system is defined as a method of viewing information from several. a database can contain large amount of information. In a table. Thus. Another advantage of relational database design is that you can extract fields from different databases and see them on the screen at one time thus reducing the complexity. we have shown only two records. It also acts like an assistant to you who is always ready to store. But in computers. Therefore. separate databases that relate to one another through keywords or values. In the given database. the first record contains the information about the book C-PROGRAMMING.e. the information is stored in rows and columns. The National Degree College Basavanagudi Page 7 . i. Such type of database is called an electronic database. AUTHOR and PRICE are called field names. The second record contains information about the book VISUAL BASIC. organize and extract information. to have better understandings of working in Access. an electronic database is a collection of logically related information that you store in your computer. In the above example. BOOK NAME.Book Shop Management The names given to each column. you should be familiar with four basic objects of RDBMS as described below: RDBMS Tables Queries Forms Reports Tables A Table is a collection of information on a specific topic.

Book Shop Management Queries Queries are a systematic way of retrieving information from a database. you can view. keeping & Analyzing information Access Database Helps in Keeping track of information Retrieving information easily Creating any kind of reports By keeping track of and Analyzing information Functions of a Database Management System (DBMS) A database management system is a tool for managing information. But if you wish to enter or update information in your database. Decision making. In such a case. stored in the database. you can use the Reports feature to design the requires report in such a way that it becomes easy for your boss to quickly understand all its details. Forms present one record at a time on the screen. Forms Forms present the information stores in a database in an easy to use format. enter or update information in a database. Managing a database includes the following functions:      Creating a Database Modifying a Database Adding Records in a Database Deleting a Records in a Database Selecting Records in a Database The National Degree College Basavanagudi Page 8 . Reports Let us assume that you are in charge of maintaining the list food items in your company and your boss has asked you to produce a report of the items which have a demand in the market. Through Forms.

SQL was first implemented in 1974 at IBM the San Jose Research Laboratory. The Relational Database model for database design was invented by Dr. The American National Standards Institute (ANSI) is continually updating their versions of SQL standards. Cobb in 1969 and published in Computer World in 1985.F. SQL is essentially a non-procedural language that uses Englishlike words to talk to a database.Book Shop Management Brief History of SQL SQL or Structured Query Language is the language used to talk to Relational Databases. The National Degree College Basavanagudi Page 9 .E.

There are two main activities in this phase: 1. Requirement Specification: It focuses on clearly specifying the requirement in a document issues such as Representation Specification languages and Tools In most software projects. The basic goal of the software engineering is to provide high quality software at low cost.Book Shop Management SOFTWARE ENGINEERING Software Engineering is a systematic approach to the development. maintenance and requirement of software. operation. The basic activity or phrases to be performed for developing a software system are: Requirement Analysis: In this phase. the requirement phase ends with a document describing all requirements. The design of a system is perhaps the most critical factor affecting the quality of the software and has a major impact on later phase. The design specifications that get generated at the end of this phase are technical in nature and contain: The National Degree College Basavanagudi Page 10 . Software Design: The purpose of the design phase is to specify the particular software system that will meet the stated requirements. 2. which is called as Software Requirement Specification (SRS) document. The emphasis in requirement analysis is on identifying what is needed from the system and how the system will achieve the goal. the software engineers carry out a detailed study of user‟s requirements. Problem Analysis: Here the analyst has to understand problem and its content.

Book Shop Management 1. If design is performed in a detailed manner coding can be accomplished easily. sometimes in many levels. Object Oriented Programming (OOP) is a programming parading that uses “objects“ to design application and computer programs. but eventually grow in complexity and completeness. Solid works. Hence during this phase the focus should be on developing the programs that are easy to write. The coding phase affects both testing and maintenance phase. and how they interact with each other to produce the desired results 2. which then in turn are linked. System Design: It is also called as top level design. Engineers call this piece part design. Databases and Data structures 3. It aims to identify the modules that should be in the system. until a complete top-level system is formed. and Autodesk Inventor users can design products as pieces not part of the whole and later add those pieces together to form assemblies like building LEGO. Simplicity and Clarity should be tried to follow during this phase. whereby the beginnings are small. Detailed Design: During this phase. The National Degree College Basavanagudi Page 11 . These elements are then linked together to form larger subsystem. internal logic of each of the modules specified in System Design is decided and further details of data structure and algorithmic design of each of the modules is specified Coding: The goal of this phase is to translate design of the system into code in a give programming language. Algorithms The design activity is divided into two phases: 1. Coding Style: In a bottom-up approach the individual base elements of the system are first specified in great detail. In Mechanical Engineering with software program such as Pro/ENGINEER. This strategy often resembles a “seed” model. the specification of this module. User Interfaces 2.

The goal here is to see if the module can be integrated properly. developed in isolation and subject to local optimization as opposed to meeting a global purpose. During testing the program to be tested is executed with a set of Test Cases and output of the program for the test cases is evaluated to determine if the program is performing as it is expected to. the emphasis being on testing interfaces between modules. Integration Testing: Here many tested module are combined into subsystems. A bottom-up approach is the piecing together of systems to give rise to grander systems. There are four major types of testing: 1. "organic strategies" may result in a tangle of elements and subsystems. This strategy often resembles a "seed" model. The coders himself often perform this simultaneously along with coding of the module. Testing: Testing plays a very critical role for quality assurance and for insuring the reliability of software. These elements are then linked together to form larger subsystems. Unit Testing: Here each module is tested separately.Book Shop Management This bottom-up approach has one weakness. until a complete top-level system is formed. 3. this approach is more suitable as it starts from some existing modules. We need to use a lot of intuition to decide the functionality that is to be provided by the module. However. sometimes in many levels. System Testing: Here the system is tested against the system requirements to see if all the requirements are met and if the system performs as per the requirements specified. which then in turn are linked. thus making the original systems sub-systems of the emergent system. whereby the beginnings are small but eventually grow in complexity and completeness. In a bottom-up approach the individual base elements of the system are first specified in great detail. If a system is to be built from existing system. 2. The National Degree College Basavanagudi Page 12 . which are then tested.

1 The National Degree College Basavanagudi Page 13 . 20104 4. books Checks for valid Password and Should go to Administrator Form Checks for the valid username and should go to Administrator Form Billing Form Test Case ID Test Case Description Test Case Procedure Test Data Expected Result Actual Result 1. Checking for Valid ISBN Stored in the Database Checking for Quantity Checking for valid ISBN Number Checking for Quantity Place the Cursor in the Book Code Textbox Place the Cursor in the Quantity Text Box Place the cursor in the Book Code Textbox Place the Cursor in the Quantity Text Box 201a0 Invalid ISBN Number Invalid ISBN Number 0 Quantity Cannot be Zero The Details of the book gets added to the billing List The amount is being calculated with the basic price of the amount Quantity cannot be Zero The Details of the book gets added to the billing List The amount is being calculated with the basic price of the amount 3. 2. Sample Test Cases: Login Form Test Case ID Test Case Description Test Case Procedure Test Data Expected Result Actual Result 1. 3.Book Shop Management 4. Checking for Username Checking for Password Checking for Username Checking for Password Place the Cursor in the Username Textbox Place the Cursor in the Password Textbox Place the Cursor in the Username Textbox Place the Cursor in the Password Textbox Pustmane Invalid Username Invalid Username Invalid Password Accepted and entered into Administrator Form Accepted and entered into Administrator Form 1234 Invalid Password Pustakamane 4. 2.

Any changes for the system required are intimated to the analyst by the user. If the change is approved. to ensure correct working of the system at all times. The analyst prepares an incremental model accessing the input of modification. Programmers help to modify and test the programs.Book Shop Management Maintenance: Maintenance is a process of repairing and upgrading the system when required. The management decides whether or not to implement the change. the analyst modifies the system documentation to reflect the changes. Maintenance is required when: User requests change in the system Programmers modify the programs Testing team test the modified programs Analyst modifies all system modification to reflect change The National Degree College Basavanagudi Page 14 .

Book Shop Provides Book Info Name No. of Cop Maintains Generates Do Salary Employee ID Em Qu ant ity Book Name Book ID Bill Date Bill No Maintains Book ISBN Purchase Tax Invoice Price Amount Net Amo unt Disc ount Total Grand Total Qu Stock No. of Copies Book Name Boo Book Shop Management The National Degree College Basavanagudi Page 15 .Book Shop Management Entity Relationship Diagram Pin Code Address Book ISBN Phone No.

Book Shop Management Data Flow Diagram Supplies Payments Supplier Receive Payment Arrange Order Supply Check for Discrepancy Administrator Owner Takes Order Supply Process Order Produce Bill Customer Payment Receipt The National Degree College Basavanagudi Page 16 .

Book Shop Management TABLES 1. Employee Table Field Name ID Name DOB Gender Address Phone Salary Data Type Number Text Date/Time Text Memo Number Number Description Employee ID Employee Name Date Of Birth Gender Emplyee Address Contact Number Employee Salary The National Degree College Basavanagudi Page 17 . Billing Table Field Name Number ISBN Particulars Quantity Price Total Data Type Number Number Text Number Number Number Description Bill Number Book Code Book Name Quantity Selling Price Total Amount 2. Customer Table Field Name Number Date Name Discount Disc_Amount Total Data Type Number Date/Time Text Number Number Number Description Bill Number Billing Date Customer Name Discount Discount Amount Total Amount 3.

Stock Table Field Name ISBN Name Author Publication Buying_Price Seeling_Price Category Stock Data Type Number Text Text Text Number Number Text Number Description Book Code Book Name Book Author Publication Name Buying Price Selling Price Category Number The National Degree College Basavanagudi Page 18 .Book Shop Management 4. Purchase Table Field Name Date Number ISBN Name Author Publication Buying_Price Selling_Price Category Qty Data Type Date/Time Number Number Text Text Text Number Number Text Number Description Date/Time Bill Number Book Code Book Name Book Author Publication Name Buying Price Selling Price Category Number of Copies 5.

In this form Bill no is incremented automatically each time the purchase is made by the customer. If the book being purchased already exits in the stock all the details are automatically filled else user has to manually enter the details. The employee number is auto generated. The National Degree College Basavanagudi Page 19 . Here we can generate particular employee report or all the employee reports. Form 3: Purchase This form contains information about the books being purchased . Form 6: Change Password This form is used by the user to change his existing password.Here the bill date is auto generated and it is in the format DD/MMM/YYYY and the user can edit buying and selling price according to the market. Form 4: Tax Invoice Here the user prepares/generate invoice for the customer. And here the user has the right to change password. Form 5: Stock Info Here the customer gets the respective book details available in the stock on request and number of copies available in the book shop. Stock Info.Book Shop Management USER MANUAL Form 1: Administrative Menu Here Logged in User can access different forms such as Purchase. Form 2: Employee Details This form holds the personal details of the Employees. Firstly the user has to enter the existing password in order to change the password. Tax Invoice . Employee Details. birth date of the employee has to be entered in DD/MM/YYYY format. If necessary the user can allow the discount for the purchase made by the customer and finally Invoice Bill is printed.

Book Shop Management SCREEN SHOTS The National Degree College Basavanagudi Page 20 .

Book Shop Management The National Degree College Basavanagudi Page 21 .

Book Shop Management The National Degree College Basavanagudi Page 22 .

Book Shop Management The National Degree College Basavanagudi Page 23 .

"Message" Text2.mdb") Set rs = db. vbInformation + vbYesNo.Text <> password Then MsgBox "Please Enter the Username & Password Correctly".Hide ElseIf Text1.Fields(1) If Text1.Text = "" End Sub Private Sub Form Load () Set db = OpenDatabase ("E:\Book Shop\database.SetFocus End If Text1.Text = "" Text2.OpenRecordset ("Password") Timer1.Recordset Dim con As DAO.SetFocus Text1. vbInformation + _ vbOKCancel + vbDefaultButton1.Text <> name Or Text2.Text = "" Text2.Text = name And Text2.Database Private Sub Login Click () Dim password.SetFocus Text1.Text = "" Then MsgBox "Please Enter the User Name & Password". name As String name = rs.Enabled = True frmadmin.Text = "" And Text2.Connection Dim db As DAO.Fields(0) password = rs.Text = password Then Timer1.Text = "" Text2.Enabled = True End Sub The National Degree College Basavanagudi Page 24 .SetFocus ElseIf Text1. "Message" Text1.Show frmlogin.Book Shop Management LOGIN FORM CODE Dim rs As DAO.

Caption = Format(Date. vbYesNo + vbQuestion. "hh:mm:ss AM/PM") End Sub Private Sub Exit_Click() Dim temp As Integer temp = MsgBox("Are you sure to Quit". "dd-mmm-yyyy") Label7.Show End If End Sub The National Degree College Basavanagudi Page 25 .Caption = Format(Time.Book Shop Management Private Sub Timer1_Timer() Label4. "Message") If temp = vbYes Then Beep Unload Me Else frmlogin.

Show End Sub The National Degree College Basavanagudi Page 26 . vbOKCancel + vbQuestion.Show End If End Sub Private Sub mnupurchase_Click() frmpurchase.Text1.Show End Sub Private Sub mnulogout_Click(Index As Integer) Dim temp temp = MsgBox("Do you really want to quit".Show frminvoice.Show End Sub Private Sub mnutax_Click() frminvoice.Show End Sub Private Sub mnuEmployee_Click() frmemployee.SetFocus Private Sub mnuinventory_Click() frmchkstock.Book Shop Management ADMINISTRATOR FORM CODING Private Sub mnuchangepassword_Click() frmchangepsw. "Administrator Message") If temp = vbOK Then Unload Me frmlogin.

Fields(1) If Text1.Text <> "" Then If Text2.Database Private Sub Exit_Click() Unload Me End Sub Private Sub Form_Load() Set db = OpenDatabase("e:\Book Shop\Database.Fields(1) = password The National Degree College Basavanagudi Page 27 .Book Shop Management CHANGE PASSWORD CODING Dim rs As DAO.Edit rs.mdb") Set rs = db.Text = password And Text2. "Admin Message" Exit Sub End If If Len(Text2) < 7 Then MsgBox "Entered Password should at least contain 7 Characters".Recordset Dim con As DAO.Text <> password Then MsgBox "Enter the Password correctly".OpenRecordset("Password") End Sub Private Sub reset_Click() Dim name As String Dim password As String password = rs.Connection Dim db As DAO. vbOKOnly. vbInformation. "Pustakamane" Text2 = "" Text3 = "" Text2.Text <> "" And Text3.Text Then password = Text2.Text rs.Text = Text3.SetFocus Exit Sub End If If Text1.

Text = "" Text2.Book Shop Management rs. vbInformation.Text = "" End Sub The National Degree College Basavanagudi Page 28 . "Admin Message" Beep Else MsgBox "Enter the Password Correctly".Text = "" Text3.Update MsgBox "Password Changed Successfully". vbInformation + vbOKOnly Text2 = "" Text3 = "" Exit Sub End If End If Text1.

Hide Unload Me frmadmin.Enabled = True End Sub Private Sub Timer1_Timer() frmcredits.Show End Sub The National Degree College Basavanagudi Page 29 .Book Shop Management SPLASH FORM (CREDITS) CODING Private Sub Form_Load() Timer1.Refresh Me.

Description End Sub Private Sub Clear_Click() Clear_C Find.Connection Dim rm As DAO. "Message" Exit Sub Err_Add: MsgBox Err.Enabled = False first.Enabled = False next1.Enabled = True End Sub The National Degree College Basavanagudi Page 30 .Visible = False Add.Book Shop Management EMPLOYEE FORM CODING Dim db As DAO.Enabled = False last.Enabled = False Report.Recordset Private Sub Add_Click () On Error GoTo Err_Add Find.Database Dim con As DAO.Enabled = False MsgBox "Enter The Record Details & Click on Save Button".Enabled = False Clear_C Id_Gen Text2.Enabled = False previous.SetFocus Find. vbInformation.Enabled = False Delete.

Refresh DataReport2.Show Unload DataEnvironment1 End Sub Private Sub Delete_Click() On Error GoTo Err_Del Dim wish As Integer wish = MsgBox("Delete Current Record Yes/No".MoveNext If rm. "DELETION!!") If wish = vbYes Then rm. vbInformation.MoveLast End If Clear_C Fill End If Exit Sub Err_Del: MsgBox Err.Employee1 Trim(Temp) End With DataReport2.Text = "Please Specify" Then MsgBox "Select the Gender to Proceed".EOF=True Then rm. vbQuestion + vbYesNo.SetFocus End If End Sub Private Sub Details_Click() Dim Temp As Integer Temp = InputBox("Enter The Employee ID:") Load DataEnvironment1 With DataEnvironment1 . "Message" Combo1.Description Clear_C End Sub The National Degree College Basavanagudi Page 31 .Delete rm.Book Shop Management Private Sub Combo1_LostFocus() If Combo1.

Text = "" Then MsgBox "Please enter the Employee ID".MoveNext Loop rm.Book Shop Management Private Sub Exit_Click() Unload Me End Sub Private Sub Find_Click() If Text1.SetFocus End If rm.Text = rm(0) Then Fill End If rm.mdb") Set rm = db. vbInformation + vbOKOnly.OpenRecordset("Employee") End Sub Public Sub Fill() Text1 = rm(0) Text2 = rm(1) Text3 = rm(2) Text6 = rm(4) Combo1 = rm(3) The National Degree College Basavanagudi Page 32 .MoveFirst Fill End Sub Private Sub Form_Load() Set db = OpenDatabase("E:\Book Shop\Database.MoveFirst End Sub Private Sub first_Click() rm. "Message" Text1.EOF = True If Text1.MoveFirst Do Until rm.

MoveFirst End If Fill Exit Sub End Sub The National Degree College Basavanagudi Page 33 .MovePrevious If rm.BOF Then MsgBox "Beginning of Employee Record".MoveLast Fill End Sub Private Sub mnuexit_Click() Unload Me End Sub Private Sub mnupurchase_Click() frmpurchase.Book Shop Management Text4 = rm(5) Text5 = rm(6) End Sub Private Sub last_Click() rm. vbInformation rm. vbInformation rm.EOF Then MsgBox "End of Employee Record".Show End Sub Private Sub next1_Click() rm.MoveNext If rm.MoveLast End If Fill End Sub Private Sub previous_Click() rm.

Text rm(1) = Text2.Enabled = True The National Degree College Basavanagudi Page 34 .SetFocus Exit Sub End If On Error GoTo Err_Save rm.Enabled = True last.AddNew rm(0) = Text1.Text rm(3) = Combo1. vbInformation.Text rm(5) = Text4.Update MsgBox "Record Saved Successfully".Text rm.Book Shop Management Private Sub Report_Click() DataReport1.SetFocus Exit Sub End If If Text6 = "" Then MsgBox "Please Enter Employee's Address" Text6.Show End Sub Private Sub Save_Click() If Text2 = "" Then MsgBox "Please Enter Employee's Name" Text2.Enabled = True next1. "Message" Add.Text rm(2) = Text3.Text rm(4) = Text6.Enabled = True first.Text rm(6) = Text5.SetFocus Exit Sub End If If Text5 = "" Then MsgBox "Please Enter Employee's Salary" Text5.Enabled = True previous.

Book Shop Management Report.Description End Sub Private Sub Text2_KeyPress(KeyAscii As Integer) Dim char As String char = Chr(KeyAscii) If char >= "0" And char <= "9" Then KeyAscii = 0 Else If char >= "a" And char <= "z" Then KeyAscii = KeyAscii .Enabled = True Delete. vbInformation.SetFocus End If End Sub Public Sub Clear_C() Text1 = "" Text2 = "" Text3 = "" Text4 = "" Text5 = "" The National Degree College Basavanagudi Page 35 .Enabled = True Text1.Text = "" Or Not IsDate(Text3) Then MsgBox "Enter a Valid Date of Birth".32 End If End If End Sub Private Sub Text3_LostFocus() If Text3. "Employee Message" Text3 = "" Text3.Enabled = True Find.Enabled = True Clear_C Exit Sub Err_Save: MsgBox Err.

Fields(0)) var = var + 1 Text1.MoveLast var = Val(rm.Visible = True End Sub Public Sub Id_Gen() Dim var As Integer rm.32 End If End Sub The National Degree College Basavanagudi Page 36 .Text = "Please Specify" Find.Enabled = False Text1.Text = var End Sub Private Sub Text4_KeyPress(KeyAscii As Integer) If KeyAscii < Asc("0") Or KeyAscii > Asc("9") Then KeyAscii = 0 MsgBox "Enter Numbers Only" End If End Sub Private Sub Text5_KeyPress(KeyAscii As Integer) If KeyAscii < Asc("0") Or KeyAscii > Asc("9") Then KeyAscii = 0 MsgBox "Enter Numbers Only" End If End Sub Private Sub Text6_KeyPress(KeyAscii As Integer) Dim char As String char = Chr(KeyAscii) If char >= "a" And char <= "z" Then KeyAscii = KeyAscii .Book Shop Management Text6 = "" Combo1.

count1 As Integer Dim db As DAO.Recordset Private Sub Calculate_Click() Dim i.Val(Text4(i)) rs.Edit rs(7) = rs(7) . b As Double 'Dim discount As Integer sum = 0 If Text10 = "" Then MsgBox "Enter Customer Name" Text10. a. discount.MoveFirst Do Until rs.SetFocus Exit Sub End If For i = 0 To count1 If i > 7 Then Add.EOF = True If rs(i) = Text2(i) Then rs.Recordset Dim rs3 As DAO.Update End If rs.Book Shop Management BILLING FORM CODING Dim i.Enabled = False MsgBox "Please Genrate the Bill to proceed" End If Text6(i) = Val(Text4(i)) * Val(Text5(i)) sum = sum + Val(Text6(i)) rs.Connection Dim rs As DAO. Temp As Integer Dim sum.MoveNext Loop Next i The National Degree College Basavanagudi Page 37 .Recordset Dim rs2 As DAO.Database Dim con As DAO.

AddNew rs3(0) = Text9 rs3(1) = Text2(i) rs3(2) = Text3(i) rs3(3) = Text4(i) rs3(4) = Text5(i) rs3(5) = Text6(i) rs3.Update Next i Add.SetFocus Exit Sub End If If Text7 = "" Or Text7 = 0 Then The National Degree College Basavanagudi Page 38 . "Message" Text1. vbInformation + vbOKOnly.Book Shop Management Text8 = sum discount = -(sum * Val(Text12) / 100) For i = 0 To count1 rs3.AddNew rs2(0) = Text9 rs2(1) = Text11 rs2(2) = Text10 rs2(3) = Text12 rs2(4) = discount rs2(5) = Text8 rs2.Enabled = False MsgBox discount Text8 = (sum + discount) rs2.Visible = True End Sub Private Sub Add_Click() Dim mess As String Dim Temp As Integer If Text1 = "" Then MsgBox "Please Enter the Book ISBN".Update Calculate.Visible = True Text8.

"Message" Exit Sub Text7.1 Text1 = "" Text7 = "" rs.EOF = True If Text1 = rs(0) Then If Val(Text7.Visible = True rs.Book Shop Management MsgBox "Please Enter the Number of Quantity".MoveFirst Text1.SetFocus Exit Sub End If rs.MoveFirst Do Until rs.MoveNext Loop Calculate.EOF = True If Val(Text1) = rs(0) Then Text2(i) = rs(0) Text3(i) = rs(1) Text4(i) = Text7 Text5(i) = rs(5) i=i+1 count1 = i .SetFocus End If rs.MoveNext Loop End Sub The National Degree College Basavanagudi Page 39 .MoveFirst Do Until rs.Text) > rs(7) Then Temp = rs(7) mess = "You have only " & Temp & " Quantity to Sell" MsgBox mess Exit Sub End If End If rs. vbInformation + vbOKOnly.

Visible = False : i = 0 End Sub The National Degree College Basavanagudi Page 40 .Book Shop Management Private Sub Generate_Click() If Text9 = "" Then MsgBox "Please Enter the Bill Number to Generate" Generate.Visible = False Text8.OpenRecordset("Billing") Call Bill_Gen Calculate. "dd-mmm-yyyy") Set db = OpenDatabase("E:\Book Shop\Database.OpenRecordset("Stock") Set rs2 = db.SetFocus Exit Sub Else Load DataEnvironment1 With DataEnvironment1 .Refresh DataReport3.Command1 Trim(Text9.Text) End With DataReport3.Visible = False Text8.Visible = False End If End Sub Private Sub Exit_Click() Unload Me End Sub Private Sub Form_Load() Text11 = Format(Date.Show Unload DataEnvironment1 Call Clear Call Bill_Gen Calculate.OpenRecordset("Customer") Set rs3 = db.mdb") Set rs = db.

MoveLast Temp = rs2(0) Temp = Temp + 1 Text9 = Temp End Sub Public Sub Clear() Dim i.Enabled = True End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii < Asc ("0") Or KeyAscii > Asc("9") Then KeyAscii = 0 MsgBox "Enter Numbers Only" End If End Sub Private Sub Text10_KeyPress (KeyAscii As Integer) Dim char As String char = Chr(KeyAscii) If char >= "0" And char <= "9" Then KeyAscii = 0 Else If char >= "a" And char <= "z" Then The National Degree College Basavanagudi Page 41 .Book Shop Management Public Sub Bill_Gen() Dim Temp As Integer rs2. j As Integer For i = 0 To 7 Text2(i) = "" Text3(i) = "" Text4(i) = "" Text5(i) = "" Text6(i) = "" Next i Text8 = "" Text12 = "" Text10 = "" Add.

32 End If End If End Sub Private Sub Text7_KeyPress(KeyAscii As Integer) If KeyAscii < Asc("0") Or KeyAscii > Asc("9") Then KeyAscii = 0 MsgBox "Enter Numbers Only" End If End Sub The National Degree College Basavanagudi Page 42 .Book Shop Management KeyAscii = KeyAscii .

Text rs1(9) = Text9.MoveFirst Do Until rs2.Edit var = Val(rs2(7)) rs2(7) = var + Text9.Recordset Dim db As DAO.Recordset Dim rs2 As DAO.Text rs1(5) = Text6.Text rs1(7) = Text8.Text rs2.Text rs1(8) = Combo1.Database Dim con As DAO.Text rs1(4) = Text5.Text = "" Then MsgBox "Please Enter the Bill Number" Exit Sub End If rs1.Text rs1(2) = Text3.Text rs1.Text rs1(1) = Text2.Text rs1(6) = Text7.Update The National Degree College Basavanagudi Page 43 .Text rs1(3) = Text4.Book Shop Management PURCHASE FORM CODING Dim rs1 As DAO.AddNew rs1(0) = Text1.Update rs2.EOF = True If rs2(0) = Text3.Text Then rs2.Connection Private Sub Clear_Click() Clear1 End Sub Private Sub Done_Click() Dim Temp As Boolean Dim var As Double If Text3.

Update MsgBox "Record Saved Successfully". "Message" Clear1 Exit Sub End Sub The National Degree College Basavanagudi Page 44 .Text rs1(8) = Combo1.Text rs1(7) = Text8.AddNew rs2(0) = Text3.Text rs2(5) = Text8.MoveNext Loop End Sub Private Sub Done1_Click() Dim Temp As Boolean Dim var As Double rs1.Text rs1(5) = Text6.Update rs2.Book Shop Management MsgBox "Record Saved Successfully".Text rs2(6) = Combo1.Text rs1(1) = Text2.Text rs1. vbInformation.Text rs2(4) = Text7.AddNew rs1(0) = Text1. vbInformation.Text rs1(6) = Text7.Text rs2.Text rs1(2) = Text3.Text rs1(9) = Text9.Text rs1(3) = Text4.Text rs2(3) = Text6.Text rs2(1) = Text4.Text rs1(4) = Text5.Text rs2(7) = Text9.Text rs2(2) = Text5. "Message" Clear1 Exit Sub End If rs2.

mdb") Set rs1 = db.Enabled = True Text7 = "" Text8 = "" rs2.Enabled = True Text8.Edit rs2(4) = Val(Text7) rs2(5) = Val(Text8) rs2.Book Shop Management Private Sub Edit_Click() Text7.EOF = True If Text3 = rs2(0) Then If Text7 <> "" Or Text8 <> "" Then rs2. Re-Enter" Exit Sub End If Exit Sub End If rs2.MoveFirst Do Until rs2.Enabled = False Clear1 End Sub The National Degree College Basavanagudi Page 45 .MoveNext Loop End Sub Private Sub Exit_Click() Unload Me End Sub Private Sub Form_Load() Set db = OpenDatabase("E:\Book Shop\Database.Update Else MsgBox "Buying Price or Selling Price Missed.OpenRecordset("Purchase") Set rs2 = db.OpenRecordset("Stock") Text1.

Enabled = True Text8.Enabled = True Text7.Enabled = True Text4. "DD-MMM-YYYY") 'Text2 = "" Text3 = "" Text4 = "" Text5 = "" Text6 = "" Text7 = "" Text8 = "" Text9 = "" Combo1 = "Please Specify" Text3.Enabled = True Text5.Text = "" Then MsgBox "Please Enter the Purchase Bill Number" Text2.Enabled = True Text6.Book Shop Management Public Sub Clear1() Text1 = Format(Date.SetFocus Exit Sub End If The National Degree College Basavanagudi Page 46 .Enabled = True End Sub Public Sub Fill() Text3 = rs2(0) Text4 = rs2(1) Text5 = rs2(2) Text6 = rs2(3) Text7 = rs2(4) Text8 = rs2(5) Combo1 = rs2(6) 'Text9 = rs2(7) End Sub Public Sub Find1() If Text2.Enabled = True Combo1.

Enabled = False Text8.Enabled = False Text4.Enabled = False Text5.Text = "" Then MsgBox "Enter The Book Id & then Search".Enabled = False Text6.Enabled = False Text7. "Message" Text4.SetFocus Done.MoveFirst Do Until rs2.Book Shop Management If Text3.Enabled = False Text9.Text Then Temp = True Fill Done.Visible = True Done1. vbInformation.EOF = True If rs2(0) = Text3.MoveNext Loop End Sub Private Sub Text3_LostFocus() Find1 End Sub The National Degree College Basavanagudi Page 47 .Visible = True Text3.Text <> rs2(0) Then Done.Visible = False Exit Sub End If If Text3.Visible = True End If rs2.SetFocus End If rs2.Visible = False Done1.Enabled = False Combo1.

Text = "" Text4.SetFocus End If End Sub Private Sub Text5_Change() If IsNumeric(Text5) Then MsgBox "Enter Character Only".Text = "" Text5.SetFocus End If End Sub Private Sub Text4_Change() If IsNumeric(Text4) Then MsgBox "Enter Character Only".SetFocus End If End Sub The National Degree College Basavanagudi Page 48 . vbInformation.Text = " " Text3. "Message" Text4. "Message" Text3. "Message" Text2.SetFocus End If End Sub Private Sub Text3_KeyPress(KeyAscii As Integer) If KeyAscii < Asc("0") Or KeyAscii > Asc("9") Then KeyAscii = 0 MsgBox "Please Enter No Only". vbInformation. vbInformation. "Message" Text5. vbInformation.Book Shop Management Private Sub Text2_KeyPress(KeyAscii As Integer) If KeyAscii < Asc("0") Or KeyAscii > Asc("9") Then KeyAscii = 0 MsgBox "Please Enter No Only".Text = " " Text2.

Text = " " Text9. "message" End If End Sub Private Sub Text9_KeyPress(KeyAscii As Integer) If KeyAscii < Asc("0") Or KeyAscii > Asc("9") Then KeyAscii = 0 MsgBox "Please Enter No Only". vbInformation.SetFocus End If End Sub The National Degree College Basavanagudi Page 49 . vbInformation. "Message" Text9.SetFocus End If End Sub Private Sub Text7_KeyPress(KeyAscii As Integer) If KeyAscii < Asc("0") Or KeyAscii > Asc("9") Then KeyAscii = 0 MsgBox "Enter Numbers Only".Book Shop Management Private Sub Text6_Change() If IsNumeric(Text6) Then MsgBox "Enter Character Only". vbInformation. vbInformation. "Message" Text6. "message" End If End Sub Private Sub Text8_KeyPress(KeyAscii As Integer) If KeyAscii < Asc("0") Or KeyAscii > Asc("9") Then KeyAscii = 0 MsgBox "Enter Numbers Only".Text = "" Text6.

Book Shop Management APPENDICES Appendix I – Screen Shots Appendix II – Source Code The National Degree College Basavanagudi Page 50 .

Book Shop Management CONCLUSION Development of this project has been great experience in knowing about Visual Basics and MS-Access skills. We thank our friends and seniors who gave us valuable suggestions to carry out this project. They have been a helping hand in keeping us in good spirits throughout this project. The National Degree College Basavanagudi Page 51 . Our lecturers have been a great source of technical support and inspiration in the completion of this project.

0 .A. M. Software Engineering .Book Shop Management BIBLIOGRAPHY 1. Software Engineering and Visual Basics 6.Dr.Pankaj Jalote 3. Visual Basics 6.0 . Ramaa 2.Dietal & Dietal The National Degree College Basavanagudi Page 52 .

Sign up to vote on this title
UsefulNot useful