spellofseakumarprasun.yolasite.com/resources/library management syste…  · web viewit got the...

94
A Project Report On “Library Management System” Submitted by Prasun Kumar In partial fulfillment for the award of the degree Of MASTER IN BUSINESS ADMINISTRATION (M.B.A.) (Marketing & I.T.) Session 2008-2010 Under guidance of:- Prof. P.K. Sharma Department of Management 1

Upload: others

Post on 31-Jul-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

AProject Report

On“Library Management System”

Submitted byPrasun Kumar

In partial fulfillment for the award of the degree

Of

MASTER IN BUSINESS ADMINISTRATION (M.B.A.)(Marketing & I.T.)

Session 2008-2010

Under guidance of:-Prof. P.K. Sharma

Department of Management

BIRLA INSTITUTE OF TECHNOLOGY, MESRA

JAIPUR CAMPUS

1

Page 2: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Certificate Of Approval

This project titled “Library Management System”. Is hereby approved as a credible study of business management carried out by Prasun Kumar (4MBA/4041/08) student of MBA 6th trimester is satisfactory manner to warrant its acceptance as a prerequisite to the degree of MBA for which it has be submitted.

Internal External

2

Page 3: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Certificate Of Guide

This is to certify that “Prasun Kumar” (4MBA/4041/08) is a student of MBA 6th trimester and had completed his project under my guidance.This project is bonafide work of student and has not been submitted elsewhere for the award of any degree

Prof. P. K. Sharma

3

Page 4: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Acknowledgement

I take this opportunity to express my gratitude to all the people who are instrumental in the successful completion of this project.

I would like to express my sincere gratitude to my Project guide, Prof. P. K. Sharma for her continuous support & guidance towards making this project success.

I would also like to thank my HOD, Prof. P. K. Sharma for his kind guidance towards analyzing the requirements of the project to be developed.

I would also like to show my greatest appreciation to all those who have directly & indirectly supported me with their encouragement & guidance. Without their encouragement & guidance this project would not have been a success.

Prasun Kumar4MBA/4041/086Th Trimester

4

Page 5: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

PREFACETo achieve excellence in the field of knowledge and skill requires

training with sound theoretical background. The well planned, properly executed, and objectively evaluated industrial training helps a lot in developing the good work culture. It provides linkages between student and Industry/Organization in order to develop practical approach on broad understanding of process and mode of operation of an organization.

During Training period, student get real first hand experiences on working in the actual environment. Most of the, theoretical knowledge that have gained during the course of their studies is put to practice test. For a student of Management, such training immensely helps in acquiring the best current knowledge.

I had the opportunity to have the real practical experience, doing my training in the Usha Martin LIMITED which has increased my sphere of knowledge and skill to a great extent. Now I am better equipped to handle the real things by undergone such training. The main aim of this training was to improve Knowledge as well as learn Organizational Behaviors.

I am thankful to Dr. Rupali Sharma (H.O.D, Deptt. Of Management), and Prof. P.K. Sharma (My Guide) for their support.

Prasun KumarVIth TrimesterMBA (Marketing & I.T.)

5

Page 6: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Contents:

Sl.No. Title1. Company Profile2. Synopsis of Library Management

System3. Hardware & Software

Requirements4. Intoduction to Visual Basic 6.05. Tables Used6. Data Flow Diagram7. Entity Relationship Diagram8. Login Form9. Add New User Form

10. Change Password Form11. Splash Form12. Add New Member Form13. Modify/Delete Member Form14. Member Information Form15. Add New Book Form16. Modify Book Form17. Delete Book Form18. Book Issue Form19. Book Return Form20. Book Detail Form21. Issued Book Details Form22. Book Information Form23. Conclusion24. Limitations

6

Page 7: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

25. References

Company ProfileTHE GROUP

The Usha Martin Group of industries is product, diversified, multination conglomerate with an annual turnover of USS300 million. Incorporated in 1960, Mr. B.K. Jhawar, the present chairman, pioneered it was promoted to manufacture Steel wire & wire ropes in collaboration with martin black of Scotland as a joint Indo-British venture. From 1st October 1997 this company has been merged with Usha Beltron limited. From April 2001 the name has been changed to Usha Beltron limited (wire & wire rope division)

UM Singapore Established in 2000, is a wholly owned subsidiary of Usha Martin Limited, India. It has been operational as a distribution center for Usha Martin Group’s core business of steel wire ropes and related products in South East Asia. It also has distribution set up in Australia & Indonesia

BWWREstablished in 2003, Brunton Wolf Wire Ropes FZCO is a joint venture between Usha Martin Limited of India and Gustav Wolf of Germany.

IT is the first wire rope factory set up in the Middle East, situated in Jebel Ali Free Zone Enterprise (FZE) with an annual capacity of 12,000 MT. The product range includes general engineering rope, elevator rope, crane rope, off-shore application rope, etc.

UM CablesEstablished in 1997, Usha Martin International Limited is a wholly owned subsidiary of Usha Martin Limited, formed to facilitate distribution & marketing of the group’s wire & wire rope products in Europe. The company also acquired in 2001 a Nottinghamshire based Wire Rope manufacturing company “Brunton Shaw UK” with an annual capacity of 6,000 MT. It also specialises in providing services to oil

7

Page 8: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

