Library ANSHULfinal
Library ANSHULfinal
INDEX
ACKNOWLEDGEMENT CERTIFICATE INTRODUCTION SYSTEM ANALYSIS PREFACE :02 :03 :04 :05 :06
HARDWARE REQUIREMENT:07 FRONT END BACK END STRUCTURE CHART INTERFACES DATABASE DESIGN CODING :08 :09 :10-11 :12-20 :21-26 :27-93
Acknowledgement
We express our special and profound gratitude to Guides Mr. Munish Sir (HoD BCA Department), without whos coopration, observation and interest this project would not have been completed easily. We are highly greatfull to them. They guided us through out the project, and helped us in removing all the drawbacks from it. We would like to thank our lab incharge Mr. KP Singh who extended full cooperation & guided to us and responded to our requests positively whenever we approached his. His help all the time in the course of this study was very inspiring. We thankful to our library incharge for given us a valuable guidance of Library. With out their guidance we were no able to complete this Project.
Certificate
This is to certify that project entitled Library Management System has been Developed by Anshul, Prashant Kumar, Avinash Prashad and Sandeep Kuamr student of BCA VI Semester of FIT of BCA under my supervision. They worked on the Library Management System. They had used Visual Basic Computer language tool for the Project. Their work is Excellent. I wish them all the best for their bright future. Mr. Munish (HOD (dept.of B.C.A))
Library management is to manage books in particular way so that easy transaction may become possible. In the library there are different books on rack for eg. one rack may belong to chemistry ,one to history and so on . Generally books are managed in library on the basis of subjects so that one can get a particular book. Now-a-days when every field is getting computerized then it become necessary to computerized the library system. In library management every book is on the rack which contains every information about book as its author name, publication . In library racks refers to subjects in library . Suppose there are three racks in library as chemistry, computer , history . In the rack of chemistry there are books related to chemistry of different authors and publications. In the same way computer will contain computer books. In library when someone issues book then a record is stored for transaction. Transaction record will contain system that every information about the rack is stored in database .In database there are information about the member such as members name , address, phone no, membership duration etc. and about books such as book name ,author name, date of issue ,date of return which will depend on the librarian .Every library have its own rules about the transaction of a book and it is depend on the rules that in how much time a member can return a book . If a member does not return the book within the predefined time then he will be charged with fine. When member returns the book then his/her transaction is removed from the record. This process is continued for all the members who issue/return the book. In computerized library management system one table is also maintained for transaction, in which every record for book issue or return is stored there. When someone issue the book then a record is stored there and when he returns it then this record is deleted. Thus library management is a well planned record keeping system of books.
SYSTEM ANALYSIS
System analysis means to analysis the system. System study deals with every aspect of the system. In this topic I made a picture about the manual system and the computerized system and show you a difference between the both system.
MANUAL SYSTEM:
In the manual library management system every work is done manually. Every record pertaining to book is maintained in the file. There are different racks in the library so there are too much files of record keeping .When someone issue a book then a record is also maintained separately . When he/she return the book then this record is removed. In this way all manipulation takes lots of time. By mistake files may be lost or it may be damaged .Conclusion is that a manual library management is very time consuming.
COMPUTERIZED SYSTEM:
In the computerized system every task is handled with the help of computer. If one want to see the details of every book in a particular rack then he can. Programmer may lock the program and may use his password. In the manual system one has to search for the file. One may easily search the book and information about the members can be received. If one want to search the book then he/she has to click the button only and has to enter data. But computerized system needs full electricity and dust free room. In this system, if programmer has no password then one may misuse this. So programmer should take care of it. In this way the main advantage of computerized system over manual system is that it is time not consuming. Now a days when time is a major factor then it needs to reduce the time as possible. It is not recommended that user(may be librarian) should have deep knowledge of the programming. He should have the knowledge about the data entry and other fundamentals concepts. In this way I can say that a computerized system whether it is banking system or school management or library management each needs to be computerized.
PREFACE
Computer is one of the most powerful tools that man has ever created. Long ago, computers wereused for scientific and engineering application but presently most of work is done by the computers is of non computational type. My project is based on the computerized management of library. My project, entitled Library Management System, is aimed at providing easy way for the maintenance of consumer database in a Library. It comprises of a menu that provides four options and a user can go for any option that corresponds to the associated task. This software covers: To Issue a book To Return a book Member Information Book information There is also a provision for obtaining reports. I have worked my best to make this software user friendly. Any suggestion for the enhancement of this software is welcome.
HARDWARE REQUIREMENT
This software runs within any environment. This software needs at least Pentium processor 32 MB RAM memory , 2.1 GB of Hard disk , SVGA display of 1 MB video memory and Color monitor but with this lot of processor power consumed and speed of the system will be very slow. Therefore a realistic hardware configuration for this software is:Processor Operating System Ram Memory Monitor Hard Disk Display Keyboard Printer Mouse Storage Device : : : : : : : : : : Pentium 3 or higher processor Microsoft window 98 128 MB VGA Monitor or high resolution Monitor 8.4 GB of free space required during installation MGA/CGA/EGA/VGA cord 104 keys H P Laser True Mouse Floppy Disk 1.44 MB 6.0
FRONT END
VISUAL BASIC has been developed by Microsoft. Visual Basic can use a large number of reference libraries and components. Visual Basic-the environment provides integration with a variety of other tools, including source code management, component reuse tools and data manipulation. Visual Basic truly is much more of a programming environment than just a language. Using this environment, a single developer can quickly create a simple application; a team of developers can create a sophisticated, distributed application.
BACK END
A database is a collection of information that's related to a particular subject or purpose, such as tracking customer orders or maintaining a music collection. If your database isn't stored on a computer, or only parts of it are, you may be tracking information from a variety of sources that you have having to coordinate and organize yourself. For example, suppose the phone numbers of your suppliers are stored in various locations: in a card file containing supplier phone numbers, in product information files in a file cabinet, and in a spreadsheet containing order information. If a supplier's phone number changes, you might have to update that information in all three places. In a database, however, you only have to update that information in one place the supplier's phone number is automatically updated wherever you use it in the database. Using Microsoft Access, you can manage all your information from a single database file. Within the file, you can use:
Tables to store your data. Queries to find and retrieve just the data you want. Forms to view, add, and update data in tables. Reports to analyze or print data in a specific layout. Data access pages to view, update, or analyze the database's data from the Internet or an intranet.
You can do the following to take advantage of the accessibility features in Access:
View and print lists of all available shortcut keys. Use the keyboard to define relationships, add or copy text boxes or other controls on forms and reports, and rearrange columns in Datasheet view. Create a toolbar that contains only the buttons and menus you use most often for the current database or for all your databases. You can also increase the size of the buttons and group related buttons together. Set menus to display all commands all the time. You can also change toolbars to appear as they did in earlier versions of Office. Create custom colors or change the background color for a section or control on a form or report. Insert repeated entries in a column quickly by using the keyboard. Automatically correct common typing errors and even specify a list of errors you want corrected as you type
10
Introduction Screen
Login Form
Change Password
Menu Form
Issue Form
Return Form
Member Form
Book Form
11
ACTIVITY 1 : SURVEY This activity is also known as the feasibility study. It begins with a request from the user for a new system. It involves the following: Identify the responsible users for the system. Clarify the user request. Identify deficiencies in the current system. Establish goals and objectives for the new system. Prepare a project charter that will be used to guide the remainder of the project.
The objectivity of system analysis is to develop structured system specification for the proposed system. The structured system specification should describe what the proposed system would do, independent of technology that will be used to
12
implement these requirements. The structured system specification will be called the essential model in many books essential model is called the logical model. The essential model itself consists of multiple models, modelling different aspect of the system. The data flow diagrams may model the function of the system, entity relationship diagrams may model the data and their relationship and the state transition diagrams may model time dependent behaviour of the system. The essential model in this project consist of only process model i.e. data flow diagram. The essential model thus consist of the following : Context Diagram. Event List. Levelled Data Flow Diagram. Process Specification for the Flows and Stores on the DFDs. Understand the current information system. Analyse the current system to find the deficiencies in it. Develop the functional specification for the new system. Review the Feasibility, and Cost-Benefit Analysis.
This activity deals with certain design issues, which are to be finalised in consultation with the user. The two most important design issues of the relevance to the user are the automation boundary and the human-machine interface, the output
13
of this proposed system. This model in addition to the essential model defines the following for the proposed system. Automation Boundary Report Layout. Screen Layout for the Data Entry Forms. The parts of the new system consist of. The physical layout of the input and output document. The user interface of the software for the system.
System design involves transformation of the user implementation model into software design. The design specification of the proposed system consist of the following: Develop the modules structure for the software. Develop the specification for each module. Design the file layout or the database.
15
ACTIVITY 5: IMPLEMENTATION
This activity is actually concerned with the development of software. It includes various operations: Programming Testing Integration of modules into a progressively more complete system.
This activity generates a set of test data, which can be used to test the new system before accepting information technology.
Quality assurance is also known as final testing or acceptance testing. This activity requires, as its input, acceptance test data generated in activity 6 and an integrated system produced by activity 5.
16
This activity involves the development of the user manual for the new system. Here we describe the process we have given in implementation activity.
This activity involves conversion of data from the existing system to the new system.
This is the last activity in the system development life cycle. The changeover from the current system to the new system is done. This project involved all the activities in the life cycle except for database conversion and installation
17
This is Problem definition and it includes the description of the current system and the deficiencies in the current system. Current system is manual maintenance of all the entities and transaction of the library.
1.
The manual system lacks immediate retrieval of information. This problem is common to all of us just to retrieve the information about the availability of Books, etc...
2.
The manual system lack immediate storage of information. To store proper information at proper place, we need to find a proper place in our books and we need to store the information at the places that can be easily searched.
3.
Nothing is permanent every thing changes, as time passes on. The same stands true with the system, which we are talking about, one can imagine, how difficult it
18
is, to alter some information written on the piece of paper. One way to alter is just cut off and throws away the paper and rewrites the same information with minor changes on the fresh sheet of paper. Another way is erase the previous information. Both are disgusting.
4.
Information is not an information, if it is unordered. In fact it is nothing more than a raw data. To make data useful we need to store it on various basis like on the basis of Book code, Title id, subject id, etc., but imagine how to store information in a manual system.
5.
Redundancy of information:
We have to make transactions with number of book at a number of times. There are always chances of recording information about the same book number of times. This is redundancy. Redundancy invites inconsistency. In case some information about a member or book is maintained twice or more than twice in future, if modification done at one place then how will you be able to decide which of the various information about the same is correct.
6.
Preparation of fine report, total number of missing book reports etc. becomes really difficult in a manual system. Even after hard work if one able to prepare it then it is not guaranteed that the prepared report is accurate and up to date whereas this is not the case with computerised systems.
19
20
21
22
23
24
25
26
27
28
29
FIELD NAME B_ID B_NAME B_SUBJECT B_COPY B_ISSUE B_LANGUAGE B_COST B_AUTHORNAME
DATA TYPE Long Text Text Long Long Text Integer Text
30
FIELD NAME C_ID C_NAME C_ADDRESS C_PHONENO C_MEMBERSHIPTYPE C_JOININGTIME C_TRANSACTION C_GNAME B_ID B_ISSUEDATE MEMBERSHIP_CHARGE
DATA TYPE Long Text Text Long Long Date/Time Long Text Long Date/Time Long
31
32
FIELD NAME PENALTY_NO PENALTY REMARK PENALTY_DATE B_ID C_ID ISSUE_DATE RETURN_DATE
DATA TYPE Long Long Text Date/Time Long Long Date/Time Date/Time
33
34
35
36
285 3810 3 5310 2895 0 'Transparent "Km. Meenakshi " = = = = = = = "MS Sans Serif" 9.75 0 700 0 'False 0 'False 0 'False 285 5070 2 5730 1905 0 'Transparent "M.I.S (D.A.V College)" = = = = "MS Sans Serif" 9.75 0 700
37
VB_Name = "frmSplash" VB_GlobalNameSpace = False VB_Creatable = False VB_PredeclaredId = True VB_Exposed = False
Option Explicit Private Sub Timer1_Timer() frmLogin.Show Timer1.Enabled = False End Sub
38
VERSION 5.00 Begin VB.Form Form1 Caption = "Form1" ClientHeight = 1980 ClientLeft = 60 ClientTop = 345 ClientWidth = 5460 LinkTopic = "Form1" ScaleHeight = 1980 ScaleWidth = 5460 StartUpPosition = 3 'Windows Default Begin VB.Frame Frame1 Caption = "Frame1" Height = 1695 Left = 120 TabIndex = 0 Top = 120 Width = 5175 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False
39
40
375 90 1 'Graphical 3 "To open the book form " 2511 1155
End Begin VB.CommandButton Cmdmember Caption = "&Member" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = -1 'True Strikethrough = 0 'False EndProperty Height = 375 Left = 90 Style = 1 'Graphical TabIndex = 2 ToolTipText = "To open the Member Information form" Top = 1724 Width = 1155 End Begin VB.CommandButton Cmdreturn Caption = "&Return" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = -1 'True Strikethrough = 0 'False EndProperty Height = 375 Left = 90 Style = 1 'Graphical TabIndex = 1 ToolTipText = "To open the Return form" Top = 937 Width = 1155 End Begin VB.CommandButton Cmdissue BackColor = &H8000000A& Caption = "&Issue" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0
41
42
43
44
Private Sub Timer1_Timer() On Error Resume Next Static c As Boolean If c = True Then Label1.ForeColor = Label2.ForeColor = Label3.ForeColor = c = False Else Label1.ForeColor = Label2.ForeColor = Label3.ForeColor = c = True End If End Sub Private Sub Timer2_Timer() Lblt.Caption = Time End Sub
45
46
End Begin VB.Label Lblidat Caption = "Issue_Date" Height = 240 Left = 150 TabIndex = 54 Top = 210 Width = 975 End Begin VB.Label Lblrdat Caption = "Return_Date" Height = 240 Left = 2640 TabIndex = 53 Top = 210 Width = 1110 End End Begin VB.Frame Frame3 Height = 3165 Left = 180 TabIndex = 26 Top = 4050 Width = 8145 Begin VB.CommandButton Cmdok Caption = "Ok" Height = 300 Left = 3060 TabIndex = 36 ToolTipText = "Click here to know the information about Book" Top = 315 Width = 585 End Begin VB.ComboBox Cmbbid Height = 315 Left = 1800 TabIndex = 35 ToolTipText = "Click here to select the Book id" Top = 285 Width = 900 End Begin VB.TextBox Txtbook Height = 315 Left = 5520 TabIndex = 34 Top = 2385 Width = 1035 End Begin VB.TextBox Txtissue Height = 315 Left = 1800
47
End Begin VB.TextBox Txtcopy Height = 315 Left = 5520 TabIndex = 32 Top = 1845 Width = 1050 End Begin VB.TextBox Txtsub Height = 315 Left = 1800 TabIndex = 31 Top = 1815 Width = 1860 End Begin VB.TextBox Txtcost Height = 315 Left = 5520 TabIndex = 30 Top = 1305 Width = 1425 End Begin VB.TextBox Txtlang Height = 315 Left = 1800 TabIndex = 29 Top = 1290 Width = 1845 End Begin VB.TextBox Txtbaname Height = 315 Left = 5520 TabIndex = 28 Top = 765 Width = 2250 End Begin VB.TextBox Txtbname Height = 315 Left = 1800 TabIndex = 27 Top = 765 Width = 1830 End Begin VB.Label Lblbook Caption = "Books_Remaining" Height = 360 Left = 3960 TabIndex = 47 Top = 2295 Width = 1305 End Begin VB.Label Lblmsg2 Caption = "Message" Height = 390
48
End Begin VB.Label Lblissue Caption = "Book_Issue" Height = 375 Left = 60 TabIndex = 45 Top = 2310 Width = 1050 End Begin VB.Label Lblcopy Caption = "Book_Copy" Height = 375 Left = 3960 TabIndex = 44 Top = 1770 Width = 900 End Begin VB.Label Lblbid Caption = "Book_ID" Height Left TabIndex Top Width = = = = = 315 840 43 240 675 "Book_Subject" 330 30 42 1770 1275 "Book_Cost" 375 3960 41 1245 900 "Book_Language" 345 30 40 1230 1200
End Begin VB.Label Lblsub Caption = Height = Left = TabIndex = Top = Width = End Begin VB.Label Lblcost Caption = Height = Left = TabIndex = Top = Width = End Begin VB.Label Lbllang Caption = Height Left TabIndex Top Width = = = = =
49
End Begin VB.Label Lblbname1 Caption = "Book_Name" Height = 315 Left = 30 TabIndex = 38 Top = 705 Width = 1020 End Begin VB.Label Lblmess Height = 375 Left = 1170 TabIndex = 37 Top = 2760 Width = 6255 End End Begin VB.Frame Frame2 Height = 3015 Left = 180 TabIndex = 7 Top = 1050 Width = 8145 Begin VB.CommandButton Cmdok2 Caption = "Ok" Height = 315 Left = 3120 TabIndex = 15 ToolTipText = "Click here to know the information of member of a given Customer id" Top = 255 Width = 585 End Begin VB.ComboBox Cmbcid Height = 315 Left = 1890 TabIndex = 14 ToolTipText = "Click here to select Customer id " Top = 270 Width = 930 End Begin VB.TextBox Txtjdate Height = 315 Left = 5610 TabIndex = 13 Top = 1770 Width = 1365 End Begin VB.TextBox Txtpno Height = 315 Left = 5610
50
End Begin VB.TextBox Txtaddress Height = 315 Left = 5610 MultiLine = -1 'True TabIndex = 11 Top = 660 Width = 2415 End Begin VB.TextBox Txtmemtype Height = 315 Left = 1890 TabIndex = 10 Top = 1770 Width = 705 End Begin VB.TextBox Txtfhn Height = 315 Left = 1890 MultiLine = -1 'True TabIndex = 9 Top = 1245 Width = 1830 End Begin VB.TextBox Txtname Height = 315 Left = 1890 MultiLine = -1 'True TabIndex = 8 Top = 720 Width = 1830 End Begin VB.Label Label6 Caption = "Year" Height = 375 Left = 2880 TabIndex = 25 Top = 1770 Width = 495 End Begin VB.Label Label10 Caption = "Message" Height = 375 Left = 90 TabIndex = 24 Top = 2250 Width = 1035 End Begin VB.Label Label9 Caption = "Customer_Joining Date" Height = 405 Left = 3870 TabIndex = 23 Top = 1740
51
52
53
54
Private Sub Cmdexit_Click() On Error Resume Next Dim choice As Integer choice = MsgBox("Do You Want To Exit", vbYesNo + vbQuestion) If choice = vbYes Then Me.Hide End If End Sub Private Sub Cmdissue_Click() On Error Resume Next db.Execute ("update BOOK set B_ISSUE=B_ISSUE+1 where B_ID=" & Cmbbid.Text) db.Execute ("update CUSTOMER set B_ISSUEDATE = #" & DTPickeridate.Value & "# where c_id=" & Val(Cmbcid.Text)) db.Execute ("update CUSTOMER set B_ID=" & Val(Cmbbid.Text) & " where c_id=" & Val(Cmbcid.Text)) rS3.AddNew rS3("B_ID") = Val(Cmbbid.Text) rS3("C_ID") = Val(Cmbcid.Text) rS3("ISSUE_DATE") = DTPickeridate.Value rS3("RETURN_DATE") = DTPickerrdate.Value rS3.Update Set rS3 = db.OpenRecordset("select max(t_no) from transaction") db.Execute ("update CUSTOMER set c_transaction=" & rS3(0) & " where c_id=" & Val(Cmbcid.Text)) Cmdissue.Enabled = False End Sub Private Sub Cmdok2_Click() On Error Resume Next rS1.MoveFirst rS1.FindFirst ("c_id=" & Cmbcid.Text) If rS1.NoMatch = False Then If Not rS1("B_ID") = "" Then MsgBox "We cannot issue more book to this customer" Cmdissue.Enabled = False cmdOK.Enabled = False Else cmdOK.Enabled = True Txtname.Text = rS1("c_name") Txtaddress.Text = rS1("c_address") Txtfhn.Text = rS1("c_gname") Txtpno.Text = rS1("c_phoneno") Txtmemtype.Text = rS1("c_membership type") Txtjdate.Text = rS1("c_joining date") Lblmessage.Caption = "The Member Record is exist" End If Else Lblmess.Caption = "The Book Record is not exist" End If End Sub
55
56
57
Icon = "return.frx":0000 LinkTopic = "Form1" ScaleHeight = 8130 ScaleWidth = 8460 StartUpPosition = 3 'Windows Default Begin VB.Timer Timer2 Interval = 700 Left = 480 Top = 7530 End Begin MSFlexGridLib.MSFlexGrid FlexGridid Height = 1425 Left = 4470 TabIndex = 47 Top = 0 Width = 4065 _ExtentX = 7170 _ExtentY = 2514 _Version = 393216 Cols = 3 AllowUserResizing= 1 End Begin VB.Frame Frame4 Height = 1425 Left = 210 TabIndex = 45 Top = -60 Width = 4215 Begin VB.Timer Timer1 Interval = 996 Left = 150 Top = 1290 End Begin VB.Label Labeldate Height = 315 Left = 3000 TabIndex = 51 Top = 1020 Width = 1125 End Begin VB.Label Labeltime Height = 315 Left = 840 TabIndex = 50 Top = 1020 Width = 1125 End Begin VB.Label Label20 Caption = "Date" BeginProperty Font Name = "MS Sans Serif"
58
End Begin VB.Label Label19 Caption = "Time" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 345 Left = 120 TabIndex = 48 Top = 1020 Width = 705 End Begin VB.Image Image1 BorderStyle = 1 'Fixed Single Height = 765 Left = 30 Picture = "return.frx":0442 Stretch = -1 'True Top = 120 Width = 1110 End Begin VB.Label Labelcap BorderStyle = 1 'Fixed Single Caption = "RETURN BOOK" BeginProperty Font Name = "Monotype Corsiva" Size = 20.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = -1 'True Strikethrough = 0 'False EndProperty Height = 645 Left = 1200 TabIndex = 46 Top = 180 Width = 2925 End
59
60
61
End Begin VB.TextBox Txtissuedate Enabled = 0 'False Height = 315 Left = 2400 TabIndex = 15 Top = 2064 Width = 1515 End Begin VB.TextBox Txtsub Enabled = 0 'False Height = 315 Left = 2400 TabIndex = 13 Top = 1608 Width = 1560 End Begin VB.TextBox Txtlang Enabled = 0 'False Height = 315 Left = 2400 TabIndex = 11 Top = 1152 Width = 1530 End Begin VB.TextBox Txtbname Enabled = 0 'False Height = 315 Left = 2400 TabIndex = 9 Top = 720 Width = 1620 End Begin VB.Label Label9 Caption = "Penalty" Height = 255 Left = 4320 TabIndex = 44 Top = 2520 Width = 1335 End Begin VB.Label Lblcurrent Caption = "Current Date" Height = 255 Left = 120 TabIndex = 43 Top = 2520 Width = 1335 End Begin VB.Label Lblreturn Caption = "Book_Return Date" Height = 255 Left = 4320 TabIndex = 42 Top = 2070
62
63
64
65
End Begin VB.Label Label3 Caption = Height = Left = TabIndex = Top = Width = End Begin VB.Label Label2 Caption = Height = Left =
66
End Begin VB.Label Label1 Caption = Height = Left = TabIndex = Top = Width = End
End End Attribute VB_Name = "return1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Dim rS3 As Recordset Dim rS1 As Recordset Dim rS2 As Recordset Dim db As Database Dim dt As Recordset Dim rt As Recordset Dim rS4 As Recordset Private Sub Cmdexit_Click() Dim choice As Integer On Error Resume Next choice = MsgBox("Do You Want To Exit", vbYesNo + vbQuestion) If choice = vbYes Then Me.Hide End If End Sub
Private Sub cmdOK_Click() On Error Resume Next Dim dA As Integer Dim ptY As Integer rS1.MoveFirst rS1.FindFirst ("c_id=" & Cmbcid.Text) If rS1.NoMatch = False Then Txtcname.Text = rS1("c_name") Txtaddress.Text = rS1("c_address") Txtfhn.Text = rS1("c_gname") Txtpno.Text = rS1("c_phoneno") Txtmemtype.Text = rS1("c_membership type") Txtjdate.Text = rS1("c_joining date") Lblmessage.Caption = "The Member Record is exist" rS2.FindFirst ("b_id=" & Val(rS1(8))) If Not IsNull(rS1(8)) Then If rS2.NoMatch = False Then
67
68
End Sub Private Sub Cmdreturn_Click() On Error Resume Next Dim strMessage As String Cmdreturn.Enabled = False db.Execute ("Update customer set B_ID=null where C_ID=" & Val(Cmbcid.Text)) db.Execute ("update book set B_ISSUE=B_ISSUE-1 where B_ID=" & Val(Txtbid.Text)) If Val(Txtpen.Text) > 0 Then strMessage = "Book is not returned on return date" rS4.AddNew rS4("PENALTY") = Val(Txtpen.Text) rS4("REMARK") = CStr(strMessage) rS4("PENALTY_DATE") = CDate(Date) rS4("B_ID") = Val(Txtbid.Text) rS4("C_ID") = Val(Cmbcid.Text) rS4("ISSUE_DATE") = CDate(Txtissuedate.Text) rS4("RETURN_DATE") = CDate(Txtret.Text) rS4.Update End If End Sub Private Sub FlexGridid_Click() FlexGridid.Col = 1 Cmbcid.Text = FlexGridid.Text End Sub Private Sub Form_Load() Dim r As Integer On Error Resume Next Me.Top = 0 Me.Height = Screen.Height Me.Left = menu.Width Me.Width = Screen.Width - menu.Width Set db = OpenDatabase("c:\PEACE\PEACE.MDB") Set rS1 = db.OpenRecordset("SELECT * FROM CUSTOMER") Set rS2 = db.OpenRecordset("SELECT * FROM BOOK") Set rS3 = db.OpenRecordset("SELECT * FROM TRANSACTION") Set rS4 = db.OpenRecordset("SELECT * FROM PENALTY") Labeltime.Caption = Time Labeldate.Caption = Date
69
70
71
End Begin VB.CommandButton Cmdfind Caption = "&Find" Height Left TabIndex ToolTipText Top Width = = = = = = 360 7410 9 "Find any Existing Record" 195 825
End End Begin VB.Frame Frame3 BackColor = &H00C0C0C0& Height = 3600 Left = 255 TabIndex = 20 Top = 1275 Width = 11610 Begin MSComCtl2.DTPicker DTPicker1 Height Left TabIndex ToolTipText Top Width _ExtentX _ExtentY _Version Format CurrentDate = = = = = = = = = = = 315 2535 16 "Enter joining Date of customer" 2895 1140 2011 556 393216 24510465 37708
End Begin VB.ComboBox Cmbchoice Height = 315 ItemData = "member.frx":0442 Left = 6930 List = "member.frx":044F TabIndex = 31 Text = "Mr." ToolTipText = "Enter Gender choice" Top = 405 Width = 675 End Begin VB.ComboBox Cmbcmt Height = 315 ItemData = "member.frx":0463 Left = 2640 List = "member.frx":0476 TabIndex = 3
72
End Begin VB.TextBox Txtfhn Height = 285 Left = 7680 TabIndex = 2 ToolTipText = "Enter Father or Husband Name" Top = 1380 Width = 1230 End Begin VB.TextBox Txtcid Enabled = 0 'False Height = 285 Left = 2565 TabIndex = 21 ToolTipText = "Enter customer ID" Top = 330 Width = 1095 End Begin VB.TextBox Txtcn Height = 285 Left = 7755 TabIndex = 0 ToolTipText = "Enter Customer Name" Top = 435 Width = 3615 End Begin VB.TextBox Txtca Height = 585 Left = 2550 MultiLine = -1 'True ScrollBars = 2 'Vertical TabIndex = 1 ToolTipText = "Enter Customer Address" Top = 1215 Width = 2310 End Begin VB.TextBox Txtcpno Height = 285 Left = 7710 TabIndex = 4 ToolTipText = "Enter Customer phone no" Top = 2235 Width = 1815 End Begin VB.Label Lblmr Caption = "Mr." Height = 270 Left = 7095 TabIndex = 32 Top = 1395 Width = 450 End Begin VB.Label Lbly
73
74
End End Begin VB.Frame Frame2 Height = 645 Left = 1613 TabIndex = 19 Top = 6000 Width = 8430 Begin VB.CommandButton Cmdsave Caption = "&Save" Height = 330 Left = 1539 TabIndex = 11 ToolTipText = "To save the Record" Top = 225 Width = 870 End Begin VB.CommandButton Cmdreport Caption = "&Report" Height = 330 Left = 7335 TabIndex = 15 Top = 240 Width = 870 End Begin VB.CommandButton Cmdadd Caption = "&Add" Height = 330 Left = 90 TabIndex = 10 ToolTipText = "To add any new Record" Top = 225 Width = 870 End Begin VB.CommandButton Cmddelete Caption = "&Delete" Height = 330 Left = 2988 TabIndex = 12 ToolTipText = "To delete any existing Record" Top = 225 Width = 870 End Begin VB.CommandButton Cmdmodify Caption = "&Modify" Height = 330 Left = 4437 Style = 1 'Graphical TabIndex = 13 ToolTipText = "To modify any existing Record" Top = 225 Width = 870
75
Cmdexit "&Exit" 330 5886 14 "Click here to exit " 225 870
End Begin VB.Frame Frame1 BackColor = &H00808080& ForeColor = &H8000000A& Height = 975 Left = 1800 TabIndex = 17 Top = 120 Width = 8415 Begin VB.Image Image1 BorderStyle = 1 'Fixed Single Height = 855 Left = 0 Picture = "member.frx":0494 Stretch = -1 'True Top = 120 Width = 1140 End Begin VB.Label Lblcaption Alignment = 2 'Center AutoSize = -1 'True BackColor = &H8000000B& Caption = "Form for Customer Details" BeginProperty Font Name = "MS Sans Serif" Size = 18 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough EndProperty Height = Left = TabIndex = Top = Width = End End End Attribute Attribute Attribute Attribute Attribute VB_Name = "member" VB_GlobalNameSpace = False VB_Creatable = False VB_PredeclaredId = True VB_Exposed = False = 0 'False
76
77
78
79
80
81
End Begin VB.CommandButton Caption = Height = Left = Style = TabIndex = ToolTipText = Top = Width = End End Begin VB.Frame Frame3 Height = 765
Left = 1440 TabIndex = 21 Top = 5910 Width = 6585 Begin VB.CommandButton Cmdfind Caption = "Find" Height = 375 Left = 5655 Style = 1 'Graphical TabIndex = 26 ToolTipText = "To find a Record" Top = 240 Width = 690 End Begin VB.CommandButton Cmdlast Caption = ">>" Height = 375 Left = 4320 Style = 1 'Graphical TabIndex = 25 ToolTipText = "Last Record" Top = 240 Width = 690 End Begin VB.CommandButton Cmdnext Caption = ">" Height = 375 Left = 2985 Style = 1 'Graphical TabIndex = 24 ToolTipText = "Next Record" Top = 240 Width = 690 End Begin VB.CommandButton Cmdpre Caption = "<"
82
End Begin VB.CommandButton Caption = Height = Left = Style = TabIndex = ToolTipText = Top = Width = End
End Begin VB.Frame Frame2 Height = 4695 Left = 1440 TabIndex = 2 Top = 1170 Width = 6585 Begin VB.TextBox Txtrbook Height = 315 Left = 2340 TabIndex = 11 ToolTipText = "Remaining copies of Book" Top = 4200 Width = 2445 End Begin VB.TextBox Txtbid Height = 285 Left = 2340 TabIndex = 10 ToolTipText = "Enter Book Id" Top = 240 Width = 1140 End Begin VB.TextBox Txtbname Height = 285 Left = 2340 TabIndex = 9 ToolTipText = "Enter Book Name" Top = 735 Width = 4185 End Begin VB.TextBox Txtbaname Height = 285 Left = 2340 TabIndex = 8 ToolTipText = "Enter Author Name" Top = 1230 Width = 2040 End
83
84
Lblbname = 0 'Transparent = "Book_Name" = 285 = 780 = 18 = 735 = 915 Lblbaname = 0 'Transparent = "Book_AuthorName" = 285 = 300 = 17 = 1230 = 1395 Lbllang = = = = = = = 0 'Transparent "Book_Language" 285 450 16 1740 1245
End Begin VB.Label Lblsubj BackStyle = 0 'Transparent Caption = "Book_Subject" Height = 285 Left = 585 TabIndex = 14 Top = 2745 Width = 1110 End Begin VB.Label Lblcopy BackStyle = 0 'Transparent Caption = "Book_Copy" Height = 285 Left = 765 TabIndex = 13 Top = 3255 Width = 930 End
85
86
End Attribute VB_Name = "book" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Dim RS As Recordset Dim db As Database Dim fd As Integer Dim ch As Boolean Dim cHk As Boolean Dim rS1 As Recordset Dim msG As String Private Sub Cmdadd_Click() On Error Resume Next ch = True Cmdpre.Enabled = False Cmdadd.Enabled = False Cmddelete.Enabled = False Cmdmodify.Enabled = False Cmdexit.Enabled = False Cmdfirst.Enabled = False Cmdnext.Enabled = False Cmdlast.Enabled = False Cmdsave.Enabled = True Cmdfind.Enabled = True Cmdreport.Enabled = True Txtbname.Text = " " Txtbaname.Text = " " Txtlang.Text = " " Txtcost.Text = " " Txtsubj.Text = " " Txtcopy.Text = " " Txtissue.Text = " " Txtrbook.Text = " " End Sub Private Sub Cmddelete_Click() Dim choice As Integer On Error Resume Next choice = MsgBox("Do You Want To Delete This Record", vbYesNo + vbQuestion) If choice = vbYes Then End If On Error Resume Next Cmdpre.Enabled = False Cmdadd.Enabled = False Cmddelete.Enabled = False Cmdmodify.Enabled = False Cmdexit.Enabled = False
87
88
89
90
VERSION 5.00 Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX" Object = "{00025600-0000-0000-C000-000000000046}#4.6#0"; "CRYSTL32.OCX" Begin VB.Form bookinfo Caption = "Book Information" ClientHeight = 8595 ClientLeft = 60
91
92
93
= = = = = = =
"MS Sans Serif" 8.25 0 400 0 'False 0 'False 0 'False 315 450 0 "Click here to select the Book author Name " 1680 1815
End Begin VB.CommandButton Cmdok BackColor = &H8000000A& Caption = "Ok" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = -1 'True Strikethrough = 0 'False EndProperty Height = 375 Left = 2640 MaskColor = &H00404000& Style = 1 'Graphical TabIndex = 1 ToolTipText = "Click here to display the information of Book according to book author name" Top = 1650 Width = 615 End Begin VB.ComboBox Cmbname BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = 5580 TabIndex = 3 ToolTipText = "Click here to select the Book name" Top = 1680 Width = 1815 End Begin VB.CommandButton Cmdok1 BackColor = &H8000000A&
94
95
End Begin VB.Label Lblaname BackStyle = 0 'Transparent Caption = "Book_Author Name" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H80000008& Height = 255 Left = 480 TabIndex = 9 Top = 1380 Width = 1695 End Begin VB.Label Lblname BackStyle = 0 'Transparent Caption = "B_Name" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H80000008& Height = 255 Left = 5640 TabIndex = 8 Top = 1380 Width = 975 End End Attribute Attribute Attribute Attribute Attribute Dim RS As Dim aN As Dim sA As Dim sN As Dim db As VB_Name = "bookinfo" VB_GlobalNameSpace = False VB_Creatable = False VB_PredeclaredId = True VB_Exposed = False Recordset Recordset Recordset Recordset Database
96
97
98
99
Attribute VB_Name = "Module1" Public Function isString(str As String) As Boolean Dim c As String Dim i As Integer Dim b As Boolean b = True l = Len(str)
100
101
102