drilling and offshore exploration activities thru its arm European Management & Marine Corporation having offices in Aberdeen (UK), Baku & Tananger(NorwayAnnual capacity of 2.9 MCKM and 35000 RKM respectively.

UMILEstablished in 1997, Usha Martin International Limited is a wholly owned subsidiary of Usha Martin Limited, formed to facilitate distribution & marketing of the group’s wire & wire rope products in Europe. The company also acquired in 2001 a Nottinghamshire based Wire Rope manufacturing company “Brunton Shaw UK” with an annual capacity of 6,000 MT. It also specialises in providing services to oil drilling and offshore exploration activities thru its arm European Management & Marine Corporation having offices in Aberdeen (UK), Baku & Tananger(Norway

UM AmericaA wholly owned subsidiary of Usha Martin Limited, India. It has been operational as a distribution center for Usha Martin Group’s core business of steel wire ropes and related products in United States of America.

Brunton Shaw AmericaEstablished in 2007, Brunton Shaw America is a wholly owned subsidiary of Usha Martin Limited, India having a wire rope manufacturing capacity of 6000 TPA.

UML is the 2nd largest wire and rope manufacturer in the world and has the largest variety in South East Asia.

It is multi product, diversified engineering conglomerate with 10 production units in India, 1 in Thailand, 1 in UK and 1 in Dubai.

It is saving valuable foreign exchange by exporting by exporting its products to 42 countries like USA, Africa and Middle East, conforming to the strictest product quality standards.

It got the ISO 9000 Certification by BVQI in 1994.

ICICI (BCB) did the business process re-engineering in 1996 and line system was set up to enhance performance.

With the modern concepts like TPM, value engineering, QC, suggestions scheme, customer satisfaction and human

8

Page 9: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

resource development, UML is trying to reach unparalleled heights.

UML is serving through a leading daily “Prabhat Khabar”, Krishi Gram Vikas Kendra, Usha Martin Technical Institute.

SynopsisIntroduction

This project has been undertaken as part of our curriculum for the partial fulfillment of our course. The job assigned by my project guide is to develop Library Management System.

Purpose The purpose of this document is to serve as the basis for:

1. Developing a computerized Library Management System for Officers and Staff member of the intuition for records entry, updation, maintenance and manipulation to take decision.

2. Automatic updation of records after data entry or deletion, thereby removing any discrepancy in the system.

ScopeThe scope of this system is to carry out the following:

Enter and maintain details of different books their category and status.

Enter and maintain details of employees. Status of availability of books in the Library.

Special features

9

Page 10: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

(a) Security1. User password installed.

(b)Automatic updationThe data entry process makes room for automatic updation of

certain data on requirement basis.

Hardware & Software requirements

Hardware Requirements:

A Personal Computer with:-1. Minimum 128 MB RAM2. Minimum 40 GB Hard Disk3. Windows 98, NT, XP, Vista installed

Software Requirements:

Front End:1. Microsoft Visual Basic 6.0

Back End:1. Microsoft Access (Microsoft Office)

10

Page 11: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Introduction to Viual Basic 6.0:

Microsoft Visual Basic, the fastest and easiest way to create applications for Microsoft Windows®. Whether you are an experienced professional or brand new to Windows programming, Visual Basic provides you with a complete set of tools to simplify rapid application development.The "Visual" part refers to the method used to create the graphical user interface (GUI). Rather than writing numerous lines of code to describe the appearance and location of interface elements, you simply add prebuilt objects into place on screen. The "Basic" part refers to the BASIC (Beginners All-Purpose Symbolic Instruction Code) language, a language used by more programmers than any other language in the history of computing. Visual Basic has evolved from the original BASIC language and now contains several hundred statements, functions, and keywords, many of which relate directly to the Windows GUI.

11

Page 12: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Tables Used

12

Page 13: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Data Flow Diagram

13Query For Books/Members

Library Management

Software

QueryIssue/Return

Listing of BooksAdd New Book

DeleteModify

Display Listing

New Book Entry

Issue/Return of Books

Deletion Modification

CONTEXT-LEVEL DFD FOR LIBRARY MANAGEMENT SOFTWARE

Page 14: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

14

Book Data

Member Data

New Book Entry

Query

Issue/ReturnModify/

Delete

New Member

Entry

Interact With User

Interface Screen

Configure Data

Display Message

And Status

Configure Data

Configure Request

User Command And Request

Display Information

Level - 1 DFD ForLibrary Management Software

Display Section

Configuration Information

Format For

Display

Update File

Append File

Access File

Configuration Data

Write To File

Write To File

Level – 2 DFD ForLibrary Management Software

Page 15: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Entity Relationship Diagram

15

Book Data Member Data

Book Title

Book statusBookId

Author Name

City

Address

PIN No

Book Status

Name

Process

Page 16: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Login Form

CODING:

Private Sub cmdOk_Click ()Set rs = db.OpenRecordset ("select uid, pass from security where uid='" & txtuid & "'" &” And “& "pass='" _ & txtpass & "'", dbOpenSnapshot) If rs.EOF = False Then frmSplash.Show Unload Me ElseIf rs.EOF and b = 2 Then MsgBox "No Hacking, Exiting now....” vbCritical, "Fatal Error" End Else MsgBox "Enter a Valid Password", vbQuestion, "Error" b = b + 1 Cancel = True End IfEnd Sub

16

Page 17: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Add new user Form

CODING:

Private Sub cmdcancel_Click ()Unload MeEnd Sub

Private Sub cmdOk_Click ()Set rs = db.OpenRecordset ("security", dbOpenDynaset)With rs .AddNew !uid = txtuid !pass = txtpass .Update .CloseEnd WithMsgBox "User” & txtuid & “Added", vbInformation, "Confirm Password Update"Unload MeEnd Sub

Private Sub Form_Load () Me.Top = 1000 Me.Left = 2900a = oDim datam As StringDatam = App.Path & "\libn.mdb"Set db = DBEngine.Workspaces (0).OpenDatabase (datam)

17

Page 18: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

End Sub

Private Sub txtconpass_KeyUp (KeyCode as Integer, Shift as Integer)If KeyCode = vbKeyReturn ThencmdOk_ClickEnd IfEnd Sub

Private Sub txtconpass_Validate (Cancel as Boolean)If txtconpass <> txtpass ThenMsgBox "Confirm password does not match New Password", vbCritical, "Error"txtconpass = ""Cancel = TrueEnd IfEnd Sub

Private Sub txtpass_Validate (Cancel as Boolean)If Len (txtpass) < 8 ThenMsgBox "Password Must be Atleast 8 characters", vbInformation, "Help"Cancel = TrueEnd IfEnd Sub

18

Page 19: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Change Password Form

CODING:Private Sub cmdcancel_Click ()Unload MeEnd SubPrivate Sub cmdOk_Click ()If txtuid = "" ThenMsgBox "enter a user name", vbInformation, "Error"Exit SubEnd IfIf txtpass = "" ThenMsgBox "enter a password", vbInformation, "Error"Exit SubEnd IfSet rs = db.OpenRecordset ("select uid, pass from security where uid='" & txtuid & "'" &” And “& "pass='" _ & txtpass & "'", dbOpenDynaset)With rs .Edit !pass = txtnewpass .Update .CloseEnd WithMsgBox "Password updated", vbInformation, "Confirm Password Update"Unload MeEnd Sub

Private Sub Form_Load ()Me.Top = 1000

19

Page 20: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Me.Left = 2000a = oDim datam As StringDatam = App.Path & "\libn.mdb"Set db = DBEngine.Workspaces (0).OpenDatabase (datam)End SubPrivate Sub txtconpass_KeyUp (KeyCode as Integer, Shift as Integer)If KeyCode = vbKeyReturn ThencmdOk_ClickEnd IfEnd SubPrivate Sub txtconpass_Validate (Cancel As Boolean)If txtconpass <> txtnewpass ThenMsgBox "Confirm password does not match New Password", vbCritical, "Error"txtconpass = ""Cancel = TrueEnd IfEnd SubPrivate Sub txtnewpass_Validate (Cancel As Boolean)If Len (txtnewpass) < 8 ThenMsgBox "Password Must be Atleast 8 characters", vbInformation, "Help"Cancel = TrueEnd IfEnd Sub

Private Sub txtpass_Validate (Cancel as Boolean)Set rs = db.OpenRecordset ("select uid,pass from security where uid='" & txtuid & "'" & " And " & "pass='" _ & txtpass & "'", dbOpenSnapshot) If rs.EOF = False Then Exit Sub ElseIf rs.EOF And b = 2 Then MsgBox "No Hacking, Exiting Now....", vbCritical, "Fatal Error" End Else MsgBox "Enter a Valid Password", vbQuestion, "Error" b = b + 1 Cancel = True End Ifrs.CloseEnd Sub

20

Page 21: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Splash Form

CODING:Private Sub Timer1_Timer()a = a + 1If a <= 100 ThenProgressBar1.Value = ProgressBar1.Value + 1ElseUnload MeMDIForm1.ShowEnd IfIf a Mod 10 = 0 ThenLabel5 = "Loading...Please Wait..."ElseIf a Mod 5 = 0 ThenLabel5 = " "End IfEnd Sub

21

Page 22: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Add New Member Form

CODING:Option ExplicitDim str As StringDim db As DatabaseDim qry As QueryDefDim rs As RecordsetDim l As Integer

Private Sub CMDADD_Click()If CMDADD.Caption = "ADD" ThenCMDADD.Caption = "Save"txtm.Visible = TrueTXTFNAME.Visible = TrueTXTLNAME.Visible = TrueTXTADDRESS.Visible = TrueTXTCITY.Visible = Truetxtm.SetFocusTXTFNAME = ""TXTLNAME = ""TXTADDRESS = ""

22

Page 23: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

TXTCITY = ""CMDADD.CausesValidation = TrueElseIf CMDADD.Caption = "Save" ThenCMDADD.Caption = "ADD"If txtm = "" Or TXTFNAME = "" Or TXTLNAME = "" Or TXTADDRESS = "" Or TXTCITY = "" ThenMsgBox "Fill the appropriate feilds", vbInformation, "Error"CMDADD.Caption = "Save"Exit SubEnd IfSet rs = db.OpenRecordset("membership", dbOpenDynaset)With rs .AddNew !pin = txtm !f_name = TXTFNAME !l_name = TXTLNAME !address = TXTADDRESS !city = TXTCITY .Update .CloseEnd WithCMDADD.CausesValidation = FalseEnd IfEnd Sub

Private Sub CMDEXIT_Click()Unload MeEnd Sub

Private Sub Form_Load() Me.Top = 1000 Me.Left = 2500Dim datam As Stringdatam = App.Path & "\libn.mdb"Set db = DBEngine.Workspaces(0).OpenDatabase(datam)txtm.Visible = FalseTXTFNAME.Visible = FalseTXTLNAME.Visible = FalseTXTADDRESS.Visible = FalseTXTCITY.Visible = FalseEnd Sub

Private Sub TXTADDRESS_Change()str = TXTADDRESS.Textl = Len(str)If l > 50 Then

23

Page 24: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

MsgBox "YOUR ADDRESSS SHOULD NOT BE GREATER THAN 50 CHARACTER", vbCritical, "ERROR"TXTADDRESS.SetFocusTXTADDRESS.Text = ""End IfEnd Sub

Private Sub TXTADDRESS_Validate(Cancel As Boolean)str = TXTADDRESS.Textl = Len(str)If l = 0 ThenMsgBox "PLEASE FILL IT"Cancel = TrueEnd IfEnd Sub

Private Sub TXTCITY_Change()str = TXTCITY.Textl = Len(str)If l >= 11 ThenMsgBox "cityname cannot be greater then 10 characer", vbCritical, "ERROR"TXTCITY.SetFocusTXTCITY.Text = ""End IfEnd Sub

Private Sub TXTCITY_Validate(Cancel As Boolean)str = TXTCITY.Textl = Len(str)If l = 0 ThenMsgBox "PLEASE FILL IT"Cancel = TrueEnd IfEnd Sub

Private Sub TXTFNAME_Change()str = TXTFNAME.Textl = Len(str)If l > 15 ThenMsgBox "FIRSTNAME SHOULD NOT BE GREATER THAN 15 CHARACTER", vbCritical, "ERROR"TXTFNAME.SetFocusTXTFNAME.Text = ""End IfEnd Sub

24

Page 25: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Private Sub TXTFNAME_Validate(Cancel As Boolean)str = TXTFNAME.Textl = Len(str)If l = 0 ThenMsgBox "PLEASE FILL IT"Cancel = TrueEnd IfEnd Sub

Private Sub TXTLNAME_Change()str = TXTLNAME.Textl = Len(str)If l > 15 ThenMsgBox "LASTNAME MUST NOT BE GREATER THAN 15 CHARACTER", vbCritical, "ERROR"TXTLNAME.Text = ""End IfEnd Sub

Private Sub TXTLNAME_Validate(Cancel As Boolean)str = TXTLNAME.Textl = Len(str)If l = 0 ThenMsgBox "PLEASE FILL IT"Cancel = TrueEnd IfEnd Sub

Private Sub txtm_Change()str = txtm.Textl = Len(str)If l >= 6 ThenMsgBox "PIN Should be of 5 digits", vbCritical, "ERROR"txtm.Text = ""End IfEnd SubPrivate Sub txtm_Validate(Cancel As Boolean)str = txtm.Textl = Len(str)If l = 0 ThenMsgBox "PLEASE FILL IT"Cancel = TrueEnd IfEnd Sub

25

Page 26: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Modify/delete Member Form

CODING:

Private Sub CMDDELETE_Click()If CBOMNO = "" ThenMsgBox "Select a Member to Delete", vbInformation, "Error"Exit SubEnd IfSet r1 = db.OpenRecordset("select pin from membership where (bookstatus = true) and pin='" & CBOMNO & "'", dbOpenDynaset)If r1.EOF = False ThenMsgBox "Cannot Delete Member (still Have Book to return", vbCritical, "Warning"r1.CloseExit SubElseDim X As IntegerX = MsgBox("Really Delete???", vbCritical + vbOKCancel, "Confirm Delete")If X = vbOK ThenWith rs

26

Page 27: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

.Delete .CloseEnd With TXTFNAME = "" TXTLNAME = "" TXTADDRESS = "" TXTCITY = "" CBOMNO = "" reset_comboElseIf X = vbCancel ThenExit SubEnd IfEnd IfEnd Sub

Private Sub CMDEDIT_Click()If CMDEDIT.Caption = "EDIT" And CBOMNO = "" ThenMsgBox "Select a Member", vbInformation, "Error"Exit SubEnd IfIf CMDEDIT.Caption = "EDIT" ThenCMDEDIT.Caption = "SAVE"TXTFNAME.Enabled = TrueTXTLNAME.Enabled = TrueTXTADDRESS.Enabled = TrueTXTCITY.Enabled = TrueTXTFNAME.SetFocusCBOMNO.Enabled = FalseCMDDELETE.Visible = FalseElseIf CMDEDIT.Caption = "SAVE" ThenCMDEDIT.Caption = "EDIT"If TXTFNAME = "" Or TXTLNAME = "" Or TXTADDRESS = "" Or TXTCITY = "" ThenMsgBox "Fill the appropriate feilds", vbInformation, "Error"CMDEDIT.Caption = "SAVE"Exit SubEnd IfSet rs = db.OpenRecordset("select * from membership where pin='" & CBOMNO & "'", dbOpenDynaset)With rs .Edit rs!f_name = TXTFNAME rs!l_name = TXTLNAME rs!address = TXTADDRESS rs!city = TXTCITY .Update

27

Page 28: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

.CloseEnd WithMsgBox "One record modified successfully", vbInformation, "Success"TXTFNAME.Enabled = FalseTXTLNAME.Enabled = FalseTXTADDRESS.Enabled = FalseTXTCITY.Enabled = FalseCBOMNO.Enabled = TrueCMDDELETE.Visible = Truereset_comboEnd IfEnd Sub

Private Sub CMDEXIT_Click()Unload MeEnd Sub

Private Sub Form_Load()Me.Top = 600Me.Left = 2000Dim datam As Stringdatam = App.Path & "\libn.mdb"Set db = DBEngine.Workspaces(0).OpenDatabase(datam)reset_comboEnd Sub

Private Sub TXTADDRESS_Change()str = TXTADDRESS.Textl = Len(str)If l > 50 ThenMsgBox "YOUR ADDRESS SHOULD NOT BE GREATER THAN 50 CHARACTER", vbCritical, "ERROR"TXTADDRESS.SetFocusTXTADDRESS.Text = ""End IfEnd Sub

Private Sub TXTADDRESS_Validate(Cancel As Boolean)str = TXTADDRESS.Textl = Len(str)If l = 0 ThenMsgBox "PLEASE FILL IT"Cancel = TrueEnd IfEnd Sub

28

Page 29: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Private Sub TXTCITY_Change()str = TXTCITY.Textl = Len(str)If l >= 11 ThenMsgBox "cityname cannot be greater then 10 characer", vbCritical, "ERROR"TXTCITY.SetFocusTXTCITY.Text = " "End IfEnd Sub

Private Sub TXTCITY_Validate(Cancel As Boolean)str = TXTCITY.Textl = Len(str)If l = 0 ThenMsgBox "PLEASE FILL IT"Cancel = TrueEnd IfEnd Sub

Private Sub TXTFNAME_Change()str = TXTFNAME.Textl = Len(str)If l > 15 ThenMsgBox "YOUR FIRSTNAME SHOULD NOT BE GREATER THAN 15 CHARACER", vbCritical, "ERROR"TXTFNAME.SetFocusTXTFNAME.Text = ""End IfEnd Sub

Private Sub TXTFNAME_Validate(Cancel As Boolean)str = TXTFNAME.Textl = Len(str)If l = 0 ThenMsgBox "PLEASE FILL IT"Cancel = TrueEnd IfEnd Sub

Private Sub TXTLNAME_Change()str = TXTLNAME.Textl = Len(str)If l > 15 ThenMsgBox "YOUR LASTNAME SHOULDNOT BE GREATERE THAN 15 CHARACTER", vbCritical, "ERROR"

29

Page 30: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

TXTLNAME.SetFocusTXTLNAME.Text = " "End IfEnd Sub

Private Sub TXTLNAME_Validate(Cancel As Boolean)str = TXTLNAME.Textl = Len(str)If l = 0 ThenMsgBox "PLEASE FILL IT"Cancel = TrueEnd IfEnd Sub

Private Sub CBOMNO_Click()If CBOMNO = "" ThenMsgBox " Enter a Valid Pin No , Press Spacebar to Continue", vbExclamation + vbOKOnlyExit SubEnd IfSet rs = db.OpenRecordset("select * from membership where pin='" & CBOMNO & "'", dbOpenDynaset)showdataEnd Sub

Private Sub cbomno_KeyUp(KeyCode As Integer, Shift As Integer)Dim i As IntegerDim a As IntegerStatic j As Integer If KeyCode = vbKeyBack Then If Len(CBOMNO) = 0 Then CBOMNO = "" Exit Sub Else CBOMNO = Mid(CBOMNO, 1, (Len(CBOMNO))) CBOMNO.SelStart = Len(CBOMNO) Exit Sub End If End If If KeyCode = vbKeyDelete Then CBOMNO.SelText = "" Exit Sub End If If KeyCode = vbKeyReturn Then

30

Page 31: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Set rs = db.OpenRecordset("select * from membership where pin='" & CBOMNO & "'", dbOpenDynaset)If rs.RecordCount = 0 ThenMsgBox "Enter a valid Pin No.", vbInformation, "Error"CBOMNO.SetFocusrs.CloseExit SubElseshowdataExit SubEnd IfEnd IfIf Len(CBOMNO) = 1 Thenj = 0For i = 0 To CBOMNO.ListCount a = InStr(1, Left(CBOMNO.List(i), 1), CBOMNO, vbTextCompare) If a Then CBOMNO = CBOMNO.List(i) CBOMNO.SelStart = j + 1 CBOMNO.SelLength = Len(CBOMNO.List(i)) Exit For End If Next iElsej = j + 1

For i = 0 To CBOMNO.ListCount a = InStr(1, CBOMNO.List(i), CBOMNO, vbTextCompare) If a Then CBOMNO = CBOMNO.List(i) CBOMNO.SelStart = j + 1 CBOMNO.SelLength = Len(CBOMNO.List(i)) Exit For End If Next iEnd IfEnd Sub Sub showdata()TXTFNAME = rs!f_name & ""TXTLNAME = rs!l_name & ""TXTADDRESS = rs!address & ""TXTCITY = rs!city & ""End SubSub reset_combo()

31

Page 32: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Set rs = db.OpenRecordset("select pin from membership", dbOpenSnapshot)If rs.EOF ThenMsgBox "No Data found", vbInformation, "Error"Exit SubEnd IfCBOMNO.ClearDo Until rs.EOFCBOMNO.AddItem rs!pinrs.MoveNextLoopTXTFNAME = ""TXTLNAME = ""TXTADDRESS = ""TXTCITY = ""TXTFNAME.Enabled = FalseTXTLNAME.Enabled = FalseTXTADDRESS.Enabled = FalseTXTCITY.Enabled = Falsers.CloseEnd Sub

32

Page 33: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Member Information Form

CODING:

Option ExplicitDim db As DatabaseDim rs As RecordsetDim r1 As RecordsetPrivate Sub cbomemberno_Click()If cbomemberno = "" ThenMsgBox " Enter a Valid No, Press Spacebar to Continue", vbExclamation + vbOKOnlyExit SubEnd IfSet rs = db.OpenRecordset("select * from membership where pin='" & cbomemberno & "'", dbOpenSnapshot)

33

Page 34: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

showdataEnd SubPrivate Sub cbomemberno_KeyUp(KeyCode As Integer, Shift As Integer)Dim i As IntegerDim a As IntegerStatic j As Integer If KeyCode = vbKeyBack Then If Len(cbomemberno) = 0 Then cbomemberno = "" Exit Sub Else cbomemberno = Mid(cbomemberno, 1, (Len(cbomemberno))) cbomemberno.SelStart = Len(cbomemberno) Exit Sub End If End If If KeyCode = vbKeyDelete Then cbomemberno.SelText = "" Exit Sub End IfIf Len(cbomemberno) = 1 Thenj = 0For i = 0 To cbomemberno.ListCount a = InStr(1, Left(cbomemberno.List(i), 1), cbomemberno, vbTextCompare) If a Then cbomemberno = cbomemberno.List(i) cbomemberno.SelStart = j + 1 cbomemberno.SelLength = Len(cbomemberno.List(i)) Exit For End If Next iElsej = j + 1For i = 0 To cbomemberno.ListCount a = InStr(1, cbomemberno.List(i), cbomemberno, vbTextCompare) If a Then cbomemberno = cbomemberno.List(i) cbomemberno.SelStart = j + 1 cbomemberno.SelLength = Len(cbomemberno.List(i)) Exit For End If Next iEnd IfIf KeyCode = vbKeyReturn Then

34

Page 35: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Set rs = db.OpenRecordset("select * from membership where pin='" & cbomemberno & "'", dbOpenSnapshot)If rs.RecordCount = 0 ThenDim X As Integera = MsgBox(" Enter a Valid No, Press Spacebar to Continue", vbExclamation + vbOKOnly)If a = vbOK Then Exit SubExit SubEnd IfshowdataElseEnd IfEnd SubPrivate Sub CMDEXIT_Click()Unload MeEnd SubPrivate Sub Form_Load()Me.Top = 600Me.Left = 2000Dim datam As Stringdatam = App.Path & "\libn.mdb"Set db = DBEngine.Workspaces(0).OpenDatabase(datam)Set rs = db.OpenRecordset("select pin from membership", dbOpenSnapshot)Do Until rs.EOFcbomemberno.AddItem rs!pinrs.MoveNextLoopEnd SubSub showdata()lblfname = rs!f_name & ""lbllastname = rs!l_name & ""lbladdress = rs!address & ""lblcity = rs!city & ""Label6 = rs!bookstatus & ""End Sub

35

Page 36: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Add New Book Form

CODING:

Option ExplicitDim str As StringDim db As DatabaseDim qry As QueryDefDim rs As RecordsetDim l As Integer

Private Sub CMDADD_Click()If cmdadd.Caption = "ADD" Thencmdadd.Caption = "Save"txtm.Visible = TrueTXTFNAME.Visible = TrueTXTLNAME.Visible = TrueTXTADDRESS.Visible = TrueTXTCITY.Visible = True

36

Page 37: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

txtm.SetFocusTXTFNAME = ""TXTLNAME = ""TXTADDRESS = ""TXTCITY = ""cmdadd.CausesValidation = TrueElseIf cmdadd.Caption = "Save" Thencmdadd.Caption = "ADD"If txtm = "" Or TXTFNAME = "" Or TXTLNAME = "" Or TXTADDRESS = "" Or TXTCITY = "" ThenMsgBox "Fill the appropriate feilds", vbInformation, "Error"cmdadd.Caption = "Save"Exit SubEnd IfSet rs = db.OpenRecordset("membership", dbOpenDynaset)With rs .AddNew !pin = txtm !f_name = TXTFNAME !l_name = TXTLNAME !address = TXTADDRESS !city = TXTCITY .Update .CloseEnd Withcmdadd.CausesValidation = FalseEnd IfEnd Sub

Private Sub CMDEXIT_Click()Unload MeEnd Sub

Private Sub Form_Load() Me.Top = 1000 Me.Left = 2500Dim datam As Stringdatam = App.Path & "\libn.mdb"Set db = DBEngine.Workspaces(0).OpenDatabase(datam)txtm.Visible = FalseTXTFNAME.Visible = FalseTXTLNAME.Visible = FalseTXTADDRESS.Visible = FalseTXTCITY.Visible = FalseEnd Sub

37

Page 38: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Private Sub TXTADDRESS_Change()str = TXTADDRESS.Textl = Len(str)If l > 50 ThenMsgBox "YOUR ADDRESSS SHOULD NOT BE GREATER THAN 50 CHARACTER", vbCritical, "ERROR"TXTADDRESS.SetFocusTXTADDRESS.Text = ""End IfEnd Sub

Private Sub TXTADDRESS_Validate(Cancel As Boolean)str = TXTADDRESS.Textl = Len(str)If l = 0 ThenMsgBox "PLEASE FILL IT"Cancel = TrueEnd IfEnd Sub

Private Sub TXTCITY_Change()str = TXTCITY.Textl = Len(str)If l >= 11 ThenMsgBox "cityname cannot be greater then 10 characer", vbCritical, "ERROR"TXTCITY.SetFocusTXTCITY.Text = ""End IfEnd Sub

Private Sub TXTCITY_Validate(Cancel As Boolean)str = TXTCITY.Textl = Len(str)If l = 0 ThenMsgBox "PLEASE FILL IT"Cancel = TrueEnd IfEnd Sub

Private Sub TXTFNAME_Change()str = TXTFNAME.Textl = Len(str)If l > 15 ThenMsgBox "FIRSTNAME SHOULD NOT BE GREATER THAN 15 CHARACTER", vbCritical, "ERROR"

38

Page 39: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

TXTFNAME.SetFocusTXTFNAME.Text = ""End IfEnd Sub

Private Sub TXTFNAME_Validate(Cancel As Boolean)str = TXTFNAME.Textl = Len(str)If l = 0 ThenMsgBox "PLEASE FILL IT"Cancel = TrueEnd IfEnd Sub

Private Sub TXTLNAME_Change()str = TXTLNAME.Textl = Len(str)If l > 15 ThenMsgBox "LASTNAME MUST NOT BE GREATER THAN 15 CHARACTER", vbCritical, "ERROR"TXTLNAME.Text = ""End IfEnd Sub

Private Sub TXTLNAME_Validate(Cancel As Boolean)str = TXTLNAME.Textl = Len(str)If l = 0 ThenMsgBox "PLEASE FILL IT"Cancel = TrueEnd IfEnd Sub

Private Sub txtm_Change()str = txtm.Textl = Len(str)If l >= 6 ThenMsgBox "PIN Should be of 5 digits", vbCritical, "ERROR"txtm.Text = ""End IfEnd SubPrivate Sub txtm_Validate(Cancel As Boolean)str = txtm.Textl = Len(str)If l = 0 ThenMsgBox "PLEASE FILL IT"

39

Page 40: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Cancel = TrueEnd IfEnd Sub

Modify Book Form

CODING:

Option ExplicitDim str As StringDim l As IntegerDim db As DatabaseDim rs As RecordsetPrivate Sub cbobno_Click()If cbobno = "" ThenMsgBox "Select a valid Book no.", vbInformation, "Error"Exit SubEnd IfSet rs = db.OpenRecordset("select * from librarybook where b_no='" & cbobno & "'", dbOpenSnapshot)

40

Page 41: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

showdataEnd Sub

Private Sub cbobno_KeyUp(KeyCode As Integer, Shift As Integer)Dim i As IntegerDim a As IntegerStatic j As Integer If KeyCode = vbKeyBack Then If Len(cbobno) = 0 Then cbobno = "" Exit Sub Else cbobno = Mid(cbobno, 1, (Len(cbobno))) cbobno.SelStart = Len(cbobno) Exit Sub End If End If If KeyCode = vbKeyDelete Then cbobno.SelText = "" Exit Sub End If If KeyCode = vbKeyReturn Then

Set rs = db.OpenRecordset("select * from librarybook where b_no='" & cbobno & "'", dbOpenSnapshot) If rs.RecordCount = 0 Then Dim X As Integer X = MsgBox(" Enter a Valid No, Press Spacebar to Continue", vbExclamation + vbOKOnly) If X = vbOK Then cbobno = "" Txttitle = "" txtauthor = "" Exit Sub End If Else showdata

41

Page 42: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

End If End If

If Len(cbobno) = 1 Thenj = 0For i = 0 To cbobno.ListCount a = InStr(1, Left(cbobno.List(i), 1), cbobno, vbTextCompare) If a Then cbobno = cbobno.List(i) cbobno.SelStart = j + 1 cbobno.SelLength = Len(cbobno.List(i)) Exit For End If Next i

Elsej = j + 1

For i = 0 To cbobno.ListCount a = InStr(1, cbobno.List(i), cbobno, vbTextCompare) If a Then cbobno = cbobno.List(i) cbobno.SelStart = j + 1 cbobno.SelLength = Len(cbobno.List(i)) Exit For End If Next iEnd IfEnd Sub

Private Sub CMDEXIT_Click()Unload MeEnd Sub

Private Sub Form_Load()Me.Top = 600Me.Left = 2000Dim datam As Stringdatam = App.Path & "\libn.mdb"Set db = DBEngine.Workspaces(0).OpenDatabase(datam)reset_comboEnd Sub

Sub reset_combo()cbobno.Clear

42

Page 43: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Set rs = db.OpenRecordset("select b_no from librarybook", dbOpenSnapshot)If rs.EOF ThenMsgBox "No Data found. Please Click Exit", vbInformation, "Error"cbobno.Enabled = Falsecmdedit.Visible = FalseEnd IfDo Until rs.EOFcbobno.AddItem rs!b_nors.MoveNextLoopcbobno.Enabled = TrueTxttitle.Enabled = Falsetxtauthor.Enabled = Falsers.CloseEnd Sub

Sub showdata()Txttitle = rs!Title & ""txtauthor = rs!author & ""rs.CloseEnd Sub

Private Sub CMDEDIT_Click()If cmdedit.Caption = "EDIT" And cbobno = "" ThenMsgBox "Select a Book", vbInformation, "Error"Exit SubEnd IfIf cmdedit.Caption = "EDIT" Thencmdedit.Caption = "SAVE"

cbobno.Enabled = FalseTxttitle.Enabled = Truetxtauthor.Enabled = TrueCMDEXIT.Visible = FalseTxttitle.SetFocuscmdedit.CausesValidation = TrueElseIf cmdedit.Caption = "SAVE" Thencmdedit.Caption = "EDIT"Set rs = db.OpenRecordset("select * from librarybook where b_no='" & cbobno & "'", dbOpenDynaset) With rs .Edit !Title = Txttitle !author = txtauthor

43

Page 44: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

.Update .Close End With cbobno = "" Txttitle = "" txtauthor = "" Txttitle.Enabled = False txtauthor.Enabled = False cbobno.Enabled = True CMDEXIT.Visible = Truecmdedit.CausesValidation = FalseEnd IfEnd Sub

Private Sub Txtauthor_Change()str = txtauthor.Textl = Len(str)If l > 15 ThenMsgBox "TITLE MUST NOT BE GREATER THEN 15", vbInformation, "Error"txtauthor.SetFocustxtauthor = Mid(txtauthor, 1, 15)End IfEnd Sub

Private Sub Txtauthor_Validate(Cancel As Boolean)str = txtauthor.Textl = Len(str)If l = 0 ThenMsgBox "PLEASE FILL IT UP", vbInformation, "Error"Cancel = TrueEnd IfEnd Sub

Private Sub Txttitle_Change()str = Txttitle.Textl = Len(str)If l > 50 ThenMsgBox "TITLE MUST NOT BE GREATER THEN 50", vbInformation, "Error"Txttitle.SetFocusTxttitle = Mid(Txttitle, 1, 50)End IfEnd Sub

Private Sub Txttitle_Validate(Cancel As Boolean)str = Txttitle.Textl = Len(str)

44

Page 45: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

If l = 0 ThenMsgBox "PLEASE FILL IT UP", vbInformation, "Error"Cancel = TrueEnd IfEnd Sub

Delete Book Form

CODING:

Option ExplicitDim db As DatabaseDim r1 As RecordsetDim rs As RecordsetPrivate Sub cbobno_Click()If cbobno = "" ThenMsgBox "Enter a valid Book No.", vbInformation, "Error"Exit SubEnd If

45

Page 46: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Set rs = db.OpenRecordset("select * from librarybook where b_no='" & cbobno & "'", dbOpenSnapshot)showdataEnd Sub

Private Sub cbobno_KeyUp(KeyCode As Integer, Shift As Integer)Dim i As IntegerDim a As IntegerStatic j As Integer If KeyCode = vbKeyBack Then If Len(cbobno) = 0 Then cbobno = "" Exit Sub Else cbobno = Mid(cbobno, 1, (Len(cbobno))) cbobno.SelStart = Len(cbobno) Exit Sub End If End If If KeyCode = vbKeyDelete Then cbobno.SelText = "" Exit Sub End If

If Len(cbobno) = 1 Thenj = 0For i = 0 To cbobno.ListCount a = InStr(1, Left(cbobno.List(i), 1), cbobno, vbTextCompare) If a Then cbobno = cbobno.List(i) cbobno.SelStart = j + 1 cbobno.SelLength = Len(cbobno.List(i)) Exit For End If Next i

Elsej = j + 1

For i = 0 To cbobno.ListCount a = InStr(1, cbobno.List(i), cbobno, vbTextCompare)

46

Page 47: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

If a Then cbobno = cbobno.List(i) cbobno.SelStart = j + 1 cbobno.SelLength = Len(cbobno.List(i)) Exit For End If Next iEnd If

If KeyCode = vbKeyReturn Then Set rs = db.OpenRecordset("select * from librarybook where b_no='" & cbobno & "'", dbOpenSnapshot) If rs.RecordCount = 0 Then Dim X As Integer X = MsgBox(" Enter a Valid No, Press Spacebar to Continue", vbExclamation + vbOKOnly) If X = vbOK Then cbobno = "" Txttitle = "" txtauthor = "" Exit Sub End If Else showdata End If End IfEnd Sub

Private Sub CMDDELETE_Click()If cbobno = "" ThenMsgBox "Select a Book to Delete", vbInformation, "Error"Exit SubElseSet r1 = db.OpenRecordset("select bookstatus from librarybook where b_no='" & cbobno & "'", dbOpenDynaset)If r1!bookstatus <> 1 ThenMsgBox "Cannot delete book,it is issued", vbCritical, "Error"ElseDim X As IntegerX = MsgBox("Really Delete???", vbYesNo, "Confirm Delete")If X = vbYes ThenSet rs = db.OpenRecordset("select * from librarybook where b_no='" & cbobno & "'", dbOpenDynaset)With rs .Delete

47

Page 48: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

.CloseEnd Withcbobno = ""Txttitle = ""txtauthor = "" reset_comboEnd IfEnd IfEnd Ifr1.CloseEnd Sub

Private Sub CMDEXIT_Click()Unload MeEnd Sub

Private Sub Form_Load()Me.Top = 600Me.Left = 2000Dim datam As Stringdatam = App.Path & "\libn.mdb"Set db = DBEngine.Workspaces(0).OpenDatabase(datam)reset_comboEnd Sub

Sub reset_combo()cbobno.ClearSet rs = db.OpenRecordset("select b_no from librarybook", dbOpenSnapshot)If rs.EOF ThenMsgBox "No Data found", vbInformation, "Error"Exit SubEnd IfDo Until rs.EOFcbobno.AddItem rs!b_nors.MoveNextLoopcbobno.Enabled = TrueTxttitle.Enabled = Falsetxtauthor.Enabled = Falsers.CloseEnd Sub

Sub showdata()Txttitle = rs!Titletxtauthor = rs!author

48

Page 49: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

rs.CloseEnd Sub

Book Issue Form

CODING:

Dim r1 As RecordsetDim r2 As RecordsetDim rs As RecordsetDim db As DatabaseDim membflag As IntegerDim bookflag As Integer

Private Sub cbobno_Click()If cbobno = "" ThenMsgBox "Enter a valid Pin No.", vbInformation, "Error"Exit Sub

49

Page 50: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

End Iflbldtofissue = Datelblduedate = DateAdd("d", 15, Date)Set rs = db.OpenRecordset("select title from librarybook where b_no='" & cbobno & "'", dbOpenSnapshot)If rs.EOF ThenMsgBox "Enter a Valid Book No.", vbInformation, "Error"cbobno = ""Exit SubElselblbname = rs!TitleEnd Ifrs.CloseEnd Sub

Private Sub cbobno_KeyUp(KeyCode As Integer, Shift As Integer)Dim i As IntegerDim a As IntegerStatic j As Integer If KeyCode = vbKeyBack Then If Len(cbobno) = 0 Then cbobno = "" lblbname = "" lbldtofissue = "" lblduedate = "" Exit Sub Else cbobno = Mid(cbobno, 1, (Len(cbobno))) cbobno.SelStart = Len(cbobno) lblbname = "" lbldtofissue = "" lblduedate = "" Exit Sub End If End If If KeyCode = vbKeyDelete Then cbobno.SelText = "" lblbname = "" lbldtofissue = "" lblduedate = "" Exit Sub End If

50

Page 51: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

If KeyCode = vbKeyReturn Then lbldtofissue = Date lblduedate = DateAdd("d", 15, Date) Set rs = db.OpenRecordset("select title from librarybook where b_no='" & cbobno & "'", dbOpenSnapshot) If rs.EOF Then cbobno = "" lblbname = "" lbldtofissue = "" lblduedate = "" MsgBox "Enter a Valid Book No., Press Space Bar to Continue.", vbInformation, "Error"

Exit Sub Else lblbname = rs!Title End If rs.CloseEnd If

If Len(cbobno) = 1 Thenj = 0For i = 0 To cbobno.ListCount a = InStr(1, Left(cbobno.List(i), 1), cbobno, vbTextCompare) If a Then cbobno = cbobno.List(i) cbobno.SelStart = j + 1 cbobno.SelLength = Len(cbobno.List(i)) Exit For End If Next i

Elsej = j + 1lblbname = "" lbldtofissue = "" lblduedate = ""For i = 0 To cbobno.ListCount a = InStr(1, cbobno.List(i), cbobno, vbTextCompare) If a Then cbobno = cbobno.List(i) cbobno.SelStart = j + 1 cbobno.SelLength = Len(cbobno.List(i)) Exit For End If Next i

51

Page 52: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

End IfEnd Sub

Private Sub CBOMNO_Click()If CBOMNO = "" ThenMsgBox "Enter a valid Pin No.", vbInformation, "Error"End IfEnd Sub

Private Sub cbomno_Validate(Cancel As Boolean)If CBOMNO.ListCount = 0 Then Exit Sub For i = 0 To CBOMNO.ListCount a = InStr(1, CBOMNO.List(i), CBOMNO, vbTextCompare) If Not a Then End If Next i If i = CBOMNO.ListCount ThenMsgBox "Enter a Valid Pin No.", vbInformation, "Error"End IfEnd Sub

Private Sub cbomno_KeyUp(KeyCode As Integer, Shift As Integer)Dim i As IntegerDim a As IntegerStatic j As Integer If KeyCode = vbKeyBack Then If Len(CBOMNO) = 0 Then ' there is no text CBOMNO = "" Exit Sub Else CBOMNO = Mid(CBOMNO, 1, (Len(CBOMNO))) 'delete last character CBOMNO.SelStart = Len(CBOMNO) 'place cursor at end of word Exit Sub End If End If If KeyCode = vbKeyDelete Then CBOMNO.SelText = "" 'deleted selected text Exit Sub End IfIf Len(CBOMNO) = 1 Thenj = 0For i = 0 To CBOMNO.ListCount

52

Page 53: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

a = InStr(1, Left(CBOMNO.List(i), 1), CBOMNO, vbTextCompare) 'check input text with `1st character of the combo list If a Then CBOMNO = CBOMNO.List(i) CBOMNO.SelStart = j + 1 'set cursor to next character CBOMNO.SelLength = Len(CBOMNO.List(i)) ' select remaining text Exit For End If Next i

Elsej = j + 1

For i = 0 To CBOMNO.ListCount a = InStr(1, CBOMNO.List(i), CBOMNO, vbTextCompare) If a Then CBOMNO = CBOMNO.List(i) CBOMNO.SelStart = j + 1 CBOMNO.SelLength = Len(CBOMNO.List(i)) Exit For End If Next iEnd IfEnd Sub

Private Sub CMDEXIT_Click()Unload MeEnd Sub

Private Sub cmdissue_Click()If CBOMNO = "" ThenMsgBox "Enter a Valid Pin No.", vbInformation, "Error"Exit SubElseIf cbobno = "" ThenMsgBox "Enter a Valid Book No.", vbInformation, "Error"Exit SubEnd IfSet r1 = db.OpenRecordset("select bookstatus from membership where pin='" & CBOMNO & "'", dbOpenDynaset)Set r2 = db.OpenRecordset("select bookstatus from librarybook where b_no='" & cbobno & "'", dbOpenDynaset)If r1!bookstatus < 2 And r2!bookstatus = 1 ThenWith r1 .Edit !bookstatus = !bookstatus + 1 .Update

53

Page 54: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

.CloseEnd With'membflag = r1!bookstatusWith r2 .Edit !bookstatus = !bookstatus - 1 .Update .CloseEnd With'bookflag = r2!bookstatusElse MsgBox "Either the book is not present or member has already issued two books", vbInformation, "Can't issue" Exit SubEnd IfSet r1 = db.OpenRecordset("select * from librarytransaction ", dbOpenDynaset)With r1 .AddNew !pin = CBOMNO !b_no = cbobno !dt_of_issue = lbldtofissue !due_date = lblduedate .Update .CloseEnd WithCBOMNO = ""cbobno = ""lblbname = ""lbldtofissue = ""lblduedate = ""reselbookreselmemberEnd Sub

Private Sub Form_Load()Me.Top = 1000 Me.Left = 2000Dim datam As Stringdatam = App.Path & "\libn.mdb"Set db = DBEngine.Workspaces(0).OpenDatabase(datam)CBOMNO = ""cbobno = ""lblbname = ""lbldtofissue = ""lblduedate = ""

54

Page 55: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

reselbookreselmemberEnd Sub

Sub reselbook()cbobno.ClearSet r1 = db.OpenRecordset("select b_no from librarybook where bookstatus=1", dbOpenSnapshot)If r1.EOF ThenMsgBox "No more Book eligible for book issue. Please Click Exit", vbCritical, "Help"cmdissue.Visible = Falsecbobno.Enabled = FalseCBOMNO.Enabled = FalseExit SubEnd IfDo Until r1.EOFcbobno.AddItem r1!b_nor1.MoveNextLoopr1.CloseEnd Sub

Sub reselmember()CBOMNO.ClearSet rs = db.OpenRecordset("select pin from membership where bookstatus<2 ", dbOpenSnapshot)If rs.EOF ThenMsgBox "No more Member eligible for book issue. Please Click Exit", vbInformation, "Help"cmdissue.Visible = Falsecbobno.Enabled = FalseCBOMNO.Enabled = FalseExit SubEnd IfDo Until rs.EOFCBOMNO.AddItem rs!pinrs.MoveNextLooprs.CloseEnd Sub

55

Page 56: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Book Return Form

CODING:

Dim r1 As RecordsetDim r2 As RecordsetDim db As DatabaseDim rs As RecordsetPrivate Sub CBOMNO_Click()If CBOMNO = "" ThenMsgBox "Enter a valid Book No.", vbInformation, "Error"Exit SubEnd If

56

Page 57: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Set rs = db.OpenRecordset("select b_no from librarytransaction where pin='" & CBOMNO & "'", dbOpenDynaset)lblbno = rs!b_nors.Closelbldtofrt = Datecmdreturn.SetFocusEnd Sub

Private Sub cbomno_KeyUp(KeyCode As Integer, Shift As Integer)Dim i As IntegerDim a As IntegerStatic j As Integer If KeyCode = vbKeyBack Then If Len(CBOMNO) = 0 Then CBOMNO = "" Exit Sub Else CBOMNO = Mid(CBOMNO, 1, (Len(CBOMNO))) CBOMNO.SelStart = Len(CBOMNO) Exit Sub End If End If If KeyCode = vbKeyDelete Then CBOMNO.SelText = "" Exit Sub End If If KeyCode = vbKeyReturn ThenSet rs = db.OpenRecordset("select pin from librarytransaction where pin='" & CBOMNO & "'", dbOpenSnapshot)If rs.RecordCount = 0 ThenMsgBox "Enter a valid Pin No.", vbInformation, "Error"CBOMNO.SetFocusrs.CloseExit SubElseSet rs = db.OpenRecordset("select b_no from librarytransaction where pin='" & CBOMNO & "'", dbOpenDynaset)lblbno = rs!b_nors.Closelbldtofrt = Datecmdreturn.SetFocusExit SubEnd IfEnd If

57

Page 58: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

If Len(CBOMNO) = 1 Thenj = 0For i = 0 To CBOMNO.ListCount a = InStr(1, Left(CBOMNO.List(i), 1), CBOMNO, vbTextCompare) If a Then CBOMNO = CBOMNO.List(i) CBOMNO.SelStart = j + 1 CBOMNO.SelLength = Len(CBOMNO.List(i)) Exit For End If Next iElsej = j + 1For i = 0 To CBOMNO.ListCount a = InStr(1, CBOMNO.List(i), CBOMNO, vbTextCompare) If a Then CBOMNO = CBOMNO.List(i) CBOMNO.SelStart = j + 1 CBOMNO.SelLength = Len(CBOMNO.List(i)) Exit For End If Next iEnd IfEnd Sub

Private Sub cmdreturn_Click()If CBOMNO = "" ThenMsgBox "Enter a valid Pin No.", vbInformation, "Error"ElseSet rs = db.OpenRecordset("select dt_of_return,due_date from librarytransaction where dt_of_return is null and due_date is not null and pin='" & CBOMNO & "'", dbOpenDynaset)Set r1 = db.OpenRecordset("select bookstatus from membership where pin='" & CBOMNO & "'", dbOpenDynaset)Set r2 = db.OpenRecordset("select bookstatus from librarybook where b_no='" & lblbno & "'", dbOpenDynaset)With r2 .Edit !bookstatus = !bookstatus + 1 .Update .CloseEnd WithWith r1 .Edit !bookstatus = !bookstatus - 1 .Update

58

Page 59: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

.CloseEnd WithWith rs .Edit !dt_of_return = Date .Update .Delete .CloseEnd WithEnd IfCBOMNO = ""lblbno = ""lbldtofrt = ""reselmnoEnd Sub

Private Sub Command1_Click()Unload MeEnd Sub

Private Sub Form_Load()Me.Top = 1000 Me.Left = 2000CBOMNO = ""lblbno = ""lbldtofrt = ""Dim datam As Stringdatam = App.Path & "\libn.mdb"Set db = DBEngine.Workspaces(0).OpenDatabase(datam)reselmnoEnd Sub

Sub reselmno()CBOMNO.ClearSet rs = db.OpenRecordset("select pin from librarytransaction where dt_of_return is null and due_date is not null", dbOpenSnapshot)If rs.EOF ThenMsgBox "NO Members have Books to return. Please Click Exit", vbInformation, "Help"CBOMNO.Enabled = Falsecmdreturn.Visible = FalseExit SubEnd IfDo Until rs.EOFCBOMNO.AddItem rs!pinrs.MoveNext

59

Page 60: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Looprs.CloseEnd Sub

Book Detail Form

CODING:

Option Explicit

60

Page 61: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Dim db As DatabaseDim rs As Recordset

Private Sub CMDEXIT_Click()Unload MeEnd Sub

Private Sub cmdfirst_Click()rs.MoveFirstshowdataEnd Sub

Private Sub cmdlast_Click()rs.MoveLastshowdataEnd Sub

Private Sub cmdnext_Click()rs.MoveNextIf rs.EOF ThenMsgBox "This was the last record", vbInformation, "Message"rs.MoveLastshowdataElseshowdataEnd IfEnd Sub

Private Sub cmdPrevious_Click()rs.MovePreviousIf rs.BOF ThenMsgBox "This was the first record", vbInformation, "Message"rs.MoveFirstshowdataElseshowdataEnd IfEnd Sub

Private Sub Form_Load()Me.Top = 500Me.Left = 2500Dim datam As Stringdatam = App.Path & "\libn.mdb"Set db = DBEngine.Workspaces(0).OpenDatabase(datam)Set rs = db.OpenRecordset("librarybook")

61

Page 62: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

If rs.EOF = False Thenrs.MoveFirstshowdataElseMsgBox "No Books in the Library. Please Click Exit", vbInformation, "Help"cmdFirst.Visible = FalsecmdLast.Visible = FalsecmdNext.Visible = FalsecmdPrevious.Visible = FalseEnd IfEnd Sub

Sub showdata()lblbookno = rs!b_nolbltitle = rs!Titlelblauthor = rs!authorLabel5 = rs!bookstatusEnd Sub

62

Page 63: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Issued Book Details Form

CODING:

Option ExplicitDim db As Database

63

Page 64: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Dim qry As QueryDefDim rs As RecordsetDim r1 As RecordsetDim str As String

Private Sub CMDEXIT_Click()Unload MeEnd Sub

Private Sub cmdfirst_Click()rs.MoveFirstshowdataEnd Sub

Private Sub cmdlast_Click()rs.MoveLastshowdataEnd Sub

Private Sub cmdnext_Click()rs.MoveNextr1.MoveNextIf rs.EOF And r1.EOF ThenMsgBox "This was the last record", vbInformation, "Message"rs.MoveLastr1.MoveLastshowdataElseshowdataEnd IfEnd Sub

Private Sub cmdPrevious_Click()rs.MovePreviousr1.MovePreviousIf rs.BOF And r1.BOF ThenMsgBox "This was the first record", vbInformation, "Message"rs.MoveFirstr1.MoveFirstElseshowdataEnd IfEnd Sub

Private Sub Form_Load()Me.Top = 1000

64

Page 65: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Me.Left = 2000Dim datam As Stringdatam = App.Path & "\libn.mdb"Set db = DBEngine.Workspaces(0).OpenDatabase(datam)Set rs = db.OpenRecordset("select * from librarytransaction where dt_of_return is null and due_date is not null", dbOpenSnapshot)If rs.EOF = False Thenrs.MoveFirstshowdataElseMsgBox "No Books are borrowed. Please Click Exit", vbInformation, "Book Status"cmdFirst.Visible = FalsecmdLast.Visible = FalsecmdNext.Visible = FalsecmdPrevious.Visible = FalseEnd IfEnd Sub

Sub showdata()lblmemberno = rs!pinSet r1 = db.OpenRecordset("select f_name,l_name from membership where pin='" & rs!pin & "'", dbOpenSnapshot)lblbookname = rs!b_no & ""lblmembername = r1!f_name & " " & r1!l_name & ""lblcurrentdate = Datelblduedate = rs!due_date & ""End Sub

65

Page 66: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Book Information Form

CODING:

Private Sub cboauthor_Click()cmdshow.Visible = TrueEnd Sub

Private Sub cboauthor_KeyUp(KeyCode As Integer, Shift As Integer)If KeyCode = vbKeyReturn Then cmdshow.Visible = True

66

Page 67: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Dim i As IntegerDim a As IntegerStatic j As Integer If KeyCode = vbKeyBack Then If Len(cboauthor) = 0 Then cboauthor = "" Exit Sub Else cboauthor = Mid(cboauthor, 1, (Len(cboauthor))) cboauthor.SelStart = Len(cboauthor) Exit Sub End If End If If KeyCode = vbKeyDelete Then cboauthor.SelText = "" Exit Sub End If If KeyCode = vbKeyReturn ThenSet rs = db.OpenRecordset("select author from librarybook where author='" & cboauthor & "'", dbOpenSnapshot)If rs.RecordCount = 0 ThenMsgBox " No book by this author is in the Library", vbInformation, "Help"cboauthor.SetFocusrs.Closecmdshow.Visible = FalseExit SubElsecmdshow.Visible = TrueExit SubEnd IfEnd If

If Len(cboauthor) = 1 Thenj = 0For i = 0 To cboauthor.ListCount a = InStr(1, Left(cboauthor.List(i), 1), cboauthor, vbTextCompare) If a Then cboauthor = cboauthor.List(i) cboauthor.SelStart = j + 1 cboauthor.SelLength = Len(cboauthor.List(i)) Exit For End If Next iElsej = j + 1

67

Page 68: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

For i = 0 To cboauthor.ListCount a = InStr(1, cboauthor.List(i), cboauthor, vbTextCompare) If a Then cboauthor = cboauthor.List(i) cboauthor.SelStart = j + 1 cboauthor.SelLength = Len(cboauthor.List(i)) Exit For End If Next i End If

End SubPrivate Sub cbotitle_Click()cmdshow.Visible = TrueEnd SubPrivate Sub cbotitle_KeyUp(KeyCode As Integer, Shift As Integer)If KeyCode = vbKeyReturn Then cmdshow.Visible = TrueDim i As IntegerDim a As IntegerStatic j As Integer If KeyCode = vbKeyBack Then If Len(cbotitle) = 0 Then cbotitle = "" Exit Sub Else cbotitle = Mid(cbotitle, 1, (Len(cbotitle))) cbotitle.SelStart = Len(cbotitle) Exit Sub End If End If If KeyCode = vbKeyDelete Then cbotitle.SelText = "" Exit Sub End If If KeyCode = vbKeyReturn ThenSet rs = db.OpenRecordset("select distinct title from librarybook where title='" & cbotitle & "'", dbOpenSnapshot)If rs.RecordCount = 0 ThenMsgBox " No such Book is in the Library", vbInformation, "Help"cbotitle.SetFocusrs.Closecmdshow.Visible = FalseExit SubElsecmdshow.Visible = TrueExit Sub

68

Page 69: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

End IfEnd IfIf Len(cbotitle) = 1 Thenj = 0For i = 0 To cbotitle.ListCount a = InStr(1, Left(cbotitle.List(i), 1), cbotitle, vbTextCompare) If a Then cbotitle = cbotitle.List(i) cbotitle.SelStart = j + 1 cbotitle.SelLength = Len(cbotitle.List(i)) Exit For End If Next iElsej = j + 1For i = 0 To cbotitle.ListCount a = InStr(1, cbotitle.List(i), cbotitle, vbTextCompare) If a Then cbotitle = cbotitle.List(i) cbotitle.SelStart = j + 1 cbotitle.SelLength = Len(cbotitle.List(i)) Exit For End If Next i End IfEnd Sub

Private Sub cmdshow_Click()Me.HideBookInformation.ShowEnd SubPrivate Sub Command1_Click()Unload MeEnd Sub

Private Sub Form_activate()fratitle.Visible = Falsefraauthor.Visible = Falsecmdshow.Visible = Falseoptsel(0).Value = Falseoptsel(1).Value = Falseoptsel(2).Value = FalseEnd Sub

Private Sub Form_Load()Me.Top = 1000

69

Page 70: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Me.Left = 2000fratitle.Visible = Falsefraauthor.Visible = Falsecmdshow.Visible = FalseDim datam As Stringdatam = App.Path & "\libn.mdb"Set db = DBEngine.Workspaces(0).OpenDatabase(datam)reselauthorreseltitleEnd Sub

Private Sub optsel_Click(Index As Integer)cmdshow.Visible = FalseSelect Case IndexCase 0fratitle.Visible = Truefraauthor.Visible = Falsecbotitle.SetFocusCase 1fratitle.Visible = Truefraauthor.Visible = Truecbotitle.SetFocusCase 2fratitle.Visible = Falsefraauthor.Visible = TrueEnd SelectEnd Sub

Sub reseltitle()cbotitle.ClearSet rs = db.OpenRecordset("select distinct title from librarybook", dbOpenSnapshot)If rs.EOF ThenMsgBox " No such Book is in the Library", vbInformation, "Help"Exit SubEnd IfDo Until rs.EOFcbotitle.AddItem rs!Titlers.MoveNextLooprs.CloseEnd Sub

Sub reselauthor()cboauthor.Clear

70

Page 71: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Set rs = db.OpenRecordset("select distinct author from librarybook", dbOpenSnapshot)If rs.EOF ThenMsgBox " No book by this author is in the Library", vbInformation, "Help"Exit SubEnd IfDo Until rs.EOFcboauthor.AddItem rs!authorrs.MoveNextLooprs.CloseEnd Sub

CODING:

Dim str As StringDim qry As QueryDefDim db As DatabaseDim rs As RecordsetDim mvBookMark As Variant

71

Page 72: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Private Sub Form_Load() Me.Top = 1000 Me.Left = 2000Dim datam As Stringdatam = App.Path & "\libn.mdb"Set db = DBEngine.Workspaces(0).OpenDatabase(datam) If Bookinfo!optsel(0).Value Then Set rs = db.OpenRecordset("select * from librarybook where title='" & Bookinfo!cbotitle & "'", dbOpenSnapshot) If rs.EOF Then MsgBox "No books available in the library", vbInformation, "Help" Exit Sub End If ElseIf Bookinfo!optsel(2).Value Then Set rs = db.OpenRecordset("select * from librarybook where author='" & Bookinfo!cboauthor & "'", dbOpenSnapshot)If rs.EOF Then MsgBox "No books by this author available in the library", vbInformation, "Help" Exit Sub End If Else str = "parameters [a] text, [b] text;" str = str & "select * from librarybook where title=[a] and author=[b] " Set qry = db.CreateQueryDef("", str) qry.Parameters("a") = Bookinfo!cbotitle qry.Parameters("b") = Bookinfo!cboauthor Set rs = qry.OpenRecordset If rs.EOF Then MsgBox "No books like this available in the library", vbInformation, "Help" Exit Sub End If End If rs.MoveLast If rs.RecordCount <= 1 Then cmdFirst.Visible = False cmdLast.Visible = False cmdPrevious.Visible = False cmdNext.Visible = False End If rs.MoveFirst showdata End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

72

Page 73: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Select Case KeyCode Case vbKeyEscape cmdClose_Click Case vbKeyEnd cmdlast_Click Case vbKeyHome cmdfirst_Click Case vbKeyUp, vbKeyPageUp If Shift = vbCtrlMask Then cmdfirst_Click Else cmdPrevious_Click End If Case vbKeyDown, vbKeyPageDown If Shift = vbCtrlMask Then cmdlast_Click Else cmdnext_Click End If End SelectEnd Sub

Private Sub Form_Unload(Cancel As Integer)rs.Close Screen.MousePointer = vbDefaultEnd Sub

Private Sub cmdClose_Click() Unload Me Bookinfo.ShowEnd Sub

Private Sub cmdfirst_Click() On Error GoTo GoFirstError rs.MoveFirst showdata Exit SubGoFirstError: MsgBox Err.DescriptionEnd Sub

Private Sub cmdlast_Click() On Error GoTo GoLastError rs.MoveLast showdata Exit Sub

73

Page 74: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

GoLastError: MsgBox Err.DescriptionEnd Sub

Private Sub cmdnext_Click() On Error GoTo GoNextError If Not rs.EOF Then rs.MoveNext If rs.EOF And rs.RecordCount > 0 Then Beep rs.MoveLast End If showdata Exit SubGoNextError: MsgBox Err.DescriptionEnd Sub

Private Sub cmdPrevious_Click() On Error GoTo GoPrevError If Not rs.BOF Then rs.MovePrevious If rs.BOF And rs.RecordCount > 0 Then Beep rs.MoveFirst End If showdata Exit SubGoPrevError: MsgBox Err.DescriptionEnd Sub

Sub showdata()txtFields(0) = rs!b_no & ""txtFields(1) = rs!Title & ""txtFields(2) = rs!author & ""Text1 = rs!bookstatus & ""End Sub

74

Page 75: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Conclusion

A short and pain taking but highly knowledgeable journey comes to an end. The summer training in the USHA MARTIN gave us a great opportunity to learn things beyond our course.

We learn how to Analyze a system, how to design it etc. . Whatever we have read in our course, during the training we got the opportunity to implement those idea and we got a great practical knowledge. This project helped us to enhance the inner ability. We are confirm that project will help us in our career because learning never ends.

This thesis is devoted to computer analysis techniques in the development of the Library management system. For obtaining some proper results, a real model of the loading diagram has been build. On the basis of this load diagram analyses are performed. Finally, geometry is also optimized. The models used for simulation are real, taken from a reputed company USHA MARTIN Pvt.Ltd, Tatisilwai. This type of Library management system can be used in this company because of its technical benefits in most of the Library system applications. Because of its easier user interface it is very convenient for user to use and can be easily appended as to users needs. This software in made to fulfill all the modern library management systems copes with all the modern needs of the user.

During the simulation the file distribution of the software it was observed that it was easier to use and more effective. Also an effort has been made to meet the optimum shape needed to design them for an optimal operation. It can be concluded from the study that the nominal operation of this software is that it can face all the changes needed by the user and is made to easier management of a library .

75

Page 76: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

Limitations

Time constraint: Time was always a constraint with this project to complete in time.

It does not contain any record of purchase of books.

Being coded in Visual Basic 6.0, the connectivity process was not easy.

Errors might creep up during implementation

76

Page 77: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

References

The matter for this project has been collected from:-

1. Website:- www.google.com E-books

2. Books:- Visual Basic 6.0,Pearson Education

Author-Dietal &Dietal

Visual Basic 6.0,BPB Publications

77

Page 78: Spellofseakumarprasun.yolasite.com/resources/Library management syste…  · Web viewIt got the ISO 9000 Certification by BVQI in 1994. ICICI (BCB) did the business process re-engineering

78