SlideShare a Scribd company logo
Yash Agarwal
BCA Final Year
1 | P a g e
Visual Basic Project Report
A WORK REPORT SUBMITTED
IN PARTIAL FULLFILLMENT OF THE REQUIREMENT FOR THE DEGREE
Bachelor of Computer Application
Dezyne E’cole College
106/10, CIVIL LINES
AJMER
RAJASTHAN - 305001 (INDIA)
(FEBRUARY, 2017)
www.dezyneecole.com
SUBMITTED BY
YASH AGARWAL
BCA 3rd year
2 | P a g e
GRADE SHEET
This project report has been made under the guidance of Mr. Tarun Sharma faculty of Bachelor
of Computer Application. This project focus on various parameter of Library Management
System.
The overall project report is _______________________________________________________
______________________________________________________________________________
______________________________________________________________________________
_______________________________________________________.
Principal Signature __________________
Date __________________
3 | P a g e
CONTENT
Acknowledgement........................................................................................................................... 3
Synopsis........................................................................................................................................... 2
Introduction Page of Student........................................................................................................... 3
Chapter – 1 Introduction of Information Technology (IT)................................................................. 4
Chapter – 2 Introduction to Project ................................................................................................. 8
Chapter – 3 Project & Their Facilities............................................................................................. 10
Chapter – 4 Project Design............................................................................................................. 11
Chapter – 5 Database Development .............................................................................................. 15
Chapter – 6 System Requirements of PC...................................................................................... 215
Chapter – 7 Conclusion................................................................................................................ 216
Bibliography................................................................................................................................. 217
1 | P a g e
Acknowledgement
The satisfaction that accompanies that the successful completion of any task would be
incomplete without the mention of people whose ceaseless co-operation made it possible, whose
constant guidance and encouragement crown all efforts with success.
The project on Library Management System was developed in Visual Basic Language at
Dezyne E’cole College.
During the making of this project we have learnt a lot and we are extremely grateful and remain
indebted to our guide MR. Tarun Sharma for being a source of inspiration and for his constant
support in the design, implementation and evaluation of the project.
We are thankful to them for their constant constructive criticism and invaluable suggestions,
which benefited us a lot while developing the project on “Library Management System”.
He has been a constant source of inspiration and motivation for hard work. He has been very co-
operative throughout this project work.
Through this column, we express our warm thanks to him for their encouragement, co-operation
and consent without which we mightn’t be able to accomplish this project.
I cannot move on beloved without thank beloved Principal Mrs. Vinita Mathur for creating the
required academic environment which made my task appreciable.
We would like to thank the other faculty member also, at this occasion. Last but not the least, we
would like to thank our friends & family for support and encouragement they have given us
during the course of our work.
We also thanks our colleague Ms. Heena Tejwani who have helped in successful completion of
the project.
With due regards
Mr. Yash Agarwal
BCA 3rd Year
2 | P a g e
Synopsis
The project Library Management System gives us the complete information about the Library.
We give a Title for project that is “Your Helpmate” it means this application is helpful for users
and any time user can access it through staff or admin. This application is access by only staff
and admin. Members can’t access it directly.
The project is very useful for those who want to know about Library Management System.
This application maintains the records related to New Books, Issue Books, and Return Books
etc.
We can enter the records of new books and retrieve the details of books available in the Library.
We can issue the books available in the Library. We can issue the books to the members and
maintain their records and can also check how many books are issued and stock available in the
Library. In this project we can maintain the late fine of members who returns the issued books
after due date. All necessary requirements for the Library to manage added.
3 | P a g e
Qualification School/College Board/University Year Percentage
BCA-3rd
Year Dezyne E’cole
College
M.D.S. University 2016-17 Pursuing
BCA-2nd
Year Dezyne E’cole
College
M.D.S. University 2015-16 82.66%
BCA-1st
Year Dezyne E’cole
College
M.D.S. University 2014-15 78.88%
12th
Gujrati Sr. Sec.
School
RBSE 2014 62%
10th
Gujrati Sr. Sec.
School
RBSE 2012 56%
Introduction Page of Student
Yash Agarwal
Professional Qualification:
Pursuing Bachelor Degree in Computer Application from Dezyne E’cole College,
Ajmer Affiliated from Maharshi Dayanand Saraswati University, I have mastered the
basic languages and created lot of projects during my study period to hone my skills.
Academic Record -
Technical Skill Set:
 Good knowledge of Languages like
o C, C++, JAVA, Visual Basic 6.0, Java Script, HTML, CSS, SQL.
 Excellent knowledge of Microsoft Office.
 Knowledge of Web Design & Development.
 Other Skills Like:
o Presentation Skill
Co-Curricular and Achievements:-
 Participated and presented project on “Delhi Metro Fare System” on Java
Language in the yearly Identity Exhibition, 2016 at Dezyne E’cole College.
 Participated and presented project on “Money Transaction System” on C++
Language in the yearly Identity Exhibition, 2016 at Dezyne E’cole College.
 Participated and presented project on “Student Management System” on
C++ Language in the yearly Identity Exhibition, 2015 at Dezyne E’cole
College.
 Participated and presented project on “Smart Learning Web” Website in
the yearly Identity Exhibition, 2014 at Dezyne E’cole College.
 Awarded for Best Performance in Batch (B.C.A. 1st
year) Annual Event, 2015.
4 | P a g e
Main Project Undertaken (During College Study):
 C++ Language Assignment :
This Project includes many C++ programs for e.g. Currency Calculator, Text to Machine Code Convertor,
String Diamond, Array Operations, Number System Calculator, Birth days Calculator, Power Calculator,
Armstrong Calculator, Prime Number Calculator, Perfect Number Calculator, Student Mark sheet Printer,
Palindrome Calculator, Text Printer, Password Checker etc.
 Java Language Assignment :
This Project includes many Java GUI programs for e.g. Swaping, Word Statics, Arithmetic Calculator,
Change Case, Square and Double, ASCII Character Convertor, Number System etc.
 C++ Language Assignment :
This Project includes management of Student data like Id, Name, Class, Date of Birth, City, Phone no. etc.
and containing many other data manipulation operations like Adding, Viewing, Deleting, Modifying and
Searching of Records. This project is useful to manage College/School Students data.
 Java Language Assignment :
This Project includes many Java CUI programs for e.g. Friend Number Calculator, Currency Calculator,
Mobile Bill Calculator, Employee Salary System, Student Mark sheet etc.
 C++ Language Assignment :
This Project includes manage transaction of Money and Users Account like Deposit, Withdrawal, Transfer,
Mini Statement, User Account Information etc. and it has two parts that 1 for Exist User and 2 for Create
New User. This project is useful to manage Multiple Users Bank Account and their transactions.
Declaration:
I hereby declare that particulars given here are true and complete to the best of my knowledge and belief.
 Awarded for 1st position in who is the best competition (C++ Language) in
Annual Event, 2015.
 Awarded for 2nd position in who is the best competition (pc software) in
Annual Event, 2015.
 Awarded for 3rd position in who is the best competition (C Language) in
Annual Event, 2015 by Dezyne E′cole College.
 Attended Government Skill Development Program at college NDLM
(National Digital Literacy Mission).
 Attended Government Skill Development Program at college PMKVY
(Pradhan Mantri Kaushal Vikas Yojana).
 Attended Government Skill Development Program at college NSDC
(National Skill Development Corporation).
5 | P a g e
Chapter – 1 Introduction of Information Technology (IT)
Information Technology –
Set of tools, processes, and methodologies (such as coding, programming, data
communication, data conversion, storage & retrieval, system analysis & design, system control)
and associated equipment employee to collect process and present information. In broad terms, it
also includes office automation, multimedia and Tele – communication.
Information Technology, a source we call the “computer”, that can show you what
information via Tele-portal, scoping, working calibration for transmitting throughout the world.
More commonly known as I.T. is the most popular career and the fastest growing
industry in the world. There are several success stories about people who choose this field for a
career and are now on top of their game.
Few reasons for why people choose IT -
 Low cost of education
The biggest advantage of choosing information technology for a career is that it
has very low cost of education as compared to many other career choices. You
don’t need degree to become an I.T. professional. Instead, you can get quick
training to be certified in specific areas of information technology. This way you
save huge amounts of money that you may have otherwise spent on years of
college tuition.
 Fastest changing industry
The information technology industry operates at a speed much faster than any
other industry and for this reason, there’s always a significant demand for highly
skilled workers with the innovations in cloud computing, big data and cyber
security an aspiring I.T. professional has many avenues to pursue and grow from
and I.T. professional never stops learning, and must always stay on top of the
latest technology trend in order to be successful in the field. The more training
and knowledge the I.T. professional has the more employable he or she will be.
 Better income
It is well known fact that information technology professionals are paid well,
compared to other professionals. An I.T. professional with the right mix of
certifications & experience can find a permanent position in either the public or
private sector. Recently many companies have been extensively hiring experts in
cloud computing, cyber security and network security to help enhance their
current systems.
Bachelor of Computer Application
6 | P a g e
BCA is a part of information technology. In this age of computers and everything being
digitalized, knowledge about machines is very important. It helps the person have a distinct
advantage over the others who do not have a degree in computer applications. The domain is
growing a rapid pace. In the 1990’s with the advent of globalization computers grew in
prominence and slowly started to replace the paper and files in offices. It brought down the cost
to quite an exist.
BCA is a three year undergraduate degree course. Students will be taught subjects which
are related to the technological applications that are requires in today’s practical work field.
1. Skills to be learnt –
Students who study for a bachelor of computer application (BCA) will get skills
and information not only about computer and information technology but also in
communication, organization and management.
One also get to learn programming languages such as C, C++, JAVA,
JavaScript, HTML&CSS, SQL, Foxpro etc.
2. Career opportunities –
BCA given a number of opportunities to individuals to go ahead and shine in their
lives. The opportunities available for people doing BCA are galore. A few of
them like software programmer, system and network administrator, web designer,
faculty for computer science / communication technology etc. the range of
chances in information technology are immense.
According to our MDS University we have learnt many theory & practical subjects –
 First Year
o Management and accounting
o Computer fundamental
o PC software
o Fundamentals of C Programming
o Data structure and algorithm
o Multimedia Basic
 Second year
o Communication skills
o Database management system
o Client server technology
o Java Programming
o C++ Programming
o Computer Graphics
 Third year
o Visual Basic Programming
o Relational database management system (ORACLE / SQL)
o E - Commerce
7 | P a g e
o Computer Network and Mobile Computing
o Internet tools & website development (JavaScript, ASP)
o Management Information System
8 | P a g e
Chapter – 2 Introduction to Project
The project titled “Your Helpmate” is Library Management System software for monitoring
and controlling the transactions in a library.
The project Library Management System is developed on visual basic language which
mainly focuses on basic operation in a library like – adding new member, staff, new books &
updating new information, searching books and members and facility to issue and return books
and calculate penalty amount.
Library Management System is a windows application designed to help users maintain
& organize library. Our application is easy to use for both beginners & advanced users. It
features a familiar and well thought – out, an attractive user interface, combined with strong
searching, insertion & deletion capabilities. It can generate a library card for member of library.
The application library management system has four main module –
 Insertion, Deletion, Updation to database module – User friendly input screen.
 Extracting from the database module –Attractive output screen.
 Generate library card module – Issued books though card.
 Search facility system Module – Search for books and members.
The Library Management System is designed and develop for a receipt and issuance of books in
the library along with the member’s details. The books received in the library are entered in
books entry form and the new member is entered in the member entry form through staff.
Why it is made –
The main objective of this project is to provide a friendly environment to maintain the
details of books and library members. The main purpose of this project is replace the manually
work.
What Language –
Visual Basic 6.0 Language
Visual basic (VB) is a 3rd
generation event-driven programming language developed by
Microsoft for their operating system windows. Visual basic is a widely understood high level
programming language, written using simple English. Like – words & syntax.
It is an interpreted language. Code can be run immediately after being written. Having an
interpreter makes its simpler to use, as there is no need for the computer to compile the code,
possibly finding errors to fix, before the compiled version can be run. Once the code is working,
it can be compiled into an .exe file so that it will run on all modern windows computers, whether
VB is installed or not. The language allows a beginning programmer to produce professional –
looking windows applications, as its include drawing tools to create normal windows and
9 | P a g e
structures which allow programs to be adapted for use with the internet. VB will not run on
operating systems other than windows.
Visual Basic has its origin in basic which was developed round about the year 1960,
when high level languages were just being introduced to the computer community. Microsoft has
made it extremely powerful by gearing all its good features to the windows environment.
Evaluation of Visual Basic –
VB 1.0 was introduced in 1991. The drag and drop design for creating the user interface
is derived from prototype from generator developed by Allan cooper and his company called
Tripod. Microsoft contracted with cooper and his associates to develop Tripod into a
programmable form system for windows 3.0, under the code name Ruby (no relation to the Ruby
programming language). Tripod did not include a programming language at all. Microsoft
decided to combine Ruby with the basic language to create Visual Basic.
Need of Visual Basic –
Visual Basic is easy to learn programming language. With Visual Basic you can develop
windows based applications and Games. Visual Basic is much easier to learn than others
language (like Visual C++), and yet it’s powerful programming language. Visual Basic suite
more for desktop application developing than for Games developing. You can create
sophisticated games using Visual Basic, Visual Basic will be probably powerful enough to suite
all your application and games programming needs.
Integrated Development Environment –
The working environment in VB is often referred to as the Integrated Development
Environment or IDE, because it integrates many different functions such as design, editing,
compiling and debugging within a common environment. Since all our projects are developed
only in the IDE.
10 | P a g e
Chapter – 3 Project & Their Facilities
Library Management System is a project which aims in developing a computerized system to
maintain all the daily work of library. This project has many features which are generally not
available in normal Library Management System like – Staff login. It has also a facility where
member issue a book so all details of books issue date and return date show. It has a facility
where we add a new member so member card will be create for member.
Overall this project is ours is being developed to help the schools, organizations, college
to maintain the library in the best way possible and also reduce the human efforts.
Here is a list of some features which are in provided in this application –
 Keep records of different categories like – IT Books, other Books, Journals, and
Magazines etc.
 Classify the books subject wise.
 Easy way to enter new books.
 Easy way to Log-In and Log-Out.
 Automatic Fine calculation for late returns.
 Different criteria for searching a book.
 No need to invest heavily on hardware.
Objective of Library Management System –
1. Automation –The application automates each and every activity of the manual system and
increases its throughput. Thus the response time of the system is very less and it works very
fast.
2. Accuracy – The application provides the user a quick response with very accurate
information regarding the user etc. any details or system in an accurate manner, as when
required.
3. User Friendly – The application Library Management System has a very user friendly
interface. Thus the users will full very easy to work on it. The application provides accuracy
along with a pleasant interface. Make the present manual system more interactive, speedy
and user friendly.
4. Availability – The all transaction of books stored permanently in the database admin can see
the data in the availability of any information, whatever needed.
5. Maintain Cost – Reduce the cost of maintenance. It is standalone application so no required
of cost for maintain it.
11 | P a g e
Chapter – 4 Project Design
The project design process is not a step by step. But still much of design work depends on
knowledge and experience of the designs, when we start working on project design, we will face
different types of problems. However, following considerations should be kept in mind during
the project design phase:
Design Objectives –
The primary objective of the design of course, is to deliver the requirements as specified
already. In general the following design objectives kept in mind.
Practically –
The system must be stable and can be operated by people with average.
Efficiency –
This involves accuracy, timeliness, and comprehensiveness to the system output.
Cost –
It is desirable to aim for a system with a minimum cost subject to the condition that it
must satisfy all requirements & maintain maintenance.
Flexibility –
The system should be modifiable depending on the changing needs if the user. It should
also be portable to different computer system but not other than Windows OS.
Security –
This is very important aspect of the design and should cover areas of hardware reliability,
fall back procedures, physical security if the data. System design involves first logical design and
then physical construction of the system.
Major Project Design Activities –
Several development activities are carried out during structured design. They are database
design, implementation planning, and system interface.
Design Process –
The system design process is an exercise of specifying how, the system will work. It is an
interactive process which is based on what the system will be do as shown in the report. Mainly
following two parts have been included in the system design process.
12 | P a g e
1. Output Design –
The starting point of the design process is the proper knowledge of system
requirements which will normally be converted on terms of output.
2. Input Design –
Once the output requirements have been finalized the next step in to find out what
data need to be made available to the system to procedure the desired outputs.
Data Flow Diagrams of Library Management System:
 DFD Level 0
 DFD Level 1
 DFD Level 2
Admin / Staff Library Management
System
Request
Response
Admin / Staff Library Management
System Database
Request Request
Response Response
Admin / Staff Library Management
System
Database
Interaction Store in MS Access
13 | P a g e
 DFD Level 3
Admin / Staff Library Management
System
Database
Interaction Store in MS
Access
Display Message
Configuration
Author Book Publisher Book Issue
Member Staff
Subject
Categories
Book Return
Fine (If any)
Insert, Save, Update, Save Update, Delete, Search
14 | P a g e
 DFD Level 4
Admin / Staff Library Management
System
Database
Interaction Store in MS
Access
Display Message
Configuration
Library Cards Update
Security
Daily News Application
Form
Forgot
Password
15 | P a g e
Chapter – 5 Database Development
This activity deals with the design of the physical database. A key is to determine how the access
path art to be implemented.
As a programmer, we are expected to design and develop any program that works
correctly efficiently and the time is easy to be used by every person, who may or may not be well
versed with computer and its capabilities.
The project is based on the Library Management System, Being the Information System it
requires extensive use of some Database Management System to store, manipulate & handle the
huge and complex record. In DBMS we can act various attributes with the database like editing
the records, modifications, deletions of the records, view the records in various formats, listing
the database etc.
MS Access –
Microsoft Access is an office product that allows the user to create relational databases
that have tables of data. MS Access stores data in its own format based on the Access Jet
Database Engine. It can also import or link directly to data stored in other applications &
databases. It’s an easy to use tool for quickly creating browser based database applications.
In very simple term, MS Access is an Information Management tool that helps you store
information for reference, reporting & analysis.
Microsoft Access helps you analyze large amount of information, and manage related
data more efficient than MS Excel or other spreadsheet applications.
In our project we create 10 tables in MS Access-
 Book Info
Field Name Data Type
ISBN Number
Staff Name Text
Publisher Memo
Author Memo
Book Name Memo
Subject Text
Price Number
Rack No.
No. of Books
Books Edition
Publish Date
Book Categories
Image
Id
Number
Number
Text
Date/Time
Text
Text
Number
 Staff
16 | P a g e
Field Name Data Type
ID Number
User Name Text
Staff Type Text
First Name Text
Last Name Text
Address Text
Contact No. Text
Adhaar
Password
Sec Ques1
Ans1
Sec Ques2
Ans2
Image
Education
DOB
Text
Text
Text
Text
Text
Text
Text
Text
Date/Time
 Author
Field Name Data Type
ID Number
Name Memo
Address Memo
Contact No. Text
Image Text
 Publisher
Field Name Data Type
ID Number
Name Memo
Address Memo
Contact No. Text
Image Text
 Members
Field Name Data Type
ID Number
First Name
Last Name
Member Type
Text
Text
Text
Address
Ref. Name
Ref. Department
Ref. Contact
Text
Text
Text
Text
17 | P a g e
Father Name
Email
Education
Text
Text
Text
Contact No. Text
DOB
Member Image
Ref. Image
Date/Time
Text
Text
 Book Issue
Field Name Data Type
ID Number
Book Text
Issue Date Date/Time
Return Date Date/Time
Book Issued
Copies Left
Book Categories
Fine
Number
Number
Text
Number
 Book Return
Field Name Data Type
ID Number
Book Text
Issued Date Date/Time
Return Date Date/Time
Fine
Time
Number
Date/Time
 Book Categories
Field Name Data Type
ID Number
Book Type Text
 Login
Field Name Data Type
Type Text
User Name Text
Password Text
First Name Text
Last Name Text
 Daily News
18 | P a g e
Field Name Data Type
Date Date/Time
Add Author Number
Delete Author Number
Update Author Number
Add Publisher
Delete Publisher
Update Publisher
Add Staff
Delete Staff
Update Staff
Add Member
Delete Member
Update Member
Add Book
Delete Book
Update Book
Add Book Issue
Delete Book Issue
Update Book Issue
Add Book Return
Delete Book Return
Update Book Return
Add Book Category
Delete Category
Update Category
Cards
Number
Number
Number
Number
Number
Number
Number
Number
Number
Number
Number
Number
Number
Number
Number
Number
Number
Number
Number
Number
Number
Number
All Forms and Coding of our project:
 Splash Screen
19 | P a g e
Dim path As String
Dim i, j As Integer
Private Sub Form_Activate()
adrs = CurDir
End Sub
Private Sub Form_Load()
i = 1
Dim c%
Call connect
With dailyrs
Do Until .EOF
If .Fields(0) <> Date Then
c = 0
Else
c = 1
Exit Do
End If
.MoveNext
Loop
If c = 0 Then
.AddNew
.Fields(0) = Date
.Update
End If
End With
End Sub
Private Sub Timer1_Timer()
i = i + 1
If i < 10 Then
20 | P a g e
path = "d:lms project 2imagegif" & i & ".jpg"
Image2.Picture = LoadPicture(path)
Else
Timer1.Enabled = False
Timer2.Enabled = True
End If
End Sub
Private Sub Timer2_Timer()
Me.Left = Screen.Width / 2 - Me.Width / 2
Me.Top = Screen.Height / 2 - Me.Height / 2
Me.Height = Me.Height - 300
Me.Width = Me.Width - 463
If Me.Height < 300 Or Me.Width < 300 Then
Timer2.Enabled = False
Unload Me
login.Show
End If
End Sub
 Login Page
21 | P a g e
Dim tm, ci As Integer
Private Sub Form_Load()
login.Left = Screen.Width / 2 - login.Width / 2
login.Top = Screen.Height / 2 - login.Height / 2
Label2.Left = login.Width - Label2.Width
Label2.BackColor = RGB(110, 110, 110)
Label6.BackColor = RGB(170, 170, 170)
Label7.BackColor = RGB(170, 170, 170)
Label8.BackColor = RGB(170, 170, 170)
Label9.ForeColor = RGB(30, 30, 30)
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label2.BackColor = RGB(110, 110, 110)
Label2.ForeColor = RGB(255, 255, 255)
Label6.BackColor = RGB(170, 170, 170)
Label6.ForeColor = RGB(0, 0, 0)
Label7.BackColor = RGB(170, 170, 170)
Label7.ForeColor = RGB(0, 0, 0)
Label8.BackColor = RGB(170, 170, 170)
Label8.ForeColor = RGB(0, 0, 0)
End Sub
Private Sub Label2_Click()
Me.WindowState = 1
End Sub
Private Sub Label2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label2.BackColor = RGB(170, 170, 170)
Label2.ForeColor = RGB(64, 64, 64)
End Sub
Private Sub Label6_Click()
22 | P a g e
ChDrive (Left(adrs, 1))
ChDir (Right(adrs, Len(adrs) - 2))
Call connect
If Combo1.Text <> "" Then
If Len(Text1.Text) > 0 Then
If Len(Text2.Text) > 0 Then
Do Until rs.EOF
If rs.Fields(0) = Combo1.Text And rs.Fields(1) = Text1.Text And rs.Fields(2) =
Text2.Text Then
fn = rs.Fields(3) + " " + rs.Fields(4)
Do Until staffrs.EOF
If staffrs.Fields(3) = rs.Fields(3) Then
id = Val(staffrs.Fields(0))
img = staffrs.Fields(13)
End If
staffrs.MoveNext
Loop
If Combo1.Text = "Admin" Then
Else
menu.Label6(1).Enabled = False
menu.Label6(2).Enabled = False
menu.Label6(4).Enabled = False
End If
welcome.Show
ci = 1
Exit Do
Else
ci = 0
23 | P a g e
End If
rs.MoveNext
Loop
If ci = 0 Then
MsgBox ("Your are not authorized")
Text1 = ""
Text2 = ""
Text1.SetFocus
End If
Else
MsgBox "Please insert password"
End If
Else
MsgBox "Please insert user name"
End If
Else
MsgBox "Please select user type"
End If
End Sub
Private Sub Label6_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label6.BackColor = RGB(128, 128, 128)
Label6.ForeColor = RGB(220, 220, 220)
End Sub
Private Sub Label7_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label7.BackColor = RGB(128, 128, 128)
Label7.ForeColor = RGB(220, 220, 220)
End Sub
Private Sub Label8_Click()
Call connect
24 | P a g e
If Combo1.Text <> "" Then
If Text1.Text <> "" Then
Do Until rs.EOF
If Text1.Text = rs.Fields(1) Then
tr = Text1.Text
Unload Me
forgot.Show
c = 1
Exit Do
Else
End If
rs.MoveNext
Loop
If c = 0 Then
MsgBox "please enter correct user name"
End If
Else
MsgBox "please enter user name"
End If
Else
MsgBox "Please select user type"
End If
End Sub
Private Sub Label8_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label8.BackColor = RGB(128, 128, 128)
Label8.ForeColor = RGB(220, 220, 220)
End Sub
Private Sub Label7_Click()
Unload Me
25 | P a g e
a = MsgBox("Good To See You", vbExclamation = vbOKOnly, "Bye") = vbCancel
End Sub
 Forgot Password Form
Private Sub label3_Click()
Call connect
If Text4.Text <> "" Then
If Text5.Text <> "" Then
With staffrs
Do Until .EOF
If tr = .Fields(1) Then
If Text4.Text = .Fields(10) And Text5.Text = .Fields(12) Then
MsgBox "Your Password is " & .Fields(8)
Unload Me
login.Show
Else
MsgBox "Please contact with Your Main Administrater"
Unload Me
End If
End If
26 | P a g e
.MoveNext
Loop
End With
Else
MsgBox "please give second question answer"
End If
Else
MsgBox "please give first question answer"
End If
End Sub
Private Sub Label2_Click()
MsgBox "Please contact with Your Main Administrater"
Unload Me
End Sub
Private Sub Form_Load()
forgot.Left = Screen.Width / 2 - forgot.Width / 2
forgot.Top = Screen.Height / 2 - forgot.Height / 2
Call connect
With staffrs
Do Until .EOF
If tr = .Fields(1) Then
Text1.Text = .Fields(9)
Text2.Text = .Fields(11)
End If
.MoveNext
Loop
End With
End Sub
Private Sub Form_Unload(Cancel As Integer)
27 | P a g e
Unload Me
login.Show
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And
Not KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Text5_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And
Not KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
 Home Page or Menu Pages
28 | P a g e
Dim menucheck As Boolean
Dim a, b, c, quote_no As Integer
Dim qoute As String
Dim r As Integer
Private Sub Form_Activate()
Label27.ForeColor = RGB(20, 20, 20)
r = Rnd(r) * 50
Call connect
With qs
Do Until .EOF
If r = .Bookmark Then
quote = .Fields(0)
29 | P a g e
quote_no = .Fields(1)
Label27.Caption = quote
.Delete
.Update
End If
.MoveNext
Loop
.MoveLast
.AddNew
.Fields(0) = quote
.Fields(1) = quote_no
.Update
End With
End Sub
Private Sub Form_Click()
For i = 0 To 7
Label6(i).Visible = False
Next
For i = 0 To 1
Label7(i).Visible = False
Next
For i = 0 To 4
Label8(i).Visible = False
Next
menucheck = False
End Sub
Private Sub Form_Load()
Timer2.Enabled = True
Label25.Caption = Time
menu.Left = Screen.Width / 2 - menu.Width / 2
menu.Top = Screen.Height / 2 - menu.Height / 2
Label1.Left = menu.Width - Label1.Width
Label1.BackColor = RGB(110, 110, 110)
Shape2.FillColor = RGB(200, 200, 200)
Label26.ForeColor = RGB(30, 30, 30) ' title bar
Label3.BackColor = RGB(200, 200, 200)
Label4.BackColor = RGB(200, 200, 200)
Label5.BackColor = RGB(200, 200, 200)
Call connect
Label15.Caption = members.RecordCount
Label16.Caption = birs.RecordCount
ad = 0
st = 0
Do Until staffrs.EOF
30 | P a g e
If staffrs.Fields(2) = "Admin" Then
ad = ad + 1
ElseIf staffrs.Fields(2) = "Staff" Then
st = st + 1
End If
staffrs.MoveNext
Loop
Label17.Caption = ad
Label18.Caption = st
Label19.Caption = bcatrs.RecordCount
Label20.Caption = bookrs.RecordCount
Label21.Caption = publishers.RecordCount
Label23.Caption = authorrs.RecordCount
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As
Single)
If menucheck = False Then
Label3.BackColor = RGB(200, 200, 200)
Label3.ForeColor = RGB(0, 0, 0)
Label4.BackColor = RGB(200, 200, 200)
Label4.ForeColor = RGB(0, 0, 0)
Label5.BackColor = RGB(200, 200, 200)
Label5.ForeColor = RGB(0, 0, 0)
End If
Label6(0).BackColor = RGB(240, 240, 240)
Label6(1).BackColor = RGB(240, 240, 240)
Label6(2).BackColor = RGB(240, 240, 240)
Label6(3).BackColor = RGB(240, 240, 240)
Label6(4).BackColor = RGB(240, 240, 240)
Label6(5).BackColor = RGB(240, 240, 240)
Label6(6).BackColor = RGB(240, 240, 240)
Label6(7).BackColor = RGB(240, 240, 240)
Label7(0).BackColor = RGB(240, 240, 240)
Label7(1).BackColor = RGB(240, 240, 240)
Label8(0).BackColor = RGB(240, 240, 240)
Label8(1).BackColor = RGB(240, 240, 240)
Label8(2).BackColor = RGB(240, 240, 240)
Label8(3).BackColor = RGB(240, 240, 240)
Label8(4).BackColor = RGB(240, 240, 240)
Label6(0).ForeColor = RGB(0, 0, 0)
Label6(1).ForeColor = RGB(0, 0, 0)
Label6(2).ForeColor = RGB(0, 0, 0)
Label6(3).ForeColor = RGB(0, 0, 0)
Label6(4).ForeColor = RGB(0, 0, 0)
31 | P a g e
Label6(5).ForeColor = RGB(0, 0, 0)
Label6(6).ForeColor = RGB(0, 0, 0)
Label6(7).ForeColor = RGB(0, 0, 0)
Label7(0).ForeColor = RGB(0, 0, 0)
Label7(1).ForeColor = RGB(0, 0, 0)
Label8(0).ForeColor = RGB(0, 0, 0)
Label8(1).ForeColor = RGB(0, 0, 0)
Label8(2).ForeColor = RGB(0, 0, 0)
Label8(3).ForeColor = RGB(0, 0, 0)
Label8(4).ForeColor = RGB(0, 0, 0)
End Sub
Private Sub Label1_Click()
Me.WindowState = 1
End Sub
Private Sub Label3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As
Single)
Label3.BackColor = RGB(200, 200, 200)
Label3.ForeColor = RGB(0, 0, 0)
Label4.BackColor = RGB(200, 200, 200)
Label4.ForeColor = RGB(0, 0, 0)
Label5.BackColor = RGB(200, 200, 200)
Label5.ForeColor = RGB(0, 0, 0)
Label3.BackColor = RGB(150, 150, 150)
Label3.ForeColor = RGB(240, 240, 240)
End Sub
Private Sub Label4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As
Single)
Label3.BackColor = RGB(200, 200, 200)
Label3.ForeColor = RGB(0, 0, 0)
Label4.BackColor = RGB(200, 200, 200)
Label4.ForeColor = RGB(0, 0, 0)
Label5.BackColor = RGB(200, 200, 200)
Label5.ForeColor = RGB(0, 0, 0)
Label4.BackColor = RGB(150, 150, 150)
Label4.ForeColor = RGB(240, 240, 240)
End Sub
Private Sub Label5_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As
Single)
Label3.BackColor = RGB(200, 200, 200)
Label3.ForeColor = RGB(0, 0, 0)
Label5.BackColor = RGB(200, 200, 200)
Label5.ForeColor = RGB(0, 0, 0)
Label4.BackColor = RGB(200, 200, 200)
Label4.ForeColor = RGB(0, 0, 0)
32 | P a g e
Label5.BackColor = RGB(150, 150, 150)
Label5.ForeColor = RGB(240, 240, 240)
End Sub
Private Sub Label3_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As
Single)
If menucheck = True Then
For i = 0 To 1
Label7(i).Visible = False
Next
For i = 0 To 4
Label8(i).Visible = False
Next
For j = 0 To 7
Label6(j).Visible = False
Next
End If
If Button = 1 Then
For i = 0 To 7
Label6(i).Visible = True
Next
End If
menucheck = True
a = 1: b = 0: c = 0
Timer3.Enabled = True
End Sub
Private Sub Label4_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As
Single)
If menucheck = True Then
For i = 0 To 1
Label7(i).Visible = False
Next
For i = 0 To 4
Label8(i).Visible = False
Next
For j = 0 To 7
Label6(j).Visible = False
Next
End If
If Button = 1 Then
For i = 0 To 1
Label7(i).Visible = True
Next
End If
menucheck = True
33 | P a g e
a = 0: b = 1: c = 0
Timer3.Enabled = True
End Sub
Private Sub Label5_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As
Single)
If menucheck = True Then
For i = 0 To 1
Label7(i).Visible = False
Next
For i = 0 To 4
Label8(i).Visible = False
Next
For j = 0 To 7
Label6(j).Visible = False
Next
End If
If Button = 1 Then
For i = 0 To 4
Label8(i).Visible = True
Next
End If
menucheck = True
a = 0: b = 0: c = 1
Timer3.Enabled = True
End Sub
Private Sub Label6_Click(Index As Integer)
Unload Me
If Index = 0 Then
book.Show
ElseIf Index = 1 Then
author.Show
ElseIf Index = 2 Then
publisher.Show
ElseIf Index = 3 Then
subject.Show
ElseIf Index = 4 Then
staff.Show
ElseIf Index = 5 Then
login.Show
ElseIf Index = 6 Then
member1.Show
ElseIf Index = 7 Then
MsgBox "Good to see you"
Else
34 | P a g e
MsgBox "Good To See You"
End If
End Sub
Private Sub Label6_MouseMove(Index As Integer, Button As Integer, Shift As Integer,
X As Single, Y As Single)
Label6(0).BackColor = RGB(240, 240, 240)
Label6(1).BackColor = RGB(240, 240, 240)
Label6(2).BackColor = RGB(240, 240, 240)
Label6(3).BackColor = RGB(240, 240, 240)
Label6(4).BackColor = RGB(240, 240, 240)
Label6(5).BackColor = RGB(240, 240, 240)
Label6(6).BackColor = RGB(240, 240, 240)
Label6(7).BackColor = RGB(240, 240, 240)
Label6(0).ForeColor = RGB(0, 0, 0)
Label6(1).ForeColor = RGB(0, 0, 0)
Label6(2).ForeColor = RGB(0, 0, 0)
Label6(3).ForeColor = RGB(0, 0, 0)
Label6(4).ForeColor = RGB(0, 0, 0)
Label6(5).ForeColor = RGB(0, 0, 0)
Label6(6).ForeColor = RGB(0, 0, 0)
Label6(7).ForeColor = RGB(0, 0, 0)
Label6(Index).BackColor = RGB(180, 180, 180)
Label6(Index).ForeColor = RGB(240, 240, 240)
End Sub
Private Sub Label7_Click(Index As Integer)
Unload Me
If Index = 0 Then
Book_issue.Show
ElseIf Index = 1 Then
book_Return.Show
End If
End Sub
Private Sub Label7_MouseMove(Index As Integer, Button As Integer, Shift As Integer,
X As Single, Y As Single)
Label7(0).BackColor = RGB(240, 240, 240)
Label7(1).BackColor = RGB(240, 240, 240)
Label7(0).ForeColor = RGB(0, 0, 0)
Label7(1).ForeColor = RGB(0, 0, 0)
Label7(Index).BackColor = RGB(180, 180, 180)
Label7(Index).ForeColor = RGB(240, 240, 240)
End Sub
Private Sub Label8_Click(Index As Integer)
Call connect
Unload Me
35 | P a g e
If Index = 0 Then
updat.Show
ElseIf Index = 1 Then
about.Show
ElseIf Index = 2 Then
Cards.Show
ElseIf Index = 3 Then
Set application_form.DataSource = rs
application_form.Show
ElseIf Index = 4 Then
daily_news.Show
End If
End Sub
Private Sub Label8_MouseMove(Index As Integer, Button As Integer, Shift As Integer,
X As Single, Y As Single)
For i = 0 To 4
Label8(i).BackColor = RGB(240, 240, 240)
Label8(i).ForeColor = RGB(0, 0, 0)
Next
Label8(Index).BackColor = RGB(180, 180, 180)
Label8(Index).ForeColor = RGB(240, 240, 240)
End Sub
Private Sub Timer1_Timer()
If Right(Time, 2) = "PM" Then
If Left(Time, 1) < 4 Then
Label2.Caption = "Good Noon " + fn
ElseIf Left(Time, 1) < 8 And Left(Time, 1) >= 4 Then
Label2.Caption = "Good Evening " + fn
Else
Label2.Caption = "Good Night " + fn
End If
Else
Label2.Caption = "Good Morning " + fn
End If
End Sub
Private Sub Timer2_Timer()
Label25.Caption = Time
End Sub
 Welcome Page
36 | P a g e
Dim a As Integer
Private Sub Form_Activate()
Timer2.Enabled = True
End Sub
Private Sub Form_Load()
a = 0
login.Hide
menu.Show
Label2.Caption = Label2.Caption + " " + fn
Timer1.Enabled = True
welcome.Left = Screen.Width
welcome.Top = Screen.Height - 1600
Image1.Picture = LoadPicture(img)
End Sub
Private Sub Timer1_Timer()
a = a + 1
If a = 5 Then
Timer1.Enabled = False
Timer2.Enabled = False
Unload Me
End If
End Sub
Private Sub Timer2_Timer()
If welcome.Left > Screen.Width - 4500 Then
welcome.Left = welcome.Left - 30
End If
End Sub
 Add New Book Page
37 | P a g e
Dim temp2 As Variant
Dim up As Integer
Dim a As Integer
Dim bok As Integer
Dim txt As String
Private Sub Label12_Click()
CommonDialog1.ShowOpen
CommonDialog1.Filter = "Image|*.jpg|*.bmp|*.*"
CommonDialog1.InitDir = "d:lms project 2"
Image1.Picture = LoadPicture(CommonDialog1.FileName)
End Sub
Private Sub Label14_Click()
bok = Val(Text7.Text) + Val(InputBox("How many books You want to add", "Add"))
End Sub
Private Sub Label15_Click()
Call connect
If Text2.Text = "" And bookrs.RecordCount > 0 Then
38 | P a g e
With bookrs
Text9.Text = .Fields(1)
Combo2.Text = .Fields(2)
Text1.Text = .Fields(5)
Text2.Text = .Fields(0)
Text4.Text = .Fields(4)
Text3.Text = .Fields(6)
Text5.Text = .Fields(7)
Text7.Text = .Fields(8)
Text6.Text = .Fields(9)
Combo5.Text = .Fields(3)
DTPicker1.Value = .Fields(10)
Combo1.Text = .Fields(11)
Image1.Picture = LoadPicture(.Fields(12))
Text12.Text = .Fields(13)
End With
ElseIf Text2.Text <> "" And bookrs.RecordCount > 0 Then
With bookrs
Do Until .EOF
If Text2.Text = .Fields(0) Then
.MoveNext
Exit Do
End If
.MoveNext
Loop
If .EOF = False Then
Text9.Text = .Fields(1)
Combo2.Text = .Fields(2)
Text1.Text = .Fields(5)
Text2.Text = .Fields(0)
39 | P a g e
Text4.Text = .Fields(4)
Text3.Text = .Fields(6)
Text5.Text = .Fields(7)
Text7.Text = .Fields(8)
Text6.Text = .Fields(9)
Combo5.Text = .Fields(3)
DTPicker1.Value = .Fields(10)
Combo1.Text = .Fields(11)
Image1.Picture = LoadPicture(.Fields(12))
Text12.Text = .Fields(13)
End If
End With
End If
End Sub
Private Sub Label16_Click()
Call connect
If Text2.Text = "" And bookrs.RecordCount > 0 Then
With bookrs
.MoveLast
Text9.Text = .Fields(1)
Combo2.Text = .Fields(2)
Text1.Text = .Fields(5)
Text2.Text = .Fields(0)
Text4.Text = .Fields(4)
Text3.Text = .Fields(6)
Text5.Text = .Fields(7)
Text7.Text = .Fields(8)
Text6.Text = .Fields(9)
Combo5.Text = .Fields(3)
DTPicker1.Value = .Fields(10)
40 | P a g e
Combo1.Text = .Fields(11)
Image1.Picture = LoadPicture(.Fields(12))
Text12.Text = .Fields(13)
End With
ElseIf Text2.Text <> "" And bookrs.RecordCount > 0 Then
With bookrs
.MoveLast
Text9.Text = .Fields(1)
Combo2.Text = .Fields(2)
Text1.Text = .Fields(5)
Text2.Text = .Fields(0)
Text4.Text = .Fields(4)
Text3.Text = .Fields(6)
Text5.Text = .Fields(7)
Text7.Text = .Fields(8)
Text6.Text = .Fields(9)
Combo5.Text = .Fields(3)
DTPicker1.Value = .Fields(10)
Combo1.Text = .Fields(11)
Image1.Picture = LoadPicture(.Fields(12))
Text12.Text = .Fields(13)
End With
End If
End Sub
Private Sub Label17_Click()
Call connect
If Text2.Text = "" And bookrs.RecordCount > 0 Then
With bookrs
Text9.Text = .Fields(1)
Combo2.Text = .Fields(2)
41 | P a g e
Text1.Text = .Fields(5)
Text2.Text = .Fields(0)
Text4.Text = .Fields(4)
Text3.Text = .Fields(6)
Text5.Text = .Fields(7)
Text7.Text = .Fields(8)
Text6.Text = .Fields(9)
Combo5.Text = .Fields(3)
DTPicker1.Value = .Fields(10)
Combo1.Text = .Fields(11)
Image1.Picture = LoadPicture(.Fields(12))
Text12.Text = .Fields(13)
End With
ElseIf Text2.Text <> "" And bookrs.RecordCount > 0 Then
With bookrs
Do Until .EOF
If Text2.Text = .Fields(0) Then
.MovePrevious
Exit Do
End If
.MoveNext
Loop
If .BOF = False Then
Text9.Text = .Fields(1)
Combo2.Text = .Fields(2)
Text1.Text = .Fields(5)
Text2.Text = .Fields(0)
Text4.Text = .Fields(4)
Text3.Text = .Fields(6)
Text5.Text = .Fields(7)
42 | P a g e
Text7.Text = .Fields(8)
Text6.Text = .Fields(9)
Combo5.Text = .Fields(3)
DTPicker1.Value = .Fields(10)
Combo1.Text = .Fields(11)
Image1.Picture = LoadPicture(.Fields(12))
Text12.Text = .Fields(13)
End If
End With
End If
End Sub
Private Sub Label18_Click()
Call connect
If Text2.Text = "" And bookrs.RecordCount > 0 Then
With bookrs
Text9.Text = .Fields(1)
Combo2.Text = .Fields(2)
Text1.Text = .Fields(5)
Text2.Text = .Fields(0)
Text4.Text = .Fields(4)
Text3.Text = .Fields(6)
Text5.Text = .Fields(7)
Text7.Text = .Fields(8)
Text6.Text = .Fields(9)
Combo5.Text = .Fields(3)
DTPicker1.Value = .Fields(10)
Combo1.Text = .Fields(11)
Image1.Picture = LoadPicture(.Fields(12))
Text12.Text = .Fields(13)
End With
43 | P a g e
ElseIf Text2.Text <> "" And bookrs.RecordCount > 0 Then
With bookrs
.MoveFirst
Text9.Text = .Fields(1)
Combo2.Text = .Fields(2)
Text1.Text = .Fields(5)
Text2.Text = .Fields(0)
Text4.Text = .Fields(4)
Text3.Text = .Fields(6)
Text5.Text = .Fields(7)
Text7.Text = .Fields(8)
Text6.Text = .Fields(9)
Combo5.Text = .Fields(3)
DTPicker1.Value = .Fields(10)
Combo1.Text = .Fields(11)
Image1.Picture = LoadPicture(.Fields(12))
Text12.Text = .Fields(13)
End With
End If
End Sub
Private Sub Label20_Click()
Call connect
If Option3.Value = True Then
If Len(Text11.Text) > 0 Then
With bookrs
Do Until .EOF
If Val(Trim(Text11.Text)) = Trim(.Fields(0)) Then
Text9.Text = .Fields(1)
Combo2.Text = .Fields(2)
Text1.Text = .Fields(5)
44 | P a g e
Text2.Text = .Fields(0)
Text4.Text = .Fields(4)
Text3.Text = .Fields(6)
Text5.Text = .Fields(7)
Text7.Text = .Fields(8)
Text6.Text = .Fields(9)
Combo5.Text = .Fields(3)
DTPicker1.Value = .Fields(10)
Combo1.Text = .Fields(11)
Image1.Picture = LoadPicture(.Fields(12))
Text12.Text = .Fields(13)
Exit Do
End If
.MoveNext
Loop
End With
Else
MsgBox "Please mention ISBN NO. of Books"
End If
ElseIf Option4.Value = True Then
If Len(Text10.Text) > 0 Then
With bookrs
Do Until .EOF
If Trim(Text10.Text) = Trim(.Fields(4)) Then
Text9.Text = .Fields(1)
Combo2.Text = .Fields(2)
Text1.Text = .Fields(5)
Text2.Text = .Fields(0)
Text4.Text = .Fields(4)
Text3.Text = .Fields(6)
45 | P a g e
Text5.Text = .Fields(7)
Text7.Text = .Fields(8)
Text6.Text = .Fields(9)
Combo5.Text = .Fields(3)
DTPicker1.Value = .Fields(10)
Combo1.Text = .Fields(11)
Image1.Picture = LoadPicture(.Fields(12))
Text12.Text = .Fields(13)
Exit Do
End If
.MoveNext
Loop
End With
Else
MsgBox "Please mention Book Name"
End If
End If
End Sub
Private Sub label24_Click()
Frame2.Enabled = False
Label23.Enabled = True
Label22.Enabled = False
Label27.Enabled = False
Label25.Enabled = False
Label24.Enabled = False
Combo2.Enabled = True: Combo2.Text = ""
Text1.Text = "": Text1.Enabled = True
Text2.Text = "": Text2.Enabled = True
Text4.Text = "": Text4.Enabled = True
Text3.Text = "": Text3.Enabled = True
46 | P a g e
Text5.Text = "": Text5.Enabled = True
Text7.Text = "": Text7.Enabled = True
Text6.Text = "": Text6.Enabled = True
Combo5.Text = "": Combo5.Enabled = True
Combo1.Text = "": Combo1.Enabled = True
Image1.Picture = LoadPicture(""): Label12.Enabled = True
DTPicker1.Enabled = True
Text9.Text = fn
DTPicker1.Value = Date
Call connect
Combo1.Clear
Combo2.Clear
Combo5.Clear
Do Until authorrs.EOF
Combo5.AddItem authorrs.Fields(1)
authorrs.MoveNext
Loop
Do Until publishers.EOF
Combo2.AddItem publishers.Fields(1)
publishers.MoveNext
Loop
Do Until bcatrs.EOF
Combo1.AddItem bcatrs.Fields(1)
bcatrs.MoveNext
Loop
With bookrs
Do Until .EOF
a = .Fields(13)
.MoveNext
Loop
47 | P a g e
End With
a = a + 1
Text12.Text = a
End Sub
Private Sub label23_Click()
ChDrive (Left(adrs, 1))
ChDir (Right(adrs, Len(adrs) - 2))
Call connect
If Combo2.Text <> "" Then
If Len(Text1.Text) > 0 Then
If Len(Text2.Text) > 0 Then
If Len(Text4.Text) > 0 Then
If Len(Text3.Text) > 0 Then
If Len(Text5.Text) > 0 Then
If Len(Text7.Text) > 0 Then
If Len(Text6.Text) > 0 Then
If Combo5.Text <> "" Then
If Combo1.Text <> "" Then
If LoadPicture("") <> Image1.Picture Then
With bookrs
.AddNew
.Fields(0).Value = Val(Text2.Text)
.Fields(1).Value = Text9.Text
.Fields(2).Value = Combo2.Text
.Fields(3).Value = Combo5.Text
.Fields(4).Value = Text4.Text
.Fields(5).Value = Text1.Text
.Fields(6).Value = Val(Text3.Text)
.Fields(7).Value = Val(Text5.Text)
.Fields(8).Value = Val(Text7.Text)
48 | P a g e
.Fields(9).Value = Text6.Text
.Fields(10).Value = DTPicker1.Value
.Fields(11).Value = Combo1.Text
.Fields(12) = ".imagebooks" + CommonDialog1.FileTitle
SavePicture Image1.Picture, .Fields(12)
.Fields(13) = Text12.Text
.Update
Do Until dailyrs.EOF
If dailyrs.Fields(0) = Date Then
dailyrs.Fields(13) = dailyrs.Fields(13) + 1
dailyrs.Update
End If
dailyrs.MoveNext
Loop
MsgBox "Book Record insert"
Text9.Text = "": Text9.Enabled = False
Combo2.Text = "": Combo2.Enabled = False
Text1.Text = "": Text1.Enabled = False
Text2.Text = "": Text2.Enabled = False
Text4.Text = "": Text4.Enabled = False
Text3.Text = "": Text3.Enabled = False
Text5.Text = "": Text5.Enabled = False
Text7.Text = "": Text7.Enabled = False
Text6.Text = "": Text6.Enabled = False
Combo5.Text = "": Combo5.Enabled = False
Combo1.Text = "": Combo1.Enabled = False
Image1.Picture = LoadPicture(""): Label12.Enabled = False
DTPicker1.Enabled = False
UpDown1.Enabled = True
UpDown1.Enabled = False
49 | P a g e
Frame2.Enabled = True
Label22.Enabled = True
Label24.Enabled = True
Label25.Enabled = True
Label23.Enabled = False
Label27.Enabled = False
End With
Else
MsgBox "Please select Book Image"
End If
Else
MsgBox "Please Select Book Category"
Combo1.SetFocus
End If
Else
MsgBox "Please Select Book Author"
Combo5.SetFocus
End If
Else
MsgBox "Please Insert Book Edition"
Text6.SetFocus
End If
Else
MsgBox "Please Insert No. of Books"
Text7.SetFocus
End If
Else
MsgBox "Please Insert Rack No."
Text5.SetFocus
End If
50 | P a g e
Else
MsgBox "Please Insert Book Price"
Text3.SetFocus
End If
Else
MsgBox "Please Insert Book Name"
Text4.SetFocus
End If
Else
MsgBox "Please Insert ISBN No."
Text2.SetFocus
End If
Else
MsgBox "Please Insert Subject"
Text1.SetFocus
End If
Else
MsgBox "Please Select Publisher"
Combo2.SetFocus
End If
End Sub
Private Sub Label22_Click()
Dim author, publisher, category As String
Call connect
If Len(Text3.Text) > 0 Then
Frame2.Enabled = False
Label22.Enabled = False
Label23.Enabled = False
Label24.Enabled = False
Label25.Enabled = False
51 | P a g e
Label26.Enabled = True
Label27.Enabled = True
Label14.Enabled = True
Label29.Enabled = True
Combo2.Enabled = True
Text1.Enabled = True
Text2.Enabled = True
Text4.Enabled = True
Text3.Enabled = True
Text5.Enabled = True
Text7.Enabled = True
Text6.Enabled = True
Combo5.Enabled = True
Combo1.Enabled = True
Label12.Enabled = True
DTPicker1.Enabled = True
category = Combo1.Text
publisher = Combo2.Text
author = Combo5.Text
Combo1.Clear
Combo2.Clear
Combo5.Clear
Do Until authorrs.EOF
Combo5.AddItem authorrs.Fields(1)
authorrs.MoveNext
Loop
Do Until publishers.EOF
Combo2.AddItem publishers.Fields(1)
publishers.MoveNext
Loop
52 | P a g e
Do Until bcatrs.EOF
Combo1.AddItem bcatrs.Fields(1)
bcatrs.MoveNext
Loop
Combo1.Text = category
Combo2.Text = publisher
Combo5.Text = author
Else
MsgBox "Please select a record"
End If
End Sub
Private Sub Label25_Click()
Call connect
If Len(Text2.Text) > 0 Then
Do Until bookrs.EOF
If Val(Text2.Text) = bookrs.Fields(0) Then
bookrs.Delete
Text9.Text = ""
Combo2.Text = "": Combo2.Clear
Text1.Text = ""
Text2.Text = ""
Text4.Text = ""
Text3.Text = ""
Text5.Text = ""
Text7.Text = ""
Text6.Text = ""
Combo5.Text = "": Combo5.Clear
Combo1.Text = "": Combo1.Clear
Image1.Picture = LoadPicture("")
Do Until dailyrs.EOF
53 | P a g e
If dailyrs.Fields(0) = Date Then
dailyrs.Fields(14) = dailyrs.Fields(14) + 1
dailyrs.Update
End If
dailyrs.MoveNext
Loop
MsgBox "Data Deleted"
End If
bookrs.MoveNext
Loop
Else
MsgBox "Please Select Record"
End If
End Sub
Private Sub Label26_Click()
Frame2.Enabled = True
Label22.Enabled = True
Label24.Enabled = True
Label25.Enabled = True
Label23.Enabled = False
Label27.Enabled = False
Label14.Enabled = False
Label29.Enabled = False
Combo2.Enabled = False: Combo2.Clear
Text1.Enabled = False: Text1.Text = ""
Text2.Enabled = False: Text2.Text = ""
Text4.Enabled = False: Text4.Text = ""
Text3.Enabled = False: Text3.Text = ""
Text5.Enabled = False: Text5.Text = ""
Text7.Enabled = False: Text7.Text = ""
54 | P a g e
Text6.Enabled = False: Text6.Text = ""
Combo5.Enabled = False: Combo5.Clear
Combo1.Enabled = False: Combo1.Clear
Label12.Enabled = False: Image1.Picture = LoadPicture("")
DTPicker1.Enabled = False
End Sub
Private Sub Form_Load()
book.Left = Screen.Width / 2 - book.Width / 2
book.Top = Screen.Height / 2 - book.Height / 2
Text9.Enabled = False
Combo2.Enabled = False
Text1.Enabled = False
Text2.Enabled = False
Text4.Enabled = False
Combo5.Enabled = False
Text5.Enabled = False
Text7.Enabled = False
Text6.Enabled = False
Text3.Enabled = False
DTPicker1.Enabled = False
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload Me
menu.Show
Text9 = ""
End Sub
Private Sub Label21_Click()
Call connect
If bookrs.RecordCount < 1 Then
MsgBox "There have no Book"
55 | P a g e
Else
list_book.Show
End If
End Sub
Private Sub Label27_Click()
ChDrive (Left(adrs, 1))
ChDir (Right(adrs, Len(adrs) - 2))
Call connect
If Combo2.Text <> "" Then
If Len(Text1.Text) > 0 Then
If Len(Text2.Text) > 0 Then
If Len(Text4.Text) > 0 Then
If Len(Text3.Text) > 0 Then
If Len(Text5.Text) > 0 Then
If Len(Text7.Text) > 0 Then
If Len(Text6.Text) > 0 Then
If Combo5.Text <> "" Then
If Combo1.Text <> "" Then
If LoadPicture("") <> Image1.Picture Then
With bookrs
Do Until .EOF
If Val(Trim(Text12.Text)) = .Fields(13) Then
Print .Fields(13)
.Fields(0).Value = Val(Text2.Text)
.Fields(1).Value = Text9.Text
.Fields(2).Value = Combo2.Text
.Fields(3).Value = Combo5.Text
.Fields(4).Value = Text4.Text
.Fields(5).Value = Text1.Text
.Fields(6).Value = Val(Text3.Text)
56 | P a g e
.Fields(7).Value = Val(Text5.Text)
.Fields(8).Value = bok
.Fields(9).Value = Text6.Text
.Fields(10).Value = DTPicker1.Value
.Fields(11).Value = Combo1.Text
If Len(CommonDialog1.FileTitle) > 0 Then
.Fields(12) = ".imagebooks" + CommonDialog1.FileTitle
SavePicture Image1.Picture, .Fields(12)
End If
.Update
Do Until dailyrs.EOF
If dailyrs.Fields(0) = Date Then
dailyrs.Fields(15) = dailyrs.Fields(15) + 1
dailyrs.Update
End If
dailyrs.MoveNext
Loop
MsgBox "Book Record update"
Text9.Text = "": Text9.Enabled = False
Combo2.Text = "": Combo2.Enabled = False
Text1.Text = "": Text1.Enabled = False
Text2.Text = "": Text2.Enabled = False
Text4.Text = "": Text4.Enabled = False
Text3.Text = "": Text3.Enabled = False
Text5.Text = "": Text5.Enabled = False
Text7.Text = "": Text7.Enabled = False
Text6.Text = "": Text6.Enabled = False
Combo5.Text = "": Combo5.Enabled = False
Combo1.Text = "": Combo1.Enabled = False
Image1.Picture = LoadPicture(""): Label12.Enabled = False
57 | P a g e
DTPicker1.Enabled = False
Frame2.Enabled = True
Label22.Enabled = True
Label24.Enabled = True
Label25.Enabled = True
Label23.Enabled = False
Label27.Enabled = False
Label14.Enabled = False
Label29.Enabled = False
End If
.MoveNext
Loop
End With
Else
MsgBox "Please select Book Image"
End If
Else
MsgBox "Please Select Book Category"
Combo1.SetFocus
End If
Else
MsgBox "Please Select Book Author"
Combo5.SetFocus
End If
Else
MsgBox "Please Insert Book Edition"
Text6.SetFocus
End If
Else
MsgBox "Please Insert No. of Books"
58 | P a g e
Text7.SetFocus
End If
Else
MsgBox "Please Insert Rack No."
Text5.SetFocus
End If
Else
MsgBox "Please Insert Book Price"
Text3.SetFocus
End If
Else
MsgBox "Please Insert Book Name"
Text4.SetFocus
End If
Else
MsgBox "Please Insert ISBN No."
Text2.SetFocus
End If
Else
MsgBox "Please Insert Subject"
Text1.SetFocus
End If
Else
MsgBox "Please Select Publisher"
Combo2.SetFocus
End If
End Sub
Private Sub Label28_Click()
Timer1.Enabled = True
End Sub
59 | P a g e
Private Sub Label29_Click()
bok = Val(Text7.Text) - Val(InputBox("How many books You want to less", "Less"))
If bok < 0 Then
MsgBox "Sorry, Have no Enough Book"
bok = Val(Text7.Text)
Else
End If
End Sub
Private Sub Option3_Click()
If Option3.Value = True Then
Text10.Enabled = False
Text10.Text = ""
Text11.Enabled = True
End If
End Sub
Private Sub Option4_Click()
If Option4.Value = True Then
Text11.Enabled = False
Text11.Text = ""
Text10.Enabled = True
End If
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not
KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Text11_KeyPress(KeyAscii As Integer)
If Not IsNumeric(Text11.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then
KeyAscii = 0
60 | P a g e
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If Not IsNumeric(Text2.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Text2_LostFocus()
If Len(Text2.Text) < 8 Then
If Text2.Enabled = True Then
Text2.SetFocus
Else
End If
End If
Call connect
With bookrs
Do Until .EOF
If .Fields(0) = Text2.Text Then
MsgBox "ISBN already exist"
Text2.SetFocus
End If
.MoveNext
Loop
End With
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If Not IsNumeric(Text3.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
61 | P a g e
Private Sub Text5_KeyPress(KeyAscii As Integer)
If Not IsNumeric(Text5.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Text7_KeyPress(KeyAscii As Integer)
If Not IsNumeric(Text7.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Timer1_Timer()
If up = 0 Then
If Frame5.Top > 7220 Then
Label28.Top = Label28.Top - 20
Frame5.Top = Frame5.Top - 20
Else
Timer1.Enabled = False
up = 1
End If
Else
If Frame5.Top < 7830 Then
Label28.Top = Label28.Top + 20
Frame5.Top = Frame5.Top + 20
Else
Timer1.Enabled = False
up = 0
End If
End If
End Sub
 Add New Author Page
62 | P a g e
Dim up As Integer
Dim a As Integer
Private Sub Combo1_Click()
Call connect
With authorrs
Do Until .EOF
If Combo1.Text = .Fields(0) Then
Text1 = .Fields(1)
Text2 = .Fields(2)
Text4 = .Fields(3)
Image1.Picture = LoadPicture(.Fields(4))
End If
.MoveNext
Loop
End With
End Sub
Private Sub Label15_Click()
Call connect
63 | P a g e
If Combo1.Text = "" And authorrs.RecordCount > 0 Then
Combo1.Text = authorrs.Fields(0)
Text1.Text = authorrs.Fields(1)
Text2.Text = authorrs.Fields(2)
Text4.Text = authorrs.Fields(3)
Image1.Picture = LoadPicture(authorrs.Fields(4))
ElseIf Combo1.Text <> "" And authorrs.RecordCount > 0 Then
Do Until authorrs.EOF
If Combo1.Text = authorrs.Fields(0) Then
authorrs.MoveNext
Exit Do
End If
authorrs.MoveNext
Loop
If authorrs.EOF = False Then
Combo1.Text = authorrs.Fields(0)
Text1.Text = authorrs.Fields(1)
Text2.Text = authorrs.Fields(2)
Text4.Text = authorrs.Fields(3)
Image1.Picture = LoadPicture(authorrs.Fields(4))
End If
End If
End Sub
Private Sub Label16_Click()
Call connect
If Combo1.Text = "" And authorrs.RecordCount > 0 Then
authorrs.MoveLast
Combo1.Text = authorrs.Fields(0)
Text1.Text = authorrs.Fields(1)
Text2.Text = authorrs.Fields(2)
64 | P a g e
Text4.Text = authorrs.Fields(3)
Image1.Picture = LoadPicture(authorrs.Fields(4))
ElseIf Combo1.Text <> "" And authorrs.RecordCount > 0 Then
authorrs.MoveLast
Combo1.Text = authorrs.Fields(0)
Text1.Text = authorrs.Fields(1)
Text2.Text = authorrs.Fields(2)
Text4.Text = authorrs.Fields(3)
Image1.Picture = LoadPicture(authorrs.Fields(4))
End If
End Sub
Private Sub Label17_Click()
Call connect
If Combo1.Text = "" And authorrs.RecordCount > 0 Then
Combo1.Text = authorrs.Fields(0)
Text1.Text = authorrs.Fields(1)
Text2.Text = authorrs.Fields(2)
Text4.Text = authorrs.Fields(3)
Image1.Picture = LoadPicture(authorrs.Fields(4))
ElseIf Combo1.Text <> "" And authorrs.RecordCount > 0 Then
Do Until authorrs.EOF
If Combo1.Text = authorrs.Fields(0) Then
authorrs.MovePrevious
Exit Do
End If
authorrs.MoveNext
Loop
If authorrs.BOF = False Then
Combo1.Text = authorrs.Fields(0)
Text1.Text = authorrs.Fields(1)
65 | P a g e
Text2.Text = authorrs.Fields(2)
Text4.Text = authorrs.Fields(3)
Image1.Picture = LoadPicture(authorrs.Fields(4))
End If
End If
End Sub
Private Sub Label18_Click()
Call connect
If Combo1.Text = "" And authorrs.RecordCount > 0 Then
Combo1.Text = authorrs.Fields(0)
Text1.Text = authorrs.Fields(1)
Text2.Text = authorrs.Fields(2)
Text4.Text = authorrs.Fields(3)
Image1.Picture = LoadPicture(authorrs.Fields(4))
ElseIf Combo1.Text <> "" And authorrs.RecordCount > 0 Then
authorrs.MoveFirst
Combo1.Text = authorrs.Fields(0)
Text1.Text = authorrs.Fields(1)
Text2.Text = authorrs.Fields(2)
Text4.Text = authorrs.Fields(3)
Image1.Picture = LoadPicture(authorrs.Fields(4))
End If
End Sub
Private Sub Label20_Click()
Call connect
If Option3.Value = True Then
If Len(Text11.Text) > 0 Then
authorrs.MoveFirst
Do Until authorrs.EOF
If Val(Text11.Text) = authorrs.Fields(0) Then
66 | P a g e
Combo1.Text = authorrs.Fields(0)
Text1.Text = authorrs.Fields(1)
Text2.Text = authorrs.Fields(2)
Text4.Text = authorrs.Fields(3)
Image1.Picture = LoadPicture(authorrs.Fields(4))
Exit Do
End If
authorrs.MoveNext
Loop
Else
MsgBox "Please mention ID"
End If
ElseIf Option4.Value = True Then
If Len(Text10.Text) > 0 Then
authorrs.MoveFirst
Do Until authorrs.EOF
If Text10.Text = authorrs.Fields(1) Then
Combo1.Text = authorrs.Fields(0)
Text1.Text = authorrs.Fields(1)
Text2.Text = authorrs.Fields(2)
Text4.Text = authorrs.Fields(3)
Image1.Picture = LoadPicture(authorrs.Fields(4))
Exit Do
End If
authorrs.MoveNext
Loop
Else
MsgBox "Please mention Name"
End If
End If
67 | P a g e
End Sub
Private Sub Label21_Click()
If authorrs.RecordCount > 0 Then
list_authors.Show
Else
MsgBox "There have no authors"
End If
End Sub
Private Sub label24_Click()
Frame2.Enabled = False
Label23.Enabled = True
Label26.Enabled = True
Label24.Enabled = False
Label25.Enabled = False
Label22.Enabled = False
Label27.Enabled = False
Label12.Enabled = True
Combo1.Text = ""
Text1.Text = ""
Text2.Text = ""
Text4.Text = ""
Image1.Picture = LoadPicture("")
Combo1.Enabled = False
Text1.Enabled = True
Text2.Enabled = True
Text4.Enabled = True
Call connect
With authorrs
Do Until .EOF
a = .Fields(0)
68 | P a g e
.MoveNext
Loop
End With
a = a + 1
Combo1.Text = a
End Sub
Private Sub label23_Click()
ChDrive (Left(adrs, 1))
ChDir (Right(adrs, Len(adrs) - 2))
Call connect
If Len(Text1.Text) > 0 Then
If Len(Text2.Text) > 0 Then
If Len(Text4.Text) > 0 Then
If LoadPicture("") <> Image1.Picture Then
With authorrs
.AddNew
.Fields(0) = Combo1.Text
.Fields(1) = Text1.Text
.Fields(2) = Text2.Text
.Fields(3) = Text4.Text
.Fields(4) = ".imageauthor" + CommonDialog1.FileTitle
SavePicture Image1.Picture, .Fields(4)
.Update
End With
Do Until dailyrs.EOF
If dailyrs.Fields(0) = Date Then
dailyrs.Fields(1) = dailyrs.Fields(1) + 1
dailyrs.Update
End If
dailyrs.MoveNext
69 | P a g e
Loop
MsgBox "Data Saved"
Combo1.Text = ""
Text1.Text = ""
Text2.Text = ""
Text4.Text = ""
Image1.Picture = LoadPicture("")
Text1.Enabled = False
Text2.Enabled = False
Text4.Enabled = False
Label12.Enabled = False
Frame2.Enabled = True
Label23.Enabled = False
Label27.Enabled = False
Label25.Enabled = True
Label22.Enabled = True
Label24.Enabled = True
Label26.Enabled = True
Else
MsgBox "Please select author profile"
End If
Else
Text4.SetFocus
MsgBox "please insert contact no."
End If
Else
Text2.SetFocus
MsgBox "please insert addresss"
End If
Else
70 | P a g e
Text1.SetFocus
MsgBox "please insert name"
End If
End Sub
Private Sub Form_Load()
author.Left = Screen.Width / 2 - author.Width / 2
author.Top = Screen.Height / 2 - author.Height / 2
Call connect
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload Me
menu.Show
End Sub
Private Sub Label12_Click()
CommonDialog1.ShowOpen
Image1.Picture = LoadPicture(CommonDialog1.FileName)
End Sub
Private Sub Label22_Click()
Call connect
Frame2.Enabled = False
Label22.Enabled = False
Label23.Enabled = False
Label24.Enabled = False
Label25.Enabled = False
Label26.Enabled = True
Label27.Enabled = True
Combo1.Enabled = True
Text1.Enabled = True
Text2.Enabled = True
Text4.Enabled = True
71 | P a g e
Label12.Enabled = True
Combo1.Clear
Do Until authorrs.EOF
Combo1.AddItem authorrs.Fields(0)
authorrs.MoveNext
Loop
End Sub
Private Sub Label25_Click()
Call connect
If Combo1.Text <> "" Then
Do Until authorrs.EOF
If Combo1.Text = authorrs.Fields(0) Then
authorrs.Delete
Combo1.Clear
Text1.Text = ""
Text2.Text = ""
Text4.Text = ""
Image1.Picture = LoadPicture("")
Do Until dailyrs.EOF
If dailyrs.Fields(0) = Date Then
dailyrs.Fields(2) = dailyrs.Fields(2) + 1
dailyrs.Update
End If
dailyrs.MoveNext
Loop
MsgBox "Data Deleted"
End If
authorrs.MoveNext
Loop
Else
72 | P a g e
MsgBox "Please Select Record"
End If
End Sub
Private Sub Label26_Click()
Frame2.Enabled = True
Label23.Enabled = False
Label27.Enabled = False
Label25.Enabled = True
Label22.Enabled = True
Label24.Enabled = True
Label26.Enabled = True
Text1.Enabled = False
Text2.Enabled = False
Text4.Enabled = False
Label12.Enabled = False
Image1.Picture = LoadPicture("")
Combo1.Text = ""
Combo1.Enabled = False
Text1.Text = ""
Text2.Text = ""
Text4.Text = ""
End Sub
Private Sub Label27_Click()
ChDrive (Left(adrs, 1))
ChDir (Right(adrs, Len(adrs) - 2))
Call connect
With authorrs
If Len(Text1.Text) > 0 Then
If Len(Text2.Text) > 0 Then
If Len(Text4.Text) > 0 Then
73 | P a g e
If LoadPicture("") <> Image1.Picture Then
Do Until .EOF
If Combo1.Text = .Fields(0) Then
.Fields(1) = Text1
.Fields(2) = Text2.Text
.Fields(3) = Text4.Text
If Len(CommonDialog1.FileTitle) > 0 Then
.Fields(4) = ".imageauthor" + CommonDialog1.FileTitle
SavePicture Image1.Picture, .Fields(4)
Else
End If
.Update
Do Until dailyrs.EOF
If dailyrs.Fields(0) = Date Then
dailyrs.Fields(3) = dailyrs.Fields(3) + 1
dailyrs.Update
End If
dailyrs.MoveNext
Loop
MsgBox ("Data Updated")
Text1.Text = ""
Exit Do
End If
.MoveNext
Loop
Frame2.Enabled = True
Label23.Enabled = False
Label27.Enabled = False
Label25.Enabled = True
Label22.Enabled = True
74 | P a g e
Label24.Enabled = True
Label26.Enabled = True
Text1.Text = ""
Text2.Text = ""
Text4.Text = ""
Combo1.Clear
Label12.Enabled = False
Image1.Picture = LoadPicture("")
Combo1.Enabled = False
Text1.Enabled = False
Text2.Enabled = False
Text4.Enabled = False
Else
MsgBox "Please Select Image"
End If
Else
Text4.SetFocus
MsgBox "Please Enter Contact No."
End If
Else
Text2.SetFocus
MsgBox "Please Enter Address"
End If
Else
Text1.SetFocus
MsgBox "Please Enter Author Name"
End If
End With
End Sub
Private Sub Label28_Click()
75 | P a g e
Timer1.Enabled = True
End Sub
Private Sub Option3_Click()
If Option3.Value = True Then
Text10.Enabled = False
Text10.Text = ""
Text11.Enabled = True
End If
End Sub
Private Sub Option4_Click()
If Option4.Value = True Then
Text11.Enabled = False
Text11.Text = ""
Text10.Enabled = True
End If
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not
KeyAscii = 8 And KeyAscii = 32 Then
KeyAscii = 0
End If
End Sub
Private Sub Text10_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not
KeyAscii = 8 And KeyAscii = 32 Then
KeyAscii = 0
End If
End Sub
Private Sub Text11_KeyPress(KeyAscii As Integer)
If Not IsNumeric(Text11.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then
KeyAscii = 0
76 | P a g e
End If
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
If Not IsNumeric(Text4.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Timer1_Timer()
If up = 0 Then
If Frame5.Top > 5380 Then
Label28.Top = Label28.Top - 20
Frame5.Top = Frame5.Top - 20
Else
Timer1.Enabled = False : up = 1
End If
Else
If Frame5.Top < 6000 Then
Label28.Top = Label28.Top + 20
Frame5.Top = Frame5.Top + 20
Else
Timer1.Enabled = False : up = 0
End If
End If
End Sub
 Add New Publisher Page
77 | P a g e
Dim up As Integer
Dim a As Integer
Private Sub Combo1_Click()
Call connect
With publishers
Do Until .EOF
If Combo1.Text = .Fields(0) Then
Text1 = .Fields(1)
Text2 = .Fields(2)
Text4 = .Fields(3)
Image1.Picture = LoadPicture(.Fields(4))
End If
.MoveNext
Loop
End With
End Sub
Private Sub Form_Load()
publisher.Left = Screen.Width / 2 - publisher.Width / 2
publisher.Top = Screen.Height / 2 - publisher.Height / 2
78 | P a g e
Call connect
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload Me
menu.Show
End Sub
Private Sub Label12_Click()
CommonDialog1.ShowOpen
CommonDialog1.Filter = "Image|*.jpg|*.bmp|*.*"
CommonDialog1.InitDir = "d:lms project 2"
Image1.Picture = LoadPicture(CommonDialog1.FileName)
End Sub
Private Sub Label15_Click()
Call connect
If Combo1.Text = "" And publishers.RecordCount > 0 Then
Combo1.Text = publishers.Fields(0)
Text1.Text = publishers.Fields(1)
Text2.Text = publishers.Fields(2)
Text4.Text = publishers.Fields(3)
Image1.Picture = LoadPicture(publishers.Fields(4))
ElseIf Combo1.Text <> "" And publishers.RecordCount > 0 Then
Do Until publishers.EOF
If Combo1.Text = publishers.Fields(0) Then
publishers.MoveNext
Exit Do
End If
publishers.MoveNext
Loop
If publishers.EOF = False Then
79 | P a g e
Combo1.Text = publishers.Fields(0)
Text1.Text = publishers.Fields(1)
Text2.Text = publishers.Fields(2)
Text4.Text = publishers.Fields(3)
Image1.Picture = LoadPicture(publishers.Fields(4))
End If
End If
End Sub
Private Sub Label16_Click()
Call connect
If Combo1.Text = "" And publishers.RecordCount > 0 Then
publishers.MoveLast
Combo1.Text = publishers.Fields(0)
Text1.Text = publishers.Fields(1)
Text2.Text = publishers.Fields(2)
Text4.Text = publishers.Fields(3)
Image1.Picture = LoadPicture(publishers.Fields(4))
ElseIf Combo1.Text <> "" And publishers.RecordCount > 0 Then
publishers.MoveLast
Combo1.Text = publishers.Fields(0)
Text1.Text = publishers.Fields(1)
Text2.Text = publishers.Fields(2)
Text4.Text = publishers.Fields(3)
Image1.Picture = LoadPicture(publishers.Fields(4))
End If
End Sub
Private Sub Label17_Click()
Call connect
If Combo1.Text = "" And publishers.RecordCount > 0 Then
80 | P a g e
Combo1.Text = publishers.Fields(0)
Text1.Text = publishers.Fields(1)
Text2.Text = publishers.Fields(2)
Text4.Text = publishers.Fields(3)
Image1.Picture = LoadPicture(publishers.Fields(4))
ElseIf Combo1.Text <> "" And publishers.RecordCount > 0 Then
Do Until publishers.EOF
If Combo1.Text = publishers.Fields(0) Then
publishers.MovePrevious
Exit Do
End If
publishers.MoveNext
Loop
If publishers.BOF = False Then
Combo1.Text = publishers.Fields(0)
Text1.Text = publishers.Fields(1)
Text2.Text = publishers.Fields(2)
Text4.Text = publishers.Fields(3)
Image1.Picture = LoadPicture(publishers.Fields(4))
End If
End If
End Sub
Private Sub Label18_Click()
Call connect
If Combo1.Text = "" And publishers.RecordCount > 0 Then
Combo1.Text = publishers.Fields(0)
Text1.Text = publishers.Fields(1)
Text2.Text = publishers.Fields(2)
Text4.Text = publishers.Fields(3)
81 | P a g e
Image1.Picture = LoadPicture(publishers.Fields(4))
ElseIf Combo1.Text <> "" And publishers.RecordCount > 0 Then
publishers.MoveFirst
Combo1.Text = publishers.Fields(0)
Text1.Text = publishers.Fields(1)
Text2.Text = publishers.Fields(2)
Text4.Text = publishers.Fields(3)
Image1.Picture = LoadPicture(publishers.Fields(4))
End If
End Sub
Private Sub Label20_Click()
Call connect
If Option3.Value = True Then
If Len(Text11.Text) > 0 Then
Do Until publishers.EOF
If Val(Text11.Text) = publishers.Fields(0) Then
Combo1.Text = publishers.Fields(0)
Text1.Text = publishers.Fields(1)
Text2.Text = publishers.Fields(2)
Text4.Text = publishers.Fields(3)
Image1.Picture = LoadPicture(publishers.Fields(4))
Exit Do
End If
publishers.MoveNext
Loop
Else
MsgBox "Please mention ID"
End If
ElseIf Option4.Value = True Then
82 | P a g e
If Len(Text10.Text) > 0 Then
Do Until publishers.EOF
If Text10.Text = publishers.Fields(1) Then
Combo1.Text = publishers.Fields(0)
Text1.Text = publishers.Fields(1)
Text2.Text = publishers.Fields(2)
Text4.Text = publishers.Fields(3)
Image1.Picture = LoadPicture(publishers.Fields(4))
Exit Do
End If
publishers.MoveNext
Loop
Else
MsgBox "Please mention Name"
End If
End If
End Sub
Private Sub Label21_Click()
If publishers.RecordCount > 0 Then
list_publishers.Show
Else
MsgBox "There have no publishers"
End If
End Sub
Private Sub Label22_Click()
Call connect
Frame2.Enabled = False
Label22.Enabled = False
Label23.Enabled = False
83 | P a g e
Label24.Enabled = False
Label25.Enabled = False
Label26.Enabled = True
Label27.Enabled = True
Combo1.Enabled = True
Text1.Enabled = True
Text2.Enabled = True
Text4.Enabled = True
Label12.Enabled = True
Combo1.Clear
Do Until publishers.EOF
Combo1.AddItem publishers.Fields(0)
publishers.MoveNext
Loop
End Sub
Private Sub label23_Click()
ChDrive (Left(adrs, 1))
ChDir (Right(adrs, Len(adrs) - 2))
Call connect
If Len(Text1.Text) > 0 Then
If Len(Text2.Text) > 0 Then
If Len(Text4.Text) > 0 Then
If LoadPicture("") <> Image1.Picture Then
With publishers
.AddNew
.Fields(0) = Combo1.Text
.Fields(1) = Text1.Text
.Fields(2) = Text2.Text
.Fields(3) = Text4.Text
84 | P a g e
.Fields(4) = ".imagepublishers" + CommonDialog1.FileTitle
SavePicture Image1.Picture, .Fields(4)
.Update
End With
Do Until dailyrs.EOF
If dailyrs.Fields(0) = Date Then
dailyrs.Fields(4) = dailyrs.Fields(4) + 1
dailyrs.Update
End If
dailyrs.MoveNext
Loop
MsgBox "Data Saved"
Combo1.Text = ""
Text1.Text = ""
Text2.Text = ""
Text4.Text = ""
Image1.Picture = LoadPicture("")
Text1.Enabled = False
Text2.Enabled = False
Text4.Enabled = False
Label12.Enabled = False
Frame2.Enabled = True
Label23.Enabled = False
Label27.Enabled = False
Label25.Enabled = True
Label22.Enabled = True
Label24.Enabled = True
Label26.Enabled = True
Else
85 | P a g e
MsgBox "Please select author profile"
End If
Else
Text4.SetFocus
MsgBox "please insert contact no."
End If
Else
Text2.SetFocus
MsgBox "please insert addresss"
End If
Else
Text1.SetFocus
MsgBox "please insert name"
End If
End Sub
Private Sub label24_Click()
Frame2.Enabled = False
Label23.Enabled = True
Label26.Enabled = True
Label24.Enabled = False
Label25.Enabled = False
Label22.Enabled = False
Label27.Enabled = False
Call connect
Combo1.Text = ""
Combo1.Enabled = False
Text1.Text = ""
Text2.Text = ""
Text4.Text = ""
86 | P a g e
Image1.Picture = LoadPicture("")
Text1.Enabled = True
Text2.Enabled = True
Text4.Enabled = True
Label12.Enabled = True
With publishers
Do Until .EOF
a = .Fields(0)
.MoveNext
Loop
End With
a = a + 1
Combo1.Text = a
End Sub
Private Sub Label25_Click()
Call connect
If Combo1.Text <> "" Then
Do Until publishers.EOF
If Combo1.Text = publishers.Fields(0) Then
publishers.Delete
Combo1.Clear
Text1.Text = ""
Text2.Text = ""
Text4.Text = ""
Image1.Picture = LoadPicture("")
Do Until dailyrs.EOF
If dailyrs.Fields(0) = Date Then
dailyrs.Fields(5) = dailyrs.Fields(5) + 1
dailyrs.Update
87 | P a g e
End If
dailyrs.MoveNext
Loop
MsgBox "Data Deleted"
End If
publishers.MoveNext
Loop
Else
MsgBox "Please Select Record"
End If
End Sub
Private Sub Label26_Click()
Frame2.Enabled = True
Label23.Enabled = False
Label27.Enabled = False
Label25.Enabled = True
Label22.Enabled = True
Label24.Enabled = True
Label26.Enabled = True
Text1.Enabled = False
Text2.Enabled = False
Text4.Enabled = False
Label12.Enabled = False
Image1.Picture = LoadPicture("")
Text1.Text = ""
Text2.Text = ""
Text4.Text = ""
Combo1.Text = ""
End Sub
88 | P a g e
Private Sub Label27_Click()
ChDrive (Left(adrs, 1))
ChDir (Right(adrs, Len(adrs) - 2))
Call connect
With publishers
If Len(Text1.Text) > 0 Then
If Len(Text2.Text) > 0 Then
If Len(Text4.Text) > 0 Then
If LoadPicture("") <> Image1.Picture Then
Do Until .EOF
If Combo1.Text = .Fields(0) Then
.Fields(1) = Text1
.Fields(2) = Text2.Text
.Fields(3) = Text4.Text
If Len(CommonDialog1.FileTitle) > 0 Then
.Fields(4) = ".imagepublishers" + CommonDialog1.FileTitle
SavePicture Image1.Picture, .Fields(4)
Else
End If
.Update
Do Until dailyrs.EOF
If dailyrs.Fields(0) = Date Then
dailyrs.Fields(6) = dailyrs.Fields(6) + 1
dailyrs.Update
End If
dailyrs.MoveNext
Loop
MsgBox ("Data Updated")
Text1.Text = ""
89 | P a g e
Exit Do
End If
.MoveNext
Loop
Frame2.Enabled = True
Label23.Enabled = False
Label27.Enabled = False
Label25.Enabled = True
Label22.Enabled = True
Label24.Enabled = True
Label26.Enabled = True
Text1.Text = ""
Text2.Text = ""
Text4.Text = ""
Combo1.Clear
Label12.Enabled = False
Image1.Picture = LoadPicture("")
Combo1.Enabled = False
Text1.Enabled = False
Text2.Enabled = False
Text4.Enabled = False
Else
MsgBox "Please Select Image"
End If
Else
Text4.SetFocus
MsgBox "Please Enter Contact No."
End If
Else
90 | P a g e
Text2.SetFocus
MsgBox "Please Enter Address"
End If
Else
Text1.SetFocus
MsgBox "Please Enter Author Name"
End If
End With
End Sub
Private Sub Label28_Click()
Timer1.Enabled = True
End Sub
Private Sub Option3_Click()
If Option3.Value = True Then
Text10.Enabled = False
Text10.Text = ""
Text11.Enabled = True
End If
End Sub
Private Sub Option4_Click()
If Option4.Value = True Then
Text11.Enabled = False
Text11.Text = ""
Text10.Enabled = True
End If
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And
Not KeyAscii = 8 And Not KeyAscii = 32 Then
91 | P a g e
KeyAscii = 0
End If
End Sub
Private Sub Text10_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And
Not KeyAscii = 8 And KeyAscii = 32 Then
KeyAscii = 0
End If
End Sub
Private Sub Text11_KeyPress(KeyAscii As Integer)
If Not IsNumeric(Text11.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
If Not IsNumeric(Text4.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Timer1_Timer()
If up = 0 Then
If Frame5.Top > 5380 Then
Label28.Top = Label28.Top - 20
Frame5.Top = Frame5.Top - 20
Else
Timer1.Enabled = False
up = 1
End If
Else
92 | P a g e
If Frame5.Top < 6000 Then
Label28.Top = Label28.Top + 20
Frame5.Top = Frame5.Top + 20
Else
Timer1.Enabled = False
up = 0
End If
End If
End Sub
 Add New Subject Category Page
Dim up%
Private Sub Form_Load()
subject.Left = Screen.Width / 2 - subject.Width / 2
subject.Top = Screen.Height / 2 - subject.Height / 2
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload Me
menu.Show
End Sub
93 | P a g e
Private Sub Label15_Click()
Call connect
If Combo1.Text = "" And bcatrs.RecordCount > 0 Then
With bcatrs
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
End With
ElseIf Combo1.Text <> "" And bcatrs.RecordCount > 0 Then
With bcatrs
Do Until .EOF
If Val(Combo1.Text) = .Fields(0) Then
.MoveNext
Exit Do
End If
.MoveNext
Loop
If .EOF = False Then
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
End If
End With
End If
End Sub
Private Sub Label16_Click()
Call connect
If Combo1.Text = "" And bcatrs.RecordCount > 0 Then
With bcatrs
.MoveLast
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
94 | P a g e
End With
ElseIf Combo1.Text <> "" And bcatrs.RecordCount > 0 Then
With bcatrs
.MoveLast
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
End With
End If
End Sub
Private Sub Label17_Click()
Call connect
If Combo1.Text = "" And bcatrs.RecordCount > 0 Then
With bcatrs
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
End With
ElseIf Combo1.Text <> "" And bcatrs.RecordCount > 0 Then
With bcatrs
Do Until .EOF
If Val(Combo1.Text) = .Fields(0) Then
.MovePrevious
Exit Do
End If
.MoveNext
Loop
If .BOF = False Then
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
End If
End With
95 | P a g e
End If
End Sub
Private Sub Label18_Click()
Call connect
If Combo1.Text = "" And bcatrs.RecordCount > 0 Then
With bcatrs
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
End With
ElseIf Combo1.Text <> "" And bcatrs.RecordCount > 0 Then
With bcatrs
.MoveFirst
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
End With
End If
End Sub
Private Sub Label2_Click()
Timer1.Enabled = True
End Sub
Private Sub Label20_Click()
Call connect
If Option3.Value = True Then
If Len(Text11.Text) > 0 Then
With bcatrs
Do Until .EOF
If Val(Trim(Text11.Text)) = Val(Trim(.Fields(0))) Then
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
Exit Do
96 | P a g e
End If
.MoveNext
Loop
End With
Else
MsgBox "Please mention ID NO."
End If
ElseIf Option4.Value = True Then
If Len(Text10.Text) > 0 Then
With bcatrs
Do Until .EOF
If Trim(Text10.Text) = Trim(.Fields(1)) Then
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
Exit Do
End If
.MoveNext
Loop
End With
Else
MsgBox "Please mention Member Category Name"
End If
End If
End Sub
Private Sub Label21_Click()
Call connect
If bcatrs.RecordCount < 1 Then
MsgBox "Have no Category"
Else
list_categories.Show
97 | P a g e
End If
End Sub
Private Sub Label22_Click()
If Len(Combo1.Text) > 0 Then
Text1.Enabled = True
Frame2.Enabled = False
Label22.Enabled = False
Label23.Enabled = False
Label24.Enabled = False
Label25.Enabled = False
Label26.Enabled = True
Label27.Enabled = True
Else
MsgBox "Please selet a record"
End If
End Sub
Private Sub label23_Click()
Call connect
If Len(Trim(Text1.Text)) > 0 Then
With bcatrs
.AddNew
.Fields(0) = Combo1.Text
.Fields(1) = Text1.Text
.Update
Do Until dailyrs.EOF
If dailyrs.Fields(0) = Date Then
dailyrs.Fields(22) = dailyrs.Fields(22) + 1
dailyrs.Update
End If
dailyrs.MoveNext
98 | P a g e
Loop
MsgBox "Record Saved"
Combo1.Text = ""
Text1.Text = ""
Text1.Enabled = False
Frame2.Enabled = True
Label23.Enabled = False
Label27.Enabled = False
Label25.Enabled = True
Label22.Enabled = True
Label24.Enabled = True
Label26.Enabled = True
End With
Else
MsgBox "please Enter Category Name"
Text1.SetFocus
End If
End Sub
Private Sub label24_Click()
Dim a%
Frame2.Enabled = False
Label23.Enabled = True
Label26.Enabled = True
Label24.Enabled = False
Label25.Enabled = False
Label22.Enabled = False
Label27.Enabled = False
Text1.Text = ""
Combo1.Text = ""
Text1.Enabled = True
99 | P a g e
Call connect
With bcatrs
Do Until .EOF
a = .Fields(0)
.MoveNext
Loop
End With
a = a + 1
Combo1.Text = a
End Sub
Private Sub Label25_Click()
If Len(Combo1.Text) > 0 Then
With bcatrs
Do Until .EOF
If Combo1.Text = .Fields(0) Then
.Delete
Combo1.Text = ""
Text1.Text = ""
Do Until dailyrs.EOF
If dailyrs.Fields(0) = Date Then
dailyrs.Fields(23) = dailyrs.Fields(23) + 1
dailyrs.Update
End If
dailyrs.MoveNext
Loop
MsgBox "Record deleted"
End If
.MoveNext
Loop
End With
100 | P a g e
Else
MsgBox "Please select a record"
End If
End Sub
Private Sub Label26_Click()
Frame2.Enabled = True
Label23.Enabled = False
Label27.Enabled = False
Label25.Enabled = True
Label22.Enabled = True
Label24.Enabled = True
Label26.Enabled = True
Combo1.Enabled = False
Text1.Enabled = False
Combo1.Text = ""
Text1.Text = ""
End Sub
Private Sub Label27_Click()
Call connect
If Len(Trim(Text1.Text)) > 0 Then
With bcatrs
Do Until .EOF
If Val(Combo1.Text) = .Fields(0) Then
.Fields(0) = Combo1.Text
.Fields(1) = Text1.Text
.Update
End If
.MoveNext
Loop
Do Until dailyrs.EOF
101 | P a g e
If dailyrs.Fields(0) = Date Then
dailyrs.Fields(24) = dailyrs.Fields(24) + 1
dailyrs.Update
End If
dailyrs.MoveNext
Loop
MsgBox "Record Saved"
Combo1.Text = ""
Text1.Text = ""
Text1.Enabled = False
Frame2.Enabled = True
Label23.Enabled = False
Label27.Enabled = False
Label25.Enabled = True
Label22.Enabled = True
Label24.Enabled = True
Label26.Enabled = True
End With
Else
MsgBox "please Enter Category Name"
Text1.SetFocus
End If
End Sub
Private Sub Option3_Click()
If Option3.Value = True Then
Text10.Enabled = False
Text10.Text = ""
Text11.Enabled = True
End If
End Sub
102 | P a g e
Private Sub Option4_Click()
If Option4.Value = True Then
Text11.Enabled = False
Text11.Text = ""
Text10.Enabled = True
End If
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not
KeyAscii = 8 And Not KeyAscii = 32 Then
KeyAscii = 0
End If
End Sub
Private Sub Text10_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not
KeyAscii = 8 And Not KeyAscii = 32 Then
KeyAscii = 0
End If
End Sub
Private Sub Text11_KeyPress(KeyAscii As Integer)
If Not IsNumeric(Text11.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Timer1_Timer()
If up = 0 Then
If Frame5.Top > 3740 Then
Label2.Top = Label2.Top - 20
Frame5.Top = Frame5.Top - 20
Else
Timer1.Enabled = False : up = 1
103 | P a g e
End If
Else
If Frame5.Top < 4400 Then
Label2.Top = Label2.Top + 20
Frame5.Top = Frame5.Top + 20
Else
Timer1.Enabled = False : up = 0
End If
End If
End Sub
 Add New Staff Page
Dim up As Integer
Private Sub Check1_Click()
If Check1 = False Then
Text5.PasswordChar = "*"
Else
Text5.PasswordChar = ""
End If
End Sub
Private Sub Combo1_Click()
104 | P a g e
Call connect
With staffrs
Do Until .EOF
If Combo1.Text = .Fields(0) Then
Text1 = .Fields(1)
Combo2.Text = .Fields(2)
Text2 = .Fields(3)
Text3 = .Fields(4)
Text4 = .Fields(5)
Text9 = .Fields(6)
Text8 = .Fields(7)
Text5 = .Fields(8)
Combo3 = .Fields(9)
Text6 = .Fields(10)
Combo4 = .Fields(11)
Text7 = .Fields(12)
Image1.Picture = LoadPicture(.Fields(13))
End If
.MoveNext
Loop
End With
End Sub
Private Sub Combo3_Click()
If Combo3.Text <> "Select Question" And Len(Combo3.Text) > 0 Then
Text6.Enabled = True
Else
Text6.Enabled = False
End If
End Sub
Private Sub Combo3_Change()
105 | P a g e
If Combo3.Text <> "Select Question" And Len(Combo3.Text) > 0 Then
Text6.Enabled = True
Else
Text6.Enabled = False
End If
End Sub
Private Sub Combo4_Click()
If Combo4.Text <> "Select Question" And Len(Combo4.Text) > 0 Then
Text7.Enabled = True
Else
Text7.Enabled = False
End If
End Sub
Private Sub Combo4_Change()
If Combo4.Text <> "Select Question" And Len(Combo4.Text) > 0 Then
Text7.Enabled = True
Else
Text7.Enabled = False
End If
End Sub
Private Sub Command6_Click()
Command7.Enabled = False
Command1.Enabled = True
Combo1.Text = ""
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
Text6.Enabled = False
106 | P a g e
Text7.Enabled = False
Text8.Enabled = False
Text9.Enabled = False
Combo2.Enabled = False
Combo3.Enabled = False
Combo4.Enabled = False
Combo1.Enabled = False
Check1.Enabled = False
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Image1.Picture = LoadPicture("")
End Sub
Private Sub label13_Click()
CommonDialog1.ShowOpen
CommonDialog1.Filter = "Image|*.jpg|*.bmp|*.*"
CommonDialog1.InitDir = "d:lms project 2"
Image1.Picture = LoadPicture(CommonDialog1.FileName)
End Sub
Private Sub Form_Load()
staff.Left = Screen.Width / 2 - staff.Width / 2
staff.Top = Screen.Height / 2 - staff.Height / 2
End Sub
Private Sub Form_Unload(Cancel As Integer)
107 | P a g e
Unload Me
menu.Show
End Sub
Private Sub Label16_Click()
Call connect
If Combo1.Text = "" And staffrs.RecordCount > 0 Then
With staffrs
.MoveLast
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
Combo2.Text = .Fields(2)
Text2.Text = .Fields(3)
Text3.Text = .Fields(4)
Text4.Text = .Fields(5)
Text9.Text = .Fields(6)
Text8.Text = .Fields(7)
Text5.Text = .Fields(8)
Combo3.Text = .Fields(9)
Text6.Text = .Fields(10)
Combo4.Text = .Fields(11)
Text7.Text = .Fields(12)
Image1.Picture = LoadPicture(.Fields(13))
Text13.Text = .Fields(14)
DTPicker1.Value = .Fields(15)
End With
ElseIf Combo1.Text <> "" And staffrs.RecordCount > 0 Then
With staffrs
.MoveLast
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
108 | P a g e
Combo2.Text = .Fields(2)
Text2.Text = .Fields(3)
Text3.Text = .Fields(4)
Text4.Text = .Fields(5)
Text9.Text = .Fields(6)
Text8.Text = .Fields(7)
Text5.Text = .Fields(8)
Combo3.Text = .Fields(9)
Text6.Text = .Fields(10)
Combo4.Text = .Fields(11)
Text7.Text = .Fields(12)
Image1.Picture = LoadPicture(.Fields(13))
Text13.Text = .Fields(14)
DTPicker1.Value = .Fields(15)
End With
End If
End Sub
Private Sub Label17_Click()
Call connect
If Combo1.Text = "" And staffrs.RecordCount > 0 Then
With staffrs
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
Combo2.Text = .Fields(2)
Text2.Text = .Fields(3)
Text3.Text = .Fields(4)
Text4.Text = .Fields(5)
Text9.Text = .Fields(6)
Text8.Text = .Fields(7)
Text5.Text = .Fields(8)
109 | P a g e
Combo3.Text = .Fields(9)
Text6.Text = .Fields(10)
Combo4.Text = .Fields(11)
Text7.Text = .Fields(12)
Image1.Picture = LoadPicture(.Fields(13))
Text13.Text = .Fields(14)
DTPicker1.Value = .Fields(15)
End With
ElseIf Combo1.Text <> "" And staffrs.RecordCount > 0 Then
With staffrs
Do Until .EOF
If Val(Combo1.Text) = .Fields(0) Then
.MovePrevious
Exit Do
End If
.MoveNext
Loop
If .BOF = False Then
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
Combo2.Text = .Fields(2)
Text2.Text = .Fields(3)
Text3.Text = .Fields(4)
Text4.Text = .Fields(5)
Text9.Text = .Fields(6)
Text8.Text = .Fields(7)
Text5.Text = .Fields(8)
Combo3.Text = .Fields(9)
Text6.Text = .Fields(10)
Combo4.Text = .Fields(11)
110 | P a g e
Text7.Text = .Fields(12)
Image1.Picture = LoadPicture(.Fields(13))
Text13.Text = .Fields(14)
DTPicker1.Value = .Fields(15)
End If
End With
End If
End Sub
Private Sub Label18_Click()
Call connect
If Combo1.Text = "" And staffrs.RecordCount > 0 Then
With staffrs
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
Combo2.Text = .Fields(2)
Text2.Text = .Fields(3)
Text3.Text = .Fields(4)
Text4.Text = .Fields(5)
Text9.Text = .Fields(6)
Text8.Text = .Fields(7)
Text5.Text = .Fields(8)
Combo3.Text = .Fields(9)
Text6.Text = .Fields(10)
Combo4.Text = .Fields(11)
Text7.Text = .Fields(12)
Image1.Picture = LoadPicture(.Fields(13))
Text13.Text = .Fields(14)
DTPicker1.Value = .Fields(15)
End With
ElseIf Combo1.Text <> "" And staffrs.RecordCount > 0 Then
111 | P a g e
With staffrs
.MoveFirst
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
Combo2.Text = .Fields(2)
Text2.Text = .Fields(3)
Text3.Text = .Fields(4)
Text4.Text = .Fields(5)
Text9.Text = .Fields(6)
Text8.Text = .Fields(7)
Text5.Text = .Fields(8)
Combo3.Text = .Fields(9)
Text6.Text = .Fields(10)
Combo4.Text = .Fields(11)
Text7.Text = .Fields(12)
Image1.Picture = LoadPicture(.Fields(13))
Text13.Text = .Fields(14)
DTPicker1.Value = .Fields(15)
End With
End If
End Sub
Private Sub Label19_Click()
Call connect
If Combo1.Text = "" And staffrs.RecordCount > 0 Then
With staffrs
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
Combo2.Text = .Fields(2)
Text2.Text = .Fields(3)
Text3.Text = .Fields(4)
112 | P a g e
Text4.Text = .Fields(5)
Text9.Text = .Fields(6)
Text8.Text = .Fields(7)
Text5.Text = .Fields(8)
Combo3.Text = .Fields(9)
Text6.Text = .Fields(10)
Combo4.Text = .Fields(11)
Text7.Text = .Fields(12)
Image1.Picture = LoadPicture(.Fields(13))
Text13.Text = .Fields(14)
DTPicker1.Value = .Fields(15)
End With
ElseIf Combo1.Text <> "" And staffrs.RecordCount > 0 Then
With staffrs
Do Until .EOF
If Val(Combo1.Text) = .Fields(0) Then
.MoveNext
Exit Do
End If
.MoveNext
Loop
If .EOF = False Then
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
Combo2.Text = .Fields(2)
Text2.Text = .Fields(3)
Text3.Text = .Fields(4)
Text4.Text = .Fields(5)
Text9.Text = .Fields(6)
Text8.Text = .Fields(7)
113 | P a g e
Text5.Text = .Fields(8)
Combo3.Text = .Fields(9)
Text6.Text = .Fields(10)
Combo4.Text = .Fields(11)
Text7.Text = .Fields(12)
Image1.Picture = LoadPicture(.Fields(13))
Text13.Text = .Fields(14)
DTPicker1.Value = .Fields(15)
End If
End With
End If
End Sub
Private Sub Label20_Click()
Call connect
If Option3.Value = True Then
If Len(Text11.Text) > 0 Then
With staffrs
Do Until .EOF
If Val(Trim(Text11.Text)) = Val(.Fields(0)) Then
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
Combo2.Text = .Fields(2)
Text2.Text = .Fields(3)
Text3.Text = .Fields(4)
Text4.Text = .Fields(5)
Text9.Text = .Fields(6)
Text8.Text = .Fields(7)
Text5.Text = .Fields(8)
Combo3.Text = .Fields(9)
Text6.Text = .Fields(10)
114 | P a g e
Combo4.Text = .Fields(11)
Text7.Text = .Fields(12)
Image1.Picture = LoadPicture(.Fields(13))
Text13.Text = .Fields(14)
DTPicker1.Value = .Fields(15)
Exit Do
End If
.MoveNext
Loop
End With
Else
MsgBox "Please mention ID NO."
End If
ElseIf Option4.Value = True Then
If Len(Text10.Text) > 0 Then
With staffrs
Do Until .EOF
If Trim(Text10.Text) = Trim(.Fields(7)) Then
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
Combo2.Text = .Fields(2)
Text2.Text = .Fields(3)
Text3.Text = .Fields(4)
Text4.Text = .Fields(5)
Text9.Text = .Fields(6)
Text8.Text = .Fields(7)
Text5.Text = .Fields(8)
Combo3.Text = .Fields(9)
Text6.Text = .Fields(10)
Combo4.Text = .Fields(11)
115 | P a g e
Text7.Text = .Fields(12)
Image1.Picture = LoadPicture(.Fields(13))
Text13.Text = .Fields(14)
DTPicker1.Value = .Fields(15)
Exit Do
End If
.MoveNext
Loop
End With
Else
MsgBox "Please mention Adhaar No."
End If
ElseIf Option1.Value = True Then
If Len(Text12.Text) > 0 Then
With staffrs
Do Until .EOF
If Trim(Text12.Text) = Trim(.Fields(3)) Then
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
Combo2.Text = .Fields(2)
Text2.Text = .Fields(3)
Text3.Text = .Fields(4)
Text4.Text = .Fields(5)
Text9.Text = .Fields(6)
Text8.Text = .Fields(7)
Text5.Text = .Fields(8)
Combo3.Text = .Fields(9)
Text6.Text = .Fields(10)
Combo4.Text = .Fields(11)
Text7.Text = .Fields(12)
116 | P a g e
Image1.Picture = LoadPicture(.Fields(13))
Text13.Text = .Fields(14)
DTPicker1.Value = .Fields(15)
Exit Do
End If
.MoveNext
Loop
End With
Else
MsgBox "Please mention First Name"
End If
End If
End Sub
Private Sub Label21_Click()
Call connect
If staffrs.RecordCount < 1 Then
MsgBox "Have no Staff Member"
Else
list_staff.Show
End If
End Sub
Private Sub Label22_Click()
If Len(Combo1.Text) > 0 Then
Frame2.Enabled = False
Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text5.Enabled = True
Text6.Enabled = True
117 | P a g e
Text7.Enabled = True
Text8.Enabled = True
Text9.Enabled = True
Text13.Enabled = True
Combo2.Enabled = True
Combo3.Enabled = True
Combo4.Enabled = True
Check1.Enabled = True
Label13.Enabled = True
Label23.Enabled = False
Label26.Enabled = True
Label22.Enabled = False
Label24.Enabled = False
Label25.Enabled = False
Label27.Enabled = True
Else
MsgBox "Please select record"
End If
End Sub
Private Sub label23_Click()
ChDrive (Left(adrs, 1))
ChDir (Right(adrs, Len(adrs) - 2))
Call connect
If Len(Text1.Text) > 0 Then
If Len(Text2.Text) > 0 Then
If Len(Text3.Text) > 0 Then
If Len(Text4.Text) > 0 Then
If Len(Text9.Text) > 0 Then
If Len(Text8.Text) > 0 Then
If Len(Text5.Text) > 0 Then
118 | P a g e
If Len(Text6.Text) > 0 Then
If Len(Text7.Text) > 0 Then
If Len(Text13.Text) > 0 Then
If Combo2.Text <> "Select Type" Then
If LoadPicture("") <> Image1.Picture Then
With staffrs
.AddNew
.Fields(0) = Combo1.Text
.Fields(1) = Text1.Text
.Fields(2) = Combo2.Text
.Fields(3) = Text2.Text
.Fields(4) = Text3.Text
.Fields(5) = Text4.Text
.Fields(6) = Text9.Text
.Fields(7) = Text8.Text
.Fields(8) = Text5.Text
.Fields(9) = Combo3.Text
.Fields(10) = Text6.Text
.Fields(11) = Combo4.Text
.Fields(12) = Text7.Text
.Fields(13) = ".imagestaff_admin" + CommonDialog1.FileTitle
SavePicture Image1.Picture, .Fields(13)
.Fields(14) = Text13.Text
.Fields(15) = DTPicker1.Value
.Update
End With
With rs
.AddNew
.Fields(0) = Combo2.Text
.Fields(1) = Text1.Text
119 | P a g e
.Fields(2) = Text5.Text
.Fields(3) = Text2.Text
.Fields(4) = Text3.Text
.Update
End With
Do Until dailyrs.EOF
If dailyrs.Fields(0) = Date Then
dailyrs.Fields(7) = dailyrs.Fields(7) + 1
dailyrs.Update
End If
dailyrs.MoveNext
Loop
MsgBox "Data Saved"
Combo1.Text = ""
Combo2.Text = "Select Type"
Combo3.Text = ""
Combo4.Text = ""
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text13.Text = ""
Image1.Picture = LoadPicture("")
DTPicker1.Value = Date
Frame2.Enabled = True
120 | P a g e
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
Text6.Enabled = False
Text7.Enabled = False
Text8.Enabled = False
Text9.Enabled = False
Text13.Enabled = False
Combo2.Enabled = False
Combo3.Enabled = False
Combo4.Enabled = False
DTPicker1.Enabled = False
Label13.Enabled = False
Label23.Enabled = False
Label27.Enabled = False
Label25.Enabled = True
Label22.Enabled = True
Label24.Enabled = True
Label26.Enabled = True
Else
MsgBox "Please select Staff member photo"
End If
Else
MsgBox "Please select Staff member Type"
Combo2.SetFocus
End If
Else
MsgBox "Please Enter Education"
121 | P a g e
Text13.SetFocus
End If
Else
MsgBox "Please Enter answer of" + Chr(32) + " second security question"
Text7.SetFocus
End If
Else
MsgBox "Please Enter answer of" + Chr(32) + " first security question"
Text6.SetFocus
End If
Else
MsgBox "Please put your password"
Text5.SetFocus
End If
Else
MsgBox "Please Enter aadhar no. for your security"
Text8.SetFocus
End If
Else
MsgBox "Please Enter contact no."
Text9.SetFocus
End If
Else
MsgBox "Please enter address of person"
Text4.SetFocus
End If
Else
MsgBox "Please enter last name of person"
Text3.SetFocus
End If
122 | P a g e
Else
MsgBox "Please enter first name of person"
Text2.SetFocus
End If
Else
MsgBox "Please enter username of person"
Text1.SetFocus
End If
End Sub
Private Sub label24_Click()
Frame2.Enabled = False
Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text5.Enabled = True
Text8.Enabled = True
Text9.Enabled = True
Text13.Enabled = True
Combo2.Enabled = True: Combo2.Text = "Staff Type"
Combo3.Enabled = True: Combo3.Text = "Select Question"
Combo4.Enabled = True: Combo4.Text = "Select Question"
Check1.Enabled = True
DTPicker1.Enabled = True
Label13.Enabled = True
Combo1.Text = ""
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
123 | P a g e
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text13.Text = ""
Image1.Picture = LoadPicture("")
DTPicker1.Value = Date
Call connect
With staffrs
Do Until .EOF
a = .Fields(0)
.MoveNext
Loop
End With
a = a + 1
Combo1.Text = a
Label23.Enabled = True
Label26.Enabled = True
Label22.Enabled = False
Label24.Enabled = False
Label25.Enabled = False
Label27.Enabled = False
End Sub
Private Sub Label25_Click()
Call connect
If Len(Text2.Text) > 0 Then
Do Until staffrs.EOF
If Val(Combo1.Text) = staffrs.Fields(0) Then
Do Until rs.EOF
124 | P a g e
If rs.Fields(1) = staffrs.Fields(1) And rs.Fields(2) = staffrs.Fields(8) Then
rs.Delete
rs.Update
Exit Do
End If
rs.MoveNext
Loop
staffrs.Delete
Combo1.Text = ""
Combo2.Text = "Select Type"
Combo3.Text = ""
Combo4.Text = ""
Text1.Text = ""
Text2.Text = ""
Text4.Text = ""
Text3.Text = ""
Text5.Text = ""
Text7.Text = ""
Text6.Text = ""
Text8.Text = ""
Text9.Text = ""
Text13.Text = ""
DTPicker1.Value = Date
Image1.Picture = LoadPicture("")
Do Until dailyrs.EOF
If dailyrs.Fields(0) = Date Then
dailyrs.Fields(8) = dailyrs.Fields(8) + 1
dailyrs.Update
End If
dailyrs.MoveNext
125 | P a g e
Loop
MsgBox "Data Deleted"
End If
staffrs.MoveNext
Loop
Else
MsgBox "Please Select Record"
End If
End Sub
Private Sub Label26_Click()
Combo1.Text = ""
Combo2.Text = "Select Type"
Combo3.Text = ""
Combo4.Text = ""
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text13.Text = ""
Image1.Picture = LoadPicture("")
DTPicker1.Value = Date
Frame2.Enabled = True
Combo1.Enabled = False
Combo2.Enabled = False
Combo3.Enabled = False
126 | P a g e
Combo4.Enabled = False
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
Text6.Enabled = False
Text7.Enabled = False
Text8.Enabled = False
Text9.Enabled = False
Text13.Enabled = False
DTPicker1.Enabled = False
Label13.Enabled = False
Check1.Enabled = False
Label23.Enabled = False
Label24.Enabled = True
Label25.Enabled = True
Label26.Enabled = True
Label27.Enabled = False
Label22.Enabled = True
End Sub
Private Sub Label27_Click()
ChDrive (Left(adrs, 1))
ChDir (Right(adrs, Len(adrs) - 2))
Call connect
If Len(Text1.Text) > 0 Then
If Len(Text2.Text) > 0 Then
If Len(Text3.Text) > 0 Then
If Len(Text4.Text) > 0 Then
If Len(Text9.Text) > 0 Then
127 | P a g e
If Len(Text8.Text) > 0 Then
If Len(Text5.Text) > 0 Then
If Len(Text6.Text) > 0 Then
If Len(Text7.Text) > 0 Then
If Len(Text13.Text) > 0 Then
If Combo2.Text <> "Select Type" Then
If LoadPicture("") <> Image1.Picture Then
With staffrs
Do Until .EOF
If Combo1.Text = .Fields(0) Then
.Fields(1) = Text1.Text
.Fields(2) = Combo2.Text
.Fields(3) = Text2.Text
.Fields(4) = Text3.Text
.Fields(5) = Text4.Text
.Fields(6) = Text9.Text
.Fields(7) = Text8.Text
.Fields(8) = Text5.Text
.Fields(9) = Combo3.Text
.Fields(10) = Text6.Text
.Fields(11) = Combo4.Text
.Fields(12) = Text7.Text
If Len(CommonDialog1.FileTitle) > 0 Then
.Fields(12) = ".imagestaff_admin" + CommonDialog1.FileTitle
SavePicture Image1.Picture, .Fields(12)
End If
.Fields(14) = Text13.Text
.Fields(15) = DTPicker1.Value
.Update
End If
128 | P a g e
.MoveNext
Loop
End With
With rs
Do Until .EOF
If .Fields(1) = Text1.Text Then
.Fields(0) = Combo2.Text
.Fields(1) = Text1.Text
.Fields(2) = Text5.Text
.Fields(3) = Text2.Text
.Fields(4) = Text3.Text
.Update
End If
.MoveNext
Loop
End With
Do Until dailyrs.EOF
If dailyrs.Fields(0) = Date Then
dailyrs.Fields(9) = dailyrs.Fields(9) + 1
dailyrs.Update
End If
dailyrs.MoveNext
Loop
MsgBox "Data update"
Combo1.Text = ""
Combo2.Text = "Select Type"
Combo3.Text = ""
Combo4.Text = ""
Text1.Text = ""
Text2.Text = ""
129 | P a g e
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text13.Text = ""
Image1.Picture = LoadPicture("")
DTPicker1.Value = Date
Frame2.Enabled = True
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
Text6.Enabled = False
Text7.Enabled = False
Text8.Enabled = False
Text9.Enabled = False
Text13.Enabled = False
Combo2.Enabled = False
Combo3.Enabled = False
Combo4.Enabled = False
DTPicker1.Enabled = False
Label13.Enabled = False
Label23.Enabled = False
Label27.Enabled = False
Label25.Enabled = True
Label22.Enabled = True
130 | P a g e
Label24.Enabled = True
Label26.Enabled = True
Else
MsgBox "Please select Staff member photo"
End If
Else
MsgBox "Please select Staff member Type"
Combo2.SetFocus
End If
Else
MsgBox "Please Enter Education"
Text13.SetFocus
End If
Else
MsgBox "Please Enter answer of" + Chr(32) + " second security question"
Text7.SetFocus
End If
Else
MsgBox "Please Enter answer of" + Chr(32) + " first security question"
Text6.SetFocus
End If
Else
MsgBox "Please put your password"
Text5.SetFocus
End If
Else
MsgBox "Please Enter aadhar no. for your security"
Text8.SetFocus
End If
Else
131 | P a g e
MsgBox "Please Enter contact no."
Text9.SetFocus
End If
Else
MsgBox "Please enter address of person"
Text4.SetFocus
End If
Else
MsgBox "Please enter last name of person"
Text3.SetFocus
End If
Else
MsgBox "Please enter first name of person"
Text2.SetFocus
End If
Else
MsgBox "Please enter username of person"
Text1.SetFocus
End If
End Sub
Private Sub Label28_Click()
Timer1.Enabled = True
End Sub
Private Sub Option1_Click()
If Option1.Value = True Then
Text10.Enabled = False: Text10.Text = ""
Text11.Enabled = False: Text11.Text = ""
Text12.Enabled = True
End If
End Sub
132 | P a g e
Private Sub Option3_Click()
If Option3.Value = True Then
Text10.Enabled = False: Text10.Text = ""
Text12.Enabled = False: Text12.Text = ""
Text11.Enabled = True
End If
End Sub
Private Sub Option4_Click()
If Option4.Value = True Then
Text11.Enabled = False: Text11.Text = ""
Text12.Enabled = False: Text12.Text = ""
Text10.Enabled = True
End If
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 32 Then
KeyAscii = 0
End If
End Sub
Private Sub Text10_KeyPress(KeyAscii As Integer)
If Not IsNumeric(Text10.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Text11_KeyPress(KeyAscii As Integer)
If Not IsNumeric(Text11.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Text12_KeyPress(KeyAscii As Integer)
133 | P a g e
If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not
KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not
KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not
KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Text6_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not
KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Text7_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not
KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Text8_KeyPress(KeyAscii As Integer)
If Not IsNumeric(Text8.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then
KeyAscii = 0
134 | P a g e
End If
End Sub
Private Sub Text9_KeyPress(KeyAscii As Integer)
If Not IsNumeric(Text9.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Timer1_Timer()
If up = 0 Then
If Frame5.Top > 5380 Then
Label28.Top = Label28.Top - 20
Frame5.Top = Frame5.Top - 20
Else
Timer1.Enabled = False
up = 1
End If
Else
If Frame5.Top < 6000 Then
Label28.Top = Label28.Top + 20
Frame5.Top = Frame5.Top + 20
Else
Timer1.Enabled = False
up = 0
End If
End If
End Sub
 Add New Member Page
135 | P a g e
Dim up%, a%
Dim imag1, imag2 As String
Private Sub Form_Unload(Cancel As Integer)
Unload Me
menu.Show
End Sub
Private Sub Label15_Click()
Call connect
If Combo1.Text = "" And members.RecordCount > 0 Then
With members
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
Text2.Text = .Fields(2)
Combo2.Text = .Fields(3)
Text4.Text = .Fields(4)
Text5.Text = .Fields(5)
Text6.Text = .Fields(6)
136 | P a g e
Text3.Text = .Fields(7)
Text10.Text = .Fields(8)
Text8.Text = .Fields(9)
Text9.Text = .Fields(10)
Text7.Text = .Fields(11)
DTPicker1.Value = .Fields(12)
Image1.Picture = LoadPicture(.Fields(13))
Image2.Picture = LoadPicture(.Fields(14))
End With
ElseIf Combo1.Text <> "" And members.RecordCount > 0 Then
With members
Do Until .EOF
If Val(Combo1.Text) = .Fields(0) Then
.MoveNext
Exit Do
End If
.MoveNext
Loop
If .EOF = False Then
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
Text2.Text = .Fields(2)
Combo2.Text = .Fields(3)
Text4.Text = .Fields(4)
Text5.Text = .Fields(5)
Text6.Text = .Fields(6)
Text3.Text = .Fields(7)
Text10.Text = .Fields(8)
Text8.Text = .Fields(9)
137 | P a g e
Text9.Text = .Fields(10)
Text7.Text = .Fields(11)
DTPicker1.Value = .Fields(12)
Image1.Picture = LoadPicture(.Fields(13))
Image2.Picture = LoadPicture(.Fields(14))
End If
End With
End If
End Sub
Private Sub Label16_Click()
Call connect
If Combo1.Text = "" And members.RecordCount > 0 Then
With members
.MoveLast
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
Text2.Text = .Fields(2)
Combo2.Text = .Fields(3)
Text4.Text = .Fields(4)
Text5.Text = .Fields(5)
Text6.Text = .Fields(6)
Text3.Text = .Fields(7)
Text10.Text = .Fields(8)
Text8.Text = .Fields(9)
Text9.Text = .Fields(10)
Text7.Text = .Fields(11)
DTPicker1.Value = .Fields(12)
Image1.Picture = LoadPicture(.Fields(13))
Image2.Picture = LoadPicture(.Fields(14))
138 | P a g e
End With
ElseIf Combo1.Text <> "" And members.RecordCount > 0 Then
With members
.MoveLast
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
Text2.Text = .Fields(2)
Combo2.Text = .Fields(3)
Text4.Text = .Fields(4)
Text5.Text = .Fields(5)
Text6.Text = .Fields(6)
Text3.Text = .Fields(7)
Text10.Text = .Fields(8)
Text8.Text = .Fields(9)
Text9.Text = .Fields(10)
Text7.Text = .Fields(11)
DTPicker1.Value = .Fields(12)
Image1.Picture = LoadPicture(.Fields(13))
Image2.Picture = LoadPicture(.Fields(14))
End With
End If
End Sub
Private Sub Label17_Click()
Call connect
If Combo1.Text = "" And members.RecordCount > 0 Then
With members
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
Text2.Text = .Fields(2)
139 | P a g e
Combo2.Text = .Fields(3)
Text4.Text = .Fields(4)
Text5.Text = .Fields(5)
Text6.Text = .Fields(6)
Text3.Text = .Fields(7)
Text10.Text = .Fields(8)
Text8.Text = .Fields(9)
Text9.Text = .Fields(10)
Text7.Text = .Fields(11)
DTPicker1.Value = .Fields(12)
Image1.Picture = LoadPicture(.Fields(13))
Image2.Picture = LoadPicture(.Fields(14))
End With
ElseIf Combo1.Text <> "" And members.RecordCount > 0 Then
With members
Do Until .EOF
If Val(Combo1.Text) = .Fields(0) Then
.MovePrevious
Exit Do
End If
.MoveNext
Loop
If .BOF = False Then
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
Text2.Text = .Fields(2)
Combo2.Text = .Fields(3)
Text4.Text = .Fields(4)
Text5.Text = .Fields(5)
140 | P a g e
Text6.Text = .Fields(6)
Text3.Text = .Fields(7)
Text10.Text = .Fields(8)
Text8.Text = .Fields(9)
Text9.Text = .Fields(10)
Text7.Text = .Fields(11)
DTPicker1.Value = .Fields(12)
Image1.Picture = LoadPicture(.Fields(13))
Image2.Picture = LoadPicture(.Fields(14))
End If
End With
End If
End Sub
Private Sub Label18_Click()
Call connect
If Combo1.Text = "" And members.RecordCount > 0 Then
With members
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
Text2.Text = .Fields(2)
Combo2.Text = .Fields(3)
Text4.Text = .Fields(4)
Text5.Text = .Fields(5)
Text6.Text = .Fields(6)
Text3.Text = .Fields(7)
Text10.Text = .Fields(8)
Text8.Text = .Fields(9)
Text9.Text = .Fields(10)
Text7.Text = .Fields(11)
141 | P a g e
DTPicker1.Value = .Fields(12)
Image1.Picture = LoadPicture(.Fields(13))
Image2.Picture = LoadPicture(.Fields(14))
End With
ElseIf Combo1.Text <> "" And members.RecordCount > 0 Then
With members
.MoveFirst
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
Text2.Text = .Fields(2)
Combo2.Text = .Fields(3)
Text4.Text = .Fields(4)
Text5.Text = .Fields(5)
Text6.Text = .Fields(6)
Text3.Text = .Fields(7)
Text10.Text = .Fields(8)
Text8.Text = .Fields(9)
Text9.Text = .Fields(10)
Text7.Text = .Fields(11)
DTPicker1.Value = .Fields(12)
Image1.Picture = LoadPicture(.Fields(13))
Image2.Picture = LoadPicture(.Fields(14))
End With
End If
End Sub
Private Sub Label19_Click()
Call connect
If Option3.Value = True Then
If Len(Text11.Text) > 0 Then
142 | P a g e
With members
Do Until .EOF
If Val(Trim(Text11.Text)) = Val(Trim(.Fields(0))) Then
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
Text2.Text = .Fields(2)
Combo2.Text = .Fields(3)
Text4.Text = .Fields(4)
Text5.Text = .Fields(5)
Text6.Text = .Fields(6)
Text3.Text = .Fields(7)
Text10.Text = .Fields(8)
Text8.Text = .Fields(9)
Text9.Text = .Fields(10)
Text7.Text = .Fields(11)
DTPicker1.Value = .Fields(12)
Image1.Picture = LoadPicture(.Fields(13))
Image2.Picture = LoadPicture(.Fields(14))
Exit Do
End If
.MoveNext
Loop
End With
Else
MsgBox "Please mention ID NO. of Member"
End If
ElseIf Option4.Value = True Then
If Len(Text12.Text) > 0 Then
With members
143 | P a g e
Do Until .EOF
If Trim(Text12.Text) = Trim(.Fields(1)) Then
Combo1.Text = .Fields(0)
Text1.Text = .Fields(1)
Text2.Text = .Fields(2)
Combo2.Text = .Fields(3)
Text4.Text = .Fields(4)
Text5.Text = .Fields(5)
Text6.Text = .Fields(6)
Text3.Text = .Fields(7)
Text10.Text = .Fields(8)
Text8.Text = .Fields(9)
Text9.Text = .Fields(10)
Text7.Text = .Fields(11)
DTPicker1.Value = .Fields(12)
Image1.Picture = LoadPicture(.Fields(13))
Image2.Picture = LoadPicture(.Fields(14))
Exit Do
End If
.MoveNext
Loop
End With
Else
MsgBox "Please mention Member First Name"
End If
End If
End Sub
Private Sub Label21_Click()
ChDrive (Left(adrs, 1))
144 | P a g e
ChDir (Right(adrs, Len(adrs) - 2))
Call connect
If Len(Text1.Text) > 0 Then
If Len(Text2.Text) > 0 Then
If Len(Text4.Text) > 0 Then
If Len(Text3.Text) > 0 Then
If Len(Text5.Text) > 0 Then
If Len(Text6.Text) > 0 Then
If Len(Text7.Text) > 0 Then
If Len(Text8.Text) > 0 Then
If Len(Text9.Text) > 0 Then
If Len(Text10.Text) > 0 Then
If Image1.Picture <> LoadPicture("") Then
If Image2.Picture <> LoadPicture("") Then
With members
Do Until .EOF
If Val(Combo1.Text) = .Fields(0) Then
.Fields(0) = Combo1.Text
.Fields(1) = Text1.Text
.Fields(2) = Text2.Text
.Fields(3) = Combo2.Text
.Fields(4) = Text4.Text
.Fields(5) = Text5.Text
.Fields(6) = Text6.Text
.Fields(7) = Text3.Text
.Fields(8) = Text10.Text
.Fields(9) = Text8.Text
.Fields(10) = Text9.Text
.Fields(11) = Text7.Text
145 | P a g e
.Fields(12) = DTPicker1.Value
If Len(imag1) > 0 Then
.Fields(13) = imag1
SavePicture Image1.Picture, imag1
End If
If Len(imag2) > 0 Then
.Fields(14) = imag2
SavePicture Image2.Picture, imag2
End If
.Update
End If
.MoveNext
Loop
End With
Do Until dailyrs.EOF
If dailyrs.Fields(0) = Date Then
dailyrs.Fields(12) = dailyrs.Fields(12) + 1
dailyrs.Update
End If
dailyrs.MoveNext
Loop
MsgBox "Data Updated"
Combo1.Text = ""
Combo2.Text = "Select Type"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
146 | P a g e
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Image1.Picture = LoadPicture("")
Image2.Picture = LoadPicture("")
DTPicker1.Value = Date
Frame3.Enabled = True
Combo1.Enabled = False
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
Text6.Enabled = False
Text7.Enabled = False
Text8.Enabled = False
Text9.Enabled = False
Text10.Enabled = False
DTPicker1.Enabled = False
Label27.Enabled = False
Label28.Enabled = False
Label25.Enabled = False
Label22.Enabled = True
Label21.Enabled = False
Label23.Enabled = True
Label24.Enabled = True
Label26.Enabled = True
147 | P a g e
Else
MsgBox "please select reference person photo"
End If
Else
MsgBox "please select member photo"
End If
Else
Text10.SetFocus
MsgBox "please enter Father's name"
End If
Else
Text9.SetFocus
MsgBox "please enter your education"
End If
Else
Text8.SetFocus
MsgBox "please enter your email"
End If
Else
Text7.SetFocus
MsgBox "please enter contact number"
End If
Else
Text6.SetFocus
MsgBox "please insert reference department"
End If
Else
Text5.SetFocus
MsgBox "please insert reference name"
148 | P a g e
End If
Else
Text3.SetFocus
MsgBox "please insert reference contact no."
End If
Else
Text4.SetFocus
MsgBox "please insert contact no."
End If
Else
Text2.SetFocus
MsgBox "please insert addresss"
End If
Else
Text1.SetFocus
MsgBox "please insert name"
End If
End Sub
Private Sub label24_Click()
If Len(Text4.Text) > 0 Then
imag1 = ""
imag2 = ""
Combo1.Enabled = False
Frame3.Enabled = False
Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text5.Enabled = True
149 | P a g e
Text6.Enabled = True
Text7.Enabled = True
Text8.Enabled = True
Text9.Enabled = True
Text10.Enabled = True
DTPicker1.Enabled = True
Label27.Enabled = True
Label28.Enabled = True
Label25.Enabled = False
Label22.Enabled = True
Label21.Enabled = True
Label23.Enabled = False
Label24.Enabled = False
Label26.Enabled = False
Else
MsgBox "please select a record"
End If
End Sub
Private Sub Label25_Click()
ChDrive (Left(adrs, 1))
ChDir (Right(adrs, Len(adrs) - 2))
Call connect
If Len(Text1.Text) > 0 Then
If Len(Text2.Text) > 0 Then
If Len(Text4.Text) > 0 Then
If Len(Text3.Text) > 0 Then
If Len(Text5.Text) > 0 Then
If Len(Text6.Text) > 0 Then
If Len(Text7.Text) > 0 Then
150 | P a g e
If Len(Text8.Text) > 0 Then
If Len(Text9.Text) > 0 Then
If Len(Text10.Text) > 0 Then
If Image1.Picture <> LoadPicture("") Then
If Image2.Picture <> LoadPicture("") Then
With members
.AddNew
.Fields(0) = Combo1.Text
.Fields(1) = Text1.Text
.Fields(2) = Text2.Text
.Fields(3) = Combo2.Text
.Fields(4) = Text4.Text
.Fields(5) = Text5.Text
.Fields(6) = Text6.Text
.Fields(7) = Text3.Text
.Fields(8) = Text10.Text
.Fields(9) = Text8.Text
.Fields(10) = Text9.Text
.Fields(11) = Text7.Text
.Fields(12) = DTPicker1.Value
.Fields(13) = imag1
.Fields(14) = imag2
SavePicture Image1.Picture, imag1
SavePicture Image2.Picture, imag2
.Update
End With
Do Until dailyrs.EOF
If dailyrs.Fields(0) = Date Then
dailyrs.Fields(10) = dailyrs.Fields(10) + 1
151 | P a g e
dailyrs.Update
End If
dailyrs.MoveNext
Loop
MsgBox "Data Saved"
Combo1.Text = ""
Combo2.Text = "Select Type"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Image1.Picture = LoadPicture("")
Image2.Picture = LoadPicture("")
DTPicker1.Value = Date
Frame3.Enabled = True
Combo1.Enabled = False
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
Text6.Enabled = False
Text7.Enabled = False
152 | P a g e
Text8.Enabled = False
Text9.Enabled = False
Text10.Enabled = False
DTPicker1.Enabled = False
Label27.Enabled = False
Label28.Enabled = False
Label25.Enabled = False
Label22.Enabled = True
Label21.Enabled = False
Label23.Enabled = True
Label24.Enabled = True
Label26.Enabled = True
Else
MsgBox "please select reference person photo"
End If
Else
MsgBox "please select member photo"
End If
Else
Text10.SetFocus
MsgBox "please enter Father's name"
End If
Else
Text9.SetFocus
MsgBox "please enter your education"
End If
Else
Text8.SetFocus
MsgBox "please enter your email"
153 | P a g e
End If
Else
Text7.SetFocus
MsgBox "please enter contact number"
End If
Else
Text6.SetFocus
MsgBox "please insert reference department"
End If
Else
Text5.SetFocus
MsgBox "please insert reference name"
End If
Else
Text3.SetFocus
MsgBox "please insert reference contact no."
End If
Else
Text4.SetFocus
MsgBox "please insert contact no."
End If
Else
Text2.SetFocus
MsgBox "please insert addresss"
End If
Else
Text1.SetFocus
MsgBox "please insert name"
End If
154 | P a g e
End Sub
Private Sub Combo1_Click()
Call connect
With members
Do Until .EOF
If Combo1.Text = .Fields(0) Then
Text1 = .Fields(1)
Text2 = .Fields(2)
Text4 = .Fields(4)
Combo2 = .Fields(3)
Text5 = .Fields(5)
Text6 = .Fields(6)
Text3 = .Fields(7)
End If
.MoveNext
Loop
End With
End Sub
Private Sub Form_Load()
member1.Left = Screen.Width / 2 - member1.Width / 2
member1.Top = Screen.Height / 2 - member1.Height / 2
Call connect
End Sub
Private Sub Label14_Click()
Call connect
If members.RecordCount < 1 Then
MsgBox "Have no Member"
Else
list_member.Show
155 | P a g e
End If
End Sub
Private Sub Label20_Click()
Timer1.Enabled = True
End Sub
Private Sub Label22_Click()
Combo1.Text = ""
Combo2.Text = "Select Type"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Image1.Picture = LoadPicture("")
Image2.Picture = LoadPicture("")
DTPicker1.Value = Date
Frame3.Enabled = True
Combo1.Enabled = False
Text1.Enabled = False
Text2.Enabled = False
Text3.Enabled = False
Text4.Enabled = False
Text5.Enabled = False
Text6.Enabled = False
156 | P a g e
Text7.Enabled = False
Text8.Enabled = False
Text9.Enabled = False
Text10.Enabled = False
DTPicker1.Enabled = False
Label27.Enabled = False
Label28.Enabled = False
Label25.Enabled = False
Label22.Enabled = True
Label21.Enabled = False
Label23.Enabled = True
Label24.Enabled = True
Label26.Enabled = True
End Sub
Private Sub label23_Click()
Call connect
If Len(Text2.Text) > 0 Then
Do Until members.EOF
If Val(Combo1.Text) = members.Fields(0) Then
members.Delete
Combo2.Text = "Select Type"
Text1.Text = ""
Text2.Text = ""
Text4.Text = ""
Text3.Text = ""
Text5.Text = ""
Text7.Text = ""
Text6.Text = ""
Text8.Text = ""
157 | P a g e
Text9.Text = ""
Text10.Text = ""
DTPicker1.Value = Date
Image1.Picture = LoadPicture("")
Image2.Picture = LoadPicture("")
Do Until dailyrs.EOF
If dailyrs.Fields(0) = Date Then
dailyrs.Fields(11) = dailyrs.Fields(11) + 1
dailyrs.Update
End If
dailyrs.MoveNext
Loop
MsgBox "Data Deleted"
End If
members.MoveNext
Loop
Else
MsgBox "Please Select Record"
End If
End Sub
Private Sub Label26_Click()
imag1 = ""
imag2 = ""
Combo1.Text = ""
Combo2.Text = "Select Type"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
158 | P a g e
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
Image1.Picture = LoadPicture("")
Image2.Picture = LoadPicture("")
DTPicker1.Value = Date
Combo1.Enabled = False
Frame3.Enabled = False
Text1.Enabled = True
Text2.Enabled = True
Text3.Enabled = True
Text4.Enabled = True
Text5.Enabled = True
Text6.Enabled = True
Text7.Enabled = True
Text8.Enabled = True
Text9.Enabled = True
Text10.Enabled = True
DTPicker1.Enabled = True
Label27.Enabled = True
Label28.Enabled = True
Label25.Enabled = True
Label22.Enabled = True
Label21.Enabled = False
Label23.Enabled = False
Label24.Enabled = False
159 | P a g e
Label26.Enabled = False
Call connect
With members
Do Until .EOF
a = .Fields(0)
.MoveNext
Loop
End With
a = a + 1
Combo1.Text = a
End Sub
Private Sub Label27_Click()
CommonDialog1.ShowOpen
CommonDialog1.Filter = "Image|*.jpg|*.bmp|*.*"
CommonDialog1.InitDir = "d:lms project 2"
imag1 = ".imagemembers" + CommonDialog1.FileTitle
Image1.Picture = LoadPicture(CommonDialog1.FileName)
End Sub
Private Sub Label28_Click()
CommonDialog1.ShowOpen
CommonDialog1.Filter = "Image|*.jpg|*.bmp|*.*"
CommonDialog1.InitDir = "d:lms project 2"
imag2 = ".imagemembers" + CommonDialog1.FileTitle
Image2.Picture = LoadPicture(CommonDialog1.FileName)
End Sub
Private Sub Option3_Click()
If Option3.Value = True Then
Text12.Enabled = False
Text12.Text = ""
160 | P a g e
Text11.Enabled = True
End If
End Sub
Private Sub Option4_Click()
If Option4.Value = True Then
Text11.Enabled = False
Text11.Text = ""
Text12.Enabled = True
End If
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And
Not KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Text10_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And
Not KeyAscii = 8 And KeyAscii = 32 Then
KeyAscii = 0
End If
End Sub
Private Sub Text11_KeyPress(KeyAscii As Integer)
If Not IsNumeric(Text11.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Text12_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And
Not KeyAscii = 8 Then
161 | P a g e
KeyAscii = 0
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And
Not KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If Not IsNumeric(Text3.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Text5_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And
Not KeyAscii = 8 And KeyAscii = 32 Then
KeyAscii = 0
End If
End Sub
Private Sub Text6_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And
Not KeyAscii = 8 And KeyAscii = 32 Then
KeyAscii = 0
End If
End Sub
Private Sub Text7_KeyPress(KeyAscii As Integer)
If Not IsNumeric(Text7.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then
KeyAscii = 0
End If
162 | P a g e
End Sub
Private Sub Timer1_Timer()
If up = 0 Then
If Frame6.Top > 8240 Then
Label20.Top = Label20.Top - 20
Frame6.Top = Frame6.Top - 20
Else
Timer1.Enabled = False
up = 1
End If
Else
If Frame6.Top < 8880 Then
Label20.Top = Label20.Top + 20
Frame6.Top = Frame6.Top + 20
Else
Timer1.Enabled = False
up = 0
End If
End If
End Sub
 Book Issue Page
163 | P a g e
Dim flag%, up%
Private Sub Combo1_Click()
Call connect
Dim a%
Combo2.Enabled = True
With members
Do Until .EOF
If .Fields(0) = Combo1.Text Then
Label1.Caption = .Fields(1)
End If
.MoveNext
Loop
End With
If flag = 1 Then
With birs
Combo2.Clear
Combo2.Text = "Select issued Category"
Do Until .EOF
164 | P a g e
If Combo1.Text = .Fields(0) Then
Combo2.AddItem .Fields(6)
End If
.MoveNext
Loop
End With
Dim c, i, j As Integer
For i = 0 To Combo2.ListCount - 1
c = 0
For j = 0 To Combo2.ListCount - 1
If Combo2.List(i) = Combo2.List(j) Then
c = c + 1
End If
Next
If c > 1 Then
Combo2.RemoveItem (i)
End If
Next
End If
End Sub
Private Sub Combo2_Click()
Call connect
Combo3.Enabled = True
Combo3.Clear
Combo3.Text = "Book"
Text2.Text = ""
With bookrs
Do Until .EOF
If Combo2.Text = .Fields(11) Then
Combo3.AddItem .Fields(4)
165 | P a g e
End If
.MoveNext
Loop
End With
With birs
Do Until .EOF
If Combo2.Text = .Fields(6) Then
For i = 0 To Combo3.ListCount - 1
If Combo1.Text = .Fields(0) And Combo3.List(i) = .Fields(1) Then
Combo3.RemoveItem (i)
End If
Next
End If
.MoveNext
Loop
End With
If birs.BOF = False Then
birs.MoveFirst
End If
If flag = 1 Then
With birs
Combo3.Clear
Combo3.Text = "Select issued Book"
Do Until .EOF
If Combo1.Text = .Fields(0) And Combo2.Text = .Fields(6) Then
Combo3.AddItem .Fields(1)
End If
.MoveNext
Loop
End With
166 | P a g e
End If
End Sub
Private Sub Combo4_Click()
Call connect
Combo5.Enabled = True
Combo5.Clear
Combo5.Text = "New Book"
Text2.Text = ""
With bookrs
Do Until .EOF
If Combo4.Text = .Fields(11) Then
Combo5.AddItem .Fields(4)
End If
.MoveNext
Loop
End With
If Combo2.Text = Combo4.Text Then
For i = 0 To Combo3.ListCount - 1
If Combo3.Text = Combo5.List(i) Then
Combo5.RemoveItem (i)
End If
Next
End If
End Sub
Private Sub Combo3_Click()
Call connect
DTPicker2.Enabled = True
With bookrs
Do Until .EOF
If .Fields(4) = Combo3.Text Then
167 | P a g e
Text2.Text = .Fields(8) - Val(Text1)
End If
.MoveNext
Loop
End With
If flag = 0 Then
Text1.Enabled = True
Else
Text1.Enabled = False
End If
If flag = 1 Then
Combo4.Enabled = True
Combo4.Text = "New Category"
bookrs.MoveFirst
Combo5.Clear
Combo5.Text = "New Book"
With bookrs
Do Until .EOF
If Combo4.Text = .Fields(11) Then
Combo5.AddItem .Fields(4)
End If
.MoveNext
Loop
End With
If Combo2.Text = Combo4.Text Then
For i = 0 To Combo3.ListCount - 1
If Combo3.Text = Combo5.List(i) Then
Combo5.RemoveItem (i)
End If
Next
168 | P a g e
End If
With birs
Do Until .EOF
If Combo1.Text = .Fields(0) And Combo2.Text = .Fields(6) And Combo3.Text = .Fields(1) Then
Text1.Text = .Fields(4)
Text2.Text = .Fields(5)
End If
.MoveNext
Loop
End With
End If
End Sub
Private Sub Combo5_Click()
Call connect
With bookrs
Do Until .EOF
If .Fields(4) = Combo5.Text Then
Text2.Text = .Fields(8) - Val(Text1)
End If
.MoveNext
Loop
End With
Text1.Enabled = True
End Sub
Private Sub Command1_Click()
flag = 0
Combo4.Visible = False
Combo5.Visible = False
Dim c%, a$
Call connect
169 | P a g e
Combo1.Enabled = True
Command1.Enabled = False
Command2.Enabled = True
Text1.Text = "0"
Combo1.Clear
With members
Do Until .EOF
Combo1.AddItem .Fields(0)
.MoveNext
Loop
End With
With birs
Do Until .EOF
a = .Fields(0)
c = 0
birs1.MoveFirst
Do Until birs1.EOF
If birs1.Fields(0) = a Then
c = c + 1
End If
birs1.MoveNext
Loop
For i = 0 To Combo1.ListCount - 1
If a = Combo1.List(i) And c = 2 Then
Combo1.RemoveItem (i)
End If
Next
.MoveNext
Loop
End With
170 | P a g e
End Sub
Private Sub Command2_Click()
Call connect
If Combo1.Text <> "" Then
If Combo3.Text <> "" Then
If Len(Text1.Text) > 0 Then
If Text1.Text <> "0" Then
With birs
.AddNew
.Fields(0) = Combo1.Text
.Fields(1) = Combo3.Text
.Fields(2) = DTPicker1.Value
.Fields(3) = DTPicker2.Value
.Fields(4) = Text1.Text
.Fields(5) = Text2.Text
.Fields(6) = Combo2.Text
birs1.Fields(0) = Combo1.Text
birs1.Fields(1) = Combo3.Text
birs1.Fields(2) = DTPicker1.Value
birs1.Fields(2) = DTPicker2.Value
birs1.Fields(4) = Text1.Text
birs1.Fields(5) = Text2.Text
birs1.Fields(6) = Combo2.Text
If Len(Text3.Text) > 0 Then
.Fields(7) = Text3.Text
birs1.Fields(7) = Text3.Text
Else
.Fields(7) = "0"
birs1.Fields(7) = "0"
End If
171 | P a g e
birs1.Update
.Update
bookrs.MoveFirst
Do Until bookrs.EOF
If bookrs.Fields(4) = Combo3.Text Then
bookrs.Fields(8) = Text2.Text
bookrs.Update
End If
bookrs.MoveNext
Loop
Do Until dailyrs.EOF
If dailyrs.Fields(0) = Date Then
dailyrs.Fields(16) = dailyrs.Fields(16) + 1
dailyrs.Update
End If
dailyrs.MoveNext
Loop
MsgBox "Book Issued"
Text1.Text = "0"
Text2.Text = ""
Text3.Text = ""
Combo1.Clear
Combo2.Clear: Combo2.Text = "Category1"
Combo3.Clear: Combo3.Text = "Book1"
With members
Do Until .EOF
Combo1.AddItem .Fields(0)
.MoveNext
Loop
End With
172 | P a g e
With bcatrs
Do Until .EOF
Combo2.AddItem .Fields(1)
.MoveNext
Loop
End With
Text1.Enabled = False
DTPicker2.Enabled = False
Combo1.Enabled = False
Combo2.Enabled = False
Combo3.Enabled = False
Text1.Enabled = False
Command2.Enabled = False
Command1.Enabled = True
Label1.Caption = ""
Text3.Text = ""
Text3.Visible = False
End With
Else
MsgBox "can't issue 0 books"
Text1.SetFocus
End If
Else
MsgBox "Please insert books to be issue"
End If
Else
MsgBox "Please Select book"
End If
Else
MsgBox "Please Select Member"
173 | P a g e
End If
End Sub
Private Sub Command3_Click()
flag = 1
Call connect
Combo1.Enabled = True
Combo1.Clear
DTPicker2.Enabled = True
With birs
Do Until .EOF
If DTPicker1.Value = .Fields(2) Then
Combo1.AddItem .Fields(0)
End If
.MoveNext
Loop
End With
Dim c, i, j As Integer
For i = 0 To Combo1.ListCount - 1
c = 0
For j = 0 To Combo1.ListCount - 1
If Combo1.List(i) = Combo1.List(j) Then
c = c + 1
End If
Next
If c > 1 Then
Combo1.RemoveItem (i)
End If
Next
For i = 0 To Combo1.ListCount - 1
For j = 0 To Combo1.ListCount - 1
174 | P a g e
If Combo1.List(i) < Combo1.List(j) Then
t = Combo1.List(i)
Combo1.List(i) = Combo1.List(j)
Combo1.List(j) = t
End If
Next
Next
Combo2.Text = "Select Issued Category"
Combo3.Text = "Select Issued Book"
Combo4.Visible = True
Combo5.Visible = True
Combo5.Enabled = False
End Sub
Private Sub Command4_Click()
Call connect
Dim temp%
If Len(Text1.Text) > 0 Then
If Len(Text2.Text) > 0 Then
If Combo2.Text <> "Select issued Category" Then
If Combo3.Text <> "Select issued Book" Then
With birs
If Combo4.Text <> "New Category" And Combo5.Text <> "New Book" Then
Do Until .EOF
If Combo1.Text = .Fields(0) And Combo3.Text = .Fields(1) Then
temp = Val(.Fields(5))
.Fields(1) = Combo5.Text
.Fields(6) = Combo4.Text
.Fields(3) = DTPicker2.Value
.Fields(7) = Text3.Text
.Fields(5) = Text2.Text
175 | P a g e
birs1.Fields(1) = Combo5.Text
birs1.Fields(6) = Combo4.Text
birs1.Fields(3) = DTPicker2.Value
birs1.Fields(7) = Text3.Text
birs1.Fields(5) = Text2.Text
.Update
birs1.Update
Do Until dailyrs.EOF
If dailyrs.Fields(0) = Date Then
dailyrs.Fields(18) = dailyrs.Fields(18) + 1
dailyrs.Update
End If
dailyrs.MoveNext
Loop
Do Until bookrs.EOF
If bookrs.Fields(4) = Combo3.Text Then
bookrs.Fields(8) = temp + 1
bookrs.Update
ElseIf bookrs.Fields(4) = Combo5.Text Then
bookrs.Fields(8) = Text2.Text
bookrs.Update
End If
bookrs.MoveNext
Loop
End If
.MoveNext
birs1.MoveNext
Loop
Else
Do Until .EOF
176 | P a g e
If Combo1.Text = .Fields(0) And Combo3.Text = .Fields(1) Then
.Fields(1) = Combo3.Text
.Fields(6) = Combo2.Text
.Fields(3) = DTPicker2.Value
.Fields(7) = Text3.Text
.Fields(5) = Text2.Text
birs1.Fields(1) = Combo3.Text
birs1.Fields(6) = Combo2.Text
birs1.Fields(3) = DTPicker2.Value
birs1.Fields(7) = Text3.Text
birs1.Fields(5) = Text2.Text
.Update
birs1.Update
End If
.MoveNext
birs1.MoveNext
Loop
End If
End With
MsgBox ("Updation Successful")
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text3.Visible = False
Else
End If
Else
End If
Else
End If
177 | P a g e
Else
End If
End Sub
Private Sub Command6_Click()
Combo1.Enabled = False
Combo2.Enabled = False
Combo3.Enabled = False
Combo4.Enabled = False
Combo5.Enabled = False
Text1.Enabled = False
Text2.Enabled = False
Command1.Enabled = True
DTPicker2.Enabled = False
DTPicker1.Value = Date
DTPicker2.Value = Date + 15
End Sub
Private Sub DTPicker2_Change()
If DTPicker2.Value < Date Then
DTPicker2.Value = Date + 15
Text3.Text = ""
Text3.Visible = False
ElseIf DTPicker2.Value > (Date + 30) Then
DTPicker2.Value = Date + 15
Text3.Text = ""
Text3.Visible = False
ElseIf DTPicker2.Value = (Date + 15) Then
Text3.Text = ""
Text3.Visible = False
End If
Dim dt As Date
178 | P a g e
dt = DTPicker2.Value
If (dt - DTPicker1.Value) > 15 Then
Text3.Visible = True
Text3.Text = ((dt - DTPicker1.Value) - 15) * 2
End If
End Sub
Private Sub Form_Activate()
DTPicker1.Value = Date
DTPicker2.Value = Date + 15
End Sub
Private Sub Form_Load()
Book_issue.Left = Screen.Width / 2 - Book_issue.Width / 2
Book_issue.Top = Screen.Height / 2 - Book_issue.Height / 2
Call connect
Dim a%
With bcatrs
Do Until .EOF
Combo2.AddItem .Fields(1)
Combo4.AddItem .Fields(1)
.MoveNext
Loop
End With
Combo1.Enabled = False
Combo2.Enabled = False
Combo3.Enabled = False
Text1.Enabled = False
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload Me
menu.Show
179 | P a g e
End Sub
Private Sub Label11_Click()
Call connect
If birs.RecordCount < 1 Then
MsgBox "There have no book issue"
Else
List_Issue.Show
End If
End Sub
Private Sub Label12_Click()
End Sub
Private Sub Label15_Click()
Call connect
If Combo1.Text = "" And birs.RecordCount > 0 Then
Combo1.Text = birs.Fields(0)
Text1.Text = birs.Fields(4)
Text2.Text = birs.Fields(5)
Combo2.Text = birs.Fields(6)
Combo3.Text = birs.Fields(1)
Image1.Picture = LoadPicture(birs.Fields(7))
ElseIf Combo1.Text <> "" Then
With birs
Do Until .EOF
If Combo1.Text = .Fields(0) Then
.MoveNext
Exit Do
End If
.MoveNext
Loop
If .EOF = False Then
180 | P a g e
Combo1.Text = .Fields(0)
Text1.Text = .Fields(4)
Text2.Text = .Fields(5)
Combo2.Text = .Fields(6)
Combo3.Text = .Fields(1)
Image1.Picture = LoadPicture(.Fields(7))
End If
End With
End If
End Sub
Private Sub Label16_Click()
Call connect
With birs
If Combo1.Text = "" And .RecordCount > 0 Then
.MoveLast
Combo1.Text = .Fields(0)
Text1.Text = .Fields(4)
Text2.Text = .Fields(5)
Combo2.Text = .Fields(6)
Combo3.Text = .Fields(1)
Image1.Picture = LoadPicture(.Fields(7))
ElseIf Combo1.Text <> "" Then
.MoveLast
Combo1.Text = .Fields(0)
Text1.Text = .Fields(4)
Text2.Text = .Fields(5)
Combo2.Text = .Fields(6)
Combo3.Text = .Fields(1)
Image1.Picture = LoadPicture(.Fields(7))
End If
181 | P a g e
End With
End Sub
Private Sub Label17_Click()
Call connect
If Combo1.Text = "" And authorrs.RecordCount > 0 Then
Combo1.Text = birs.Fields(0)
Text1.Text = birs.Fields(4)
Text2.Text = birs.Fields(5)
Combo2.Text = birs.Fields(6)
Combo3.Text = birs.Fields(1)
Image1.Picture = LoadPicture(birs.Fields(7))
ElseIf Combo1.Text <> "" Then
With birs
Do Until .EOF
If Combo1.Text = .Fields(0) Then
.MovePrevious
Exit Do
End If
.MoveNext
Loop
If .BOF = False Then
Combo1.Text = .Fields(0)
Text1.Text = .Fields(4)
Text2.Text = .Fields(5)
Combo2.Text = .Fields(6)
Combo3.Text = .Fields(1)
Image1.Picture = LoadPicture(.Fields(7))
End If
End With
End If
182 | P a g e
End Sub
Private Sub Label18_Click()
Call connect
With birs
If Combo1.Text = "" And .RecordCount > 0 Then
Combo1.Text = .Fields(0)
Text1.Text = .Fields(4)
Text2.Text = .Fields(5)
Combo2.Text = .Fields(6)
Combo3.Text = .Fields(1)
Image1.Picture = LoadPicture(.Fields(7))
ElseIf Combo1.Text <> "" Then
.MoveFirst
Combo1.Text = .Fields(0)
Text1.Text = .Fields(4)
Text2.Text = .Fields(5)
Combo2.Text = .Fields(6)
Combo3.Text = .Fields(1)
Image1.Picture = LoadPicture(.Fields(7))
End If
End With
End Sub
Private Sub Label19_Click()
Frame2.Enabled = True
Label24.Enabled = True
Label22.Enabled = True
Label21.Enabled = True
Label23.Enabled = False
Label19.Enabled = False
End Sub
183 | P a g e
Private Sub Label20_Click()
Frame2.Enabled = True
Label24.Enabled = True
Label22.Enabled = True
Label21.Enabled = True
Label23.Enabled = False
Label19.Enabled = False
Call connect
If Option3.Value = True Then
If Len(Text11.Text) > 0 Then
With birs
Do Until authorrs.EOF
If Val(Text11.Text) = .Fields(0) Then
Combo1.Text = birs.Fields(0)
Text1.Text = birs.Fields(4)
Text2.Text = birs.Fields(5)
Combo2.Text = birs.Fields(6)
Combo3.Text = birs.Fields(1)
Image1.Picture = LoadPicture(birs.Fields(7))
Exit Do
End If
.MoveNext
Loop
End With
Else
MsgBox "Please mention ID"
End If
ElseIf Option4.Value = True Then
If Len(Text10.Text) > 0 Then
authorrs.MoveFirst
184 | P a g e
Do Until authorrs.EOF
If Text10.Text = authorrs.Fields(1) Then
Combo1.Text = authorrs.Fields(0)
Text1.Text = authorrs.Fields(1)
Text2.Text = authorrs.Fields(2)
Text4.Text = authorrs.Fields(3)
Image1.Picture = LoadPicture(authorrs.Fields(4))
Exit Do
End If
authorrs.MoveNext
Loop
Else
MsgBox "Please mention Name"
End If
End If
End Sub
Private Sub Label22_Click()
Frame2.Enabled = False
Label24.Enabled = False
Label22.Enabled = False
Label21.Enabled = False
Label23.Enabled = False
Label19.Enabled = True
Label20.Enabled = True
End Sub
Private Sub label23_Click()
Frame2.Enabled = True
Label24.Enabled = True
Label22.Enabled = True
Label21.Enabled = True
185 | P a g e
Label23.Enabled = False
Label19.Enabled = False
End Sub
Private Sub label24_Click()
Frame2.Enabled = False
Label20.Enabled = True
Label23.Enabled = True
Label19.Enabled = False
Label21.Enabled = False
Label22.Enabled = False
Label24.Enabled = False
End Sub
Private Sub Label25_Click()
Call connect
If Combo1.Text <> "" Then
Do Until birs.EOF
If Combo1.Text = birs.Fields(0) Then
birs.Delete
Combo1.Clear
Combo2.Clear
Combo3.Clear
Combo4.Clear
Combo5.Clear
Text1.Text = ""
Text2.Text = ""
Combo1.Text = ""
Combo2.Text = "Category"
Combo3.Text = "Book"
Image1.Picture = LoadPicture("")
End If
186 | P a g e
birs.MoveNext
Loop
Else
MsgBox "Please Select Record"
End If
End Sub
Private Sub Label28_Click()
Timer1.Enabled = True
End Sub
Private Sub Label26_Click()
Frame2.Enabled = True
Label23.Enabled = False
Label27.Enabled = False
Label25.Enabled = True
Label22.Enabled = True
Label24.Enabled = True
Label26.Enabled = True
Text1.Enabled = False
Text2.Enabled = False
Image1.Picture = LoadPicture("")
Combo1.Text = ""
Combo2.Text = "Category"
Combo3.Text = "Book"
Combo4.Clear
Combo5.Clear
Combo1.Enabled = False
Combo2.Enabled = False
Combo3.Enabled = False
Combo4.Visible = False
Combo5.Visible = False
187 | P a g e
Text1.Text = ""
Text2.Text = ""
End Sub
Private Sub Option3_Click()
If Option3.Value = True Then
Text10.Enabled = False
Text10.Text = ""
Text11.Enabled = True
End If
End Sub
Private Sub Option4_Click()
If Option4.Value = True Then
Text11.Enabled = False
Text11.Text = ""
Text10.Enabled = True
End If
End Sub
Private Sub Text1_Change()
If Val(Text1.Text) > 1 Or Val(Text1.Text) < 0 Then
Text1.Text = ""
End If
Call connect
With bookrs
Do Until .EOF
If .Fields(4) = Combo3.Text Then
If Val(Text1.Text) < .Fields(8) Then
Text2.Text = .Fields(8) - Val(Text1)
End If
End If
.MoveNext
188 | P a g e
Loop
End With
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If Not IsNumeric(Text1.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Text1_LostFocus()
If Text1.Text = "" Then
Text1 = "0"
End If
End Sub
Private Sub Text10_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not
KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Text11_KeyPress(KeyAscii As Integer)
If Not IsNumeric(Text11.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Timer1_Timer()
If up = 0 Then
If Frame5.Top > 6990 Then
Label28.Top = Label28.Top - 20
Frame5.Top = Frame5.Top - 20
Else
Timer1.Enabled = False
189 | P a g e
up = 1
End If
Else
If Frame5.Top < 7580 Then
Label28.Top = Label28.Top + 20
Frame5.Top = Frame5.Top + 20
Else
Timer1.Enabled = False
up = 0
End If
End If
End Sub
 Book Return Page
Dim falg As Integer
Dim up As Integer
Private Sub Combo1_Click()
Combo2.Enabled = True
Call connect
Dim a%
190 | P a g e
Combo2.Enabled = True
With members
Do Until .EOF
If .Fields(0) = Combo1.Text Then
Label1.Caption = .Fields(1)
End If
.MoveNext
Loop
End With
birs.MoveFirst
With birs
Combo2.Clear
Do Until .EOF
If Combo1.Text = .Fields(0) Then
Combo2.AddItem .Fields(1)
End If
.MoveNext
Loop
End With
Dim c, i, j As Integer
For i = 0 To Combo2.ListCount - 1
c = 0
For j = 0 To Combo2.ListCount - 1
If Combo2.List(i) = Combo2.List(j) Then
c = c + 1
End If
Next
If c > 1 Then
Combo2.RemoveItem (i)
End If
191 | P a g e
Next
If flag = 1 Then
Combo1.Clear
Combo2.Clear
Combo3.Clear
birs.MoveFirst
With birs
Combo3.Clear
Do Until .EOF
If Combo1.Text = .Fields(0) Then
Combo3.AddItem .Fields(1)
End If
.MoveNext
Loop
End With
For i = 0 To Combo3.ListCount - 1
c = 0
For j = 0 To Combo3.ListCount - 1
If Combo3.List(i) = Combo3.List(j) Then
c = c + 1
End If
Next
If c > 1 Then
Combo3.RemoveItem (i)
End If
Next
With bretrs
Combo2.Clear
Combo2.Text = "Old Book"
Do Until .EOF
192 | P a g e
If Combo1.Text = .Fields(0) Then
Combo2.AddItem .Fields(1)
End If
.MoveNext
Loop
End With
For i = 0 To Combo2.ListCount - 1
c = 0
For j = 0 To Combo2.ListCount - 1
If Combo2.List(i) = Combo2.List(j) Then
c = c + 1
End If
Next
If c > 1 Then
Combo2.RemoveItem (i)
End If
Next
End If
End Sub
Private Sub Combo2_Click()
Combo3.Enabled = True
Call connect
With birs
Do Until .EOF
If Combo1.Text = .Fields(0) And Combo2.Text = .Fields(1) Then
Text1.Text = Val(.Fields(7))
DTPicker2.Value = Val(.Fields(2))
DTPicker3.Value = Date
If .Fields(3) >= DTPicker3.Value Then
Else
193 | P a g e
If (DTPicker3.Value - DTPicker2.Value) > 15 Then
Text1.Text = ((DTPicker3.Value - DTPicker2.Value) - 15) * 2
End If
End If
End If
.MoveNext
Loop
End With
End Sub
Private Sub Combo3_Click()
Call connect
With birs
Do Until .EOF
If Combo1.Text = .Fields(0) And Combo2.Text = .Fields(1) Then
Text1.Text = Val(.Fields(7))
DTPicker2.Value = Val(.Fields(2))
DTPicker3.Value = Date
If .Fields(3) >= DTPicker3.Value Then
Else
If (DTPicker3.Value - DTPicker2.Value) > 15 Then
Text1.Text = ((DTPicker3.Value - DTPicker2.Value) - 15) * 2
End If
End If
End If
.MoveNext
Loop
End With
End Sub
Private Sub Command1_Click()
Combo1.Enabled = True
194 | P a g e
Call connect
With birs
Do Until .EOF
Combo1.AddItem .Fields(0)
.MoveNext
Loop
End With
Dim c, i, j As Integer
For i = 0 To Combo1.ListCount - 1
c = 0
For j = 0 To Combo1.ListCount - 1
If Combo1.List(i) = Combo1.List(j) Then
c = c + 1
End If
Next
If c > 1 Then
Combo1.RemoveItem (i)
End If
Next
For i = 0 To Combo1.ListCount - 1
For j = 0 To Combo1.ListCount - 1
If Combo1.List(i) < Combo1.List(j) Then
t = Combo1.List(i)
Combo1.List(i) = Combo1.List(j)
Combo1.List(j) = t
End If
Next
Next
End Sub
Private Sub Command2_Click()
195 | P a g e
Call connect
If Combo1.Text <> "" Then
If Combo2.Text <> "" Then
With birs
Do Until .EOF
If Combo1.Text = .Fields(0) And Combo2.Text = .Fields(1) Then
Do Until bookrs.EOF
If bookrs.Fields(4) = Combo2.Text Then
bookrs.Fields(8) = bookrs.Fields(8) + 1
End If
bookrs.Update
bookrs.MoveNext
Loop
.Delete
With bretrs
.AddNew
.Fields(0) = Combo1.Text
.Fields(1) = Combo2.Text
.Fields(2) = DTPicker2.Value
.Fields(3) = DTPicker3.Value
.Fields(4) = Text1.Text
.Update
End With
MsgBox "book return"
Do Until dailyrs.EOF
If dailyrs.Fields(0) = Date Then
dailyrs.Fields(19) = dailyrs.Fields(19) + 1
dailyrs.Update
End If
dailyrs.MoveNext
196 | P a g e
Loop
Combo1.Text = ""
Combo2.Text = ""
Text1.Text = ""
Combo1.Enabled = False
Combo2.Enabled = False
End If
.Update
.MoveNext
Loop
End With
Else
MsgBox "Please Select Book"
End If
Else
MsgBox "Please Select Member ID"
End If
End Sub
Private Sub Command3_Click()
flag = 1
Combo1.Enabled = True
Combo3.Visible = True
Call connect
With bretrs
Do Until .EOF
If .Fields(3) = Date Then
Combo1.AddItem .Fields(0)
End If
.MoveNext
Loop
197 | P a g e
End With
Dim c, i, j As Integer
For i = 0 To Combo1.ListCount - 1
c = 0
For j = 0 To Combo1.ListCount - 1
If Combo1.List(i) = Combo1.List(j) Then
c = c + 1
End If
Next
If c > 1 Then
Combo1.RemoveItem (i)
End If
Next
For i = 0 To Combo1.ListCount - 1
For j = 0 To Combo1.ListCount - 1
If Combo1.List(i) < Combo1.List(j) Then
t = Combo1.List(i)
Combo1.List(i) = Combo1.List(j)
Combo1.List(j) = t
End If
Next
Next
End Sub
Private Sub Command4_Click()
Call connect
If Combo1.Text <> "" Then
If Combo2.Text <> "Old Book" Then
If Combo3.Text <> "New Book" Then
With bretrs
Do Until .EOF
198 | P a g e
If Combo1.Text = .Fields(0) And Combo2.Text = .Fields(1) Then
.Fields(1) = Combo3.Text
.Fields(2) = DTPicker2.Value
.Fields(4) = Text1.Text
.Update
Do Until dailyrs.EOF
If dailyrs.Fields(0) = Date Then
dailyrs.Fields(21) = dailyrs.Fields(21) + 1
dailyrs.Update
End If
dailyrs.MoveNext
Loop
MsgBox "Updation Saved"
Combo1.Enabled = False
Combo2.Enabled = False
Combo3.Visible = False
Combo3.Enabled = False
Text1.Text = ""
End If
.MoveNext
Loop
End With
With birs1
Do Until .EOF
If .Fields(0) = Combo1.Text And .Fields(1) = Combo2.Text Then
End If
.MoveNext
Loop
End With
Else
199 | P a g e
MsgBox "Please Select Member ID"
End If
Else
MsgBox "Please Select Old returned Book"
End If
Else
MsgBox "Please Select New returned Book"
End If
End Sub
Private Sub Form_Load()
book_Return.Left = Screen.Width / 2 - book_Return.Width / 2
book_Return.Top = Screen.Height / 2 - book_Return.Height / 2
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload Me
menu.Show
End Sub
Private Sub Label10_Click()
Frame2.Enabled = False
Label4.Enabled = False
Label9.Enabled = False
Label10.Enabled = False
Label14.Enabled = False
Label13.Enabled = True
Label19.Enabled = True
End Sub
Private Sub Label11_Click()
Call connect
If bretrs.RecordCount < 1 Then
MsgBox "Have no Book for Return"
200 | P a g e
Else
list_return.Show
End If
End Sub
Private Sub label13_Click()
Frame2.Enabled = True
Label4.Enabled = True
Label10.Enabled = True
Label14.Enabled = True
Label9.Enabled = False
Label13.Enabled = False
End Sub
Private Sub Label15_Click()
Call connect
If Combo1.Text = "" And authorrs.RecordCount > 0 Then
Combo1.Text = authorrs.Fields(0)
Text1.Text = authorrs.Fields(1)
Text2.Text = authorrs.Fields(2)
Text4.Text = authorrs.Fields(3)
Image1.Picture = LoadPicture(authorrs.Fields(4))
ElseIf Combo1.Text <> "" Then
Do Until authorrs.EOF
If Combo1.Text = authorrs.Fields(0) Then
authorrs.MoveNext
Exit Do
End If
authorrs.MoveNext
Loop
If authorrs.EOF = False Then
Combo1.Text = authorrs.Fields(0)
201 | P a g e
Text1.Text = authorrs.Fields(1)
Text2.Text = authorrs.Fields(2)
Text4.Text = authorrs.Fields(3)
Image1.Picture = LoadPicture(authorrs.Fields(4))
End If
End If
End Sub
Private Sub Label16_Click()
Call connect
If Combo1.Text = "" And authorrs.RecordCount > 0 Then
authorrs.MoveLast
Combo1.Text = authorrs.Fields(0)
Text1.Text = authorrs.Fields(1)
Text2.Text = authorrs.Fields(2)
Text4.Text = authorrs.Fields(3)
Image1.Picture = LoadPicture(authorrs.Fields(4))
ElseIf Combo1.Text <> "" Then
authorrs.MoveLast
Combo1.Text = authorrs.Fields(0)
Text1.Text = authorrs.Fields(1)
Text2.Text = authorrs.Fields(2)
Text4.Text = authorrs.Fields(3)
Image1.Picture = LoadPicture(authorrs.Fields(4))
End If
End Sub
Private Sub Label17_Click()
Call connect
If Combo1.Text = "" And authorrs.RecordCount > 0 Then
Combo1.Text = authorrs.Fields(0)
Text1.Text = authorrs.Fields(1)
202 | P a g e
Text2.Text = authorrs.Fields(2)
Text4.Text = authorrs.Fields(3)
Image1.Picture = LoadPicture(authorrs.Fields(4))
ElseIf Combo1.Text <> "" Then
Do Until authorrs.EOF
If Combo1.Text = authorrs.Fields(0) Then
authorrs.MovePrevious
Exit Do
End If
authorrs.MoveNext
Loop
If authorrs.BOF = False Then
Combo1.Text = authorrs.Fields(0)
Text1.Text = authorrs.Fields(1)
Text2.Text = authorrs.Fields(2)
Text4.Text = authorrs.Fields(3)
Image1.Picture = LoadPicture(authorrs.Fields(4))
End If
End If
End Sub
Private Sub Label18_Click()
Call connect
If Combo1.Text = "" And authorrs.RecordCount > 0 Then
Combo1.Text = authorrs.Fields(0)
Text1.Text = authorrs.Fields(1)
Text2.Text = authorrs.Fields(2)
Text4.Text = authorrs.Fields(3)
Image1.Picture = LoadPicture(authorrs.Fields(4))
ElseIf Combo1.Text <> "" Then
authorrs.MoveFirst
203 | P a g e
Combo1.Text = authorrs.Fields(0)
Text1.Text = authorrs.Fields(1)
Text2.Text = authorrs.Fields(2)
Text4.Text = authorrs.Fields(3)
Image1.Picture = LoadPicture(authorrs.Fields(4))
End If
End Sub
Private Sub Label19_Click()
Frame2.Enabled = True
Label4.Enabled = True
Label10.Enabled = True
Label14.Enabled = True
Label9.Enabled = False
Label13.Enabled = False
End Sub
Private Sub Label20_Click()
Timer1.Enabled = True
End Sub
Private Sub Label4_Click()
Frame2.Enabled = False
Label9.Enabled = True
Label19.Enabled = True
Label10.Enabled = False
Label14.Enabled = False
Label4.Enabled = False
Label13.Enabled = False
End Sub
Private Sub Label9_Click()
Frame2.Enabled = True
Label4.Enabled = True
204 | P a g e
Label10.Enabled = True
Label14.Enabled = True
Label9.Enabled = False
Label13.Enabled = False
End Sub
Private Sub Option3_Click()
If Option3.Value = True Then
Text10.Enabled = False
Text10.Text = ""
Text11.Enabled = True
End If
End Sub
Private Sub Option4_Click()
If Option4.Value = True Then
Text11.Enabled = False
Text11.Text = ""
Text10.Enabled = True
End If
End Sub
Private Sub Text10_KeyPress(KeyAscii As Integer)
If Not IsNumeric(Text10.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Text11_KeyPress(KeyAscii As Integer)
If Not IsNumeric(Text11.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Timer1_Timer()
205 | P a g e
If up = 0 Then
If Frame5.Top > 5860 Then
Label20.Top = Label20.Top - 20
Frame5.Top = Frame5.Top - 20
Else
Timer1.Enabled = False
up = 1
End If
Else
If Frame5.Top < 6500 Then
Label20.Top = Label20.Top + 20
Frame5.Top = Frame5.Top + 20
Else
Timer1.Enabled = False
up = 0
End If
End If
End Sub
 Update Security Settings Page
Private Sub Check1_Click()
206 | P a g e
If Check1 = False Then
Text2.PasswordChar = "*"
Else
Text2.PasswordChar = ""
End If
End Sub
Private Sub Check2_Click()
If Check2 = False Then
Text3.PasswordChar = "*"
Else
Text3.PasswordChar = ""
End If
End Sub
Private Sub Label12_Click()
Call connect
If Len(Text2.Text) > 0 Then
If Len(Text3.Text) > 0 Then
If Len(Text4.Text) > 0 Then
If Len(Text5.Text) > 0 Then
If Combo1.Text <> "" Then
If Combo2.Text <> "" Then
With staffrs
Do Until .EOF
If Text1.Text = .Fields(0) Then
If Text2.Text = .Fields(8) Then
If Text3.Text <> Text2.Text Then
.Fields(8) = Text3.Text
.Fields(9) = Combo1.Text
.Fields(10) = Text4.Text
.Fields(11) = Combo2.Text
207 | P a g e
.Fields(12) = Text5.Text
.Update
rs.Fields(2) = Text3.Text
rs.Update
MsgBox "changes is saved"
Unload Me
menu.Show
Else
MsgBox "your new password is same as old password"
Text3.Text = ""
Text3.SetFocus
End If
Else
MsgBox "your old password is incorrect"
Text2.Text = ""
Text2.SetFocus
End If
End If
.MoveNext
rs.MoveNext
Loop
End With
Else
MsgBox "Please select Security Question 2"
Combo2.SetFocus
End If
Else
MsgBox "Please select Security Question 1"
Combo1.SetFocus
End If
208 | P a g e
Else
MsgBox "Please enter new answer 2 password"
Text5.SetFocus
End If
Else
MsgBox "Please enter new answer 1 password"
Text4.SetFocus
End If
Else
MsgBox "Please enter new password"
Text3.SetFocus
End If
Else
MsgBox "Please enter old password"
Text2.SetFocus
End If
End Sub
Private Sub Label9_Click()
If Text2.Text = "" And Text3.Text = "" And Text4.Text = "" And Text5.Text = "" And Combo1.Text = ""
And Combo2.Text = "" And Check1.Value = False And Check2.Value = False Then
Unload Me
menu.Show
End If
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Combo1.Text = ""
Combo2.Text = ""
Check1.Value = False
Check2.Value = False
209 | P a g e
End Sub
Private Sub Form_Load()
updat.Left = Screen.Width / 2 - updat.Width / 2
updat.Top = Screen.Height / 2 - updat.Height / 2
Text1.Text = id
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload Me
menu.Show
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not
KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
Private Sub Text5_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not
KeyAscii = 8 Then
KeyAscii = 0
End If
End Sub
 About Us Page
210 | P a g e
Dim pic As Integer
Private Sub Form_Load()
about.Left = Screen.Width / 2 - about.Width / 2
about.Top = Screen.Height / 2 - about.Height / 2
Timer1.Enabled = True
pic = 1
End Sub
Private Sub Form_Unload(Cancel As Integer)
Timer1.Enabled = False
Unload Me
menu.Show
End Sub
Private Sub Timer1_Timer()
ChDrive (Left(adrs, 1))
'ChDir (Right(adrs, Len(adrs) - 2))
If pic = 1 Then
pic = 2
Label11.Caption = "Developer (Yash Agarwal)"
Image2.Picture = LoadPicture(".imageabout usyash1.jpg")
211 | P a g e
ElseIf pic = 2 Then
pic = 3
Label11.Caption = "Mentor (Tarun Sharma)"
Image2.Picture = LoadPicture(".imageabout ustarun.jpg")
ElseIf pic = 3 Then
pic = 1
Label11.Caption = "Developer (Heena Tejwani)"
Image2.Picture = LoadPicture(".imageabout usheena.jpg")
End If
End Sub
 Library Membership Card
Dim path As String
Private Sub Combo1_Click()
Call connect
212 | P a g e
With members
Do Until .EOF
If Combo1.Text = .Fields(0) Then
Label7.Caption = .Fields(0)
Label8.Caption = .Fields(1) + " " + .Fields(2)
Label10.Caption = .Fields(8)
Label11.Caption = .Fields(12)
Label12.Caption = .Fields(11)
Image1.Picture = LoadPicture(.Fields(13))
path = .Fields(13)
End If
.MoveNext
Loop
End With
End Sub
Private Sub Form_Load()
Me.Left = Screen.Width / 2 - Me.Width / 2
Me.Top = Screen.Height / 2 - Me.Height / 2
Call connect
Combo1.Clear
Combo1.Text = "Select"
With members
If .RecordCount > 0 Then
.MoveFirst
End If
Do Until .EOF
Combo1.AddItem .Fields(0)
.MoveNext
Loop
End With
213 | P a g e
Label7.Caption = ""
Label8.Caption = ""
Label10.Caption = ""
Label11.Caption = ""
Label12.Caption = ""
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload Me
menu.Show
End Sub
Private Sub Label9_Click()
Set DataReport1.DataSource = members
DataReport1.Sections(2).Controls("label9").Caption = Label7.Caption
DataReport1.Sections(2).Controls("label10").Caption = Label8.Caption
DataReport1.Sections(2).Controls("label11").Caption = Label10.Caption
DataReport1.Sections(2).Controls("label12").Caption = Label11.Caption
DataReport1.Sections(2).Controls("label13").Caption = Label12.Caption
Set DataReport1.Sections(2).Controls("Image1").Picture = LoadPicture(path)
DataReport1.Show
Do Until dailyrs.EOF
If dailyrs.Fields(0) = Date Then
dailyrs.Fields(25) = dailyrs.Fields(25) + 1
dailyrs.Update
End If
dailyrs.MoveNext
Loop
Unload Me
End Sub
 Application Form
214 | P a g e
215 | P a g e
Chapter – 6 System Requirements of PC
Processor Core 2 Dual / 4.3 more
RAM 1, 2 GB or more
HDD 500 GB / 1 TB or more
OS Window 7 or Later
Database MS Access 2003
216 | P a g e
Chapter – 7 Conclusion
After we have completed the project we are sure the problems in the existing system world
overcome. The “Library Management System” process made computerized to reduce human
errors & to increase the efficiency. The main focus of this project is to less human efforts. The
maintenance of the records is made efficient, as all the records are stored in the Access Database,
through which data can be retrieved easily. The navigation control is provided in all the forms to
navigate through the large amount of records. If the numbers of records are very large than user
has to just type in the search string & user gets the results immediately. The editing is also made
simples. The user has to just type in the required field & process the update button to update the
desired field.
The books & students are given a particular unique id no. so that they can be access correctly &
without errors. Our main aim of the project is to get the correct information about a particular
member & books available in the Library.
217 | P a g e
Bibliography
 www.google.com
 www.youtube.com
 www.stackoverflow.com
 VB Black Book (Author: Steven Holzner)
 MS Visual Basic 2010 step by step (Author: Michael Halverson)
 The Complete Reference Visual Basic 6 (Author: Noel Jerk)
 College Notes
218 | P a g e
Thank You…
YASH AGARWAL
Bachelor of Computer Application
Dezyne E’cole College
106/10, CIVIL LINES
AJMER
RAJASTHAN - 305001 (INDIA)
(FEBRUARY, 2017)
www.dezyneecole.com

More Related Content

DOCX
Final Project Report of College Management System
PDF
Kapil Jangid - BCA Final Year
PPTX
Student result mamagement
DOCX
Cs Project
PDF
Mini Project Format
PDF
A project report on chat application
DOCX
Project report On MSM (Mobile Shop Management)
PDF
Documentation project of college management [1]
Final Project Report of College Management System
Kapil Jangid - BCA Final Year
Student result mamagement
Cs Project
Mini Project Format
A project report on chat application
Project report On MSM (Mobile Shop Management)
Documentation project of college management [1]

What's hot (20)

PDF
Android College Application Project Report
DOC
Project report
PPTX
Billing software
PPTX
Library Management System Waterfall Model
PPSX
Final project viva presentation
DOCX
Android Based Application Project Report.
PPTX
Student management system
PDF
Software Requirements Specification on Student Information System (SRS on SIS)
PPTX
Android app ppt
PPTX
Ian Sommerville, Software Engineering, 9th Edition Ch 4
PDF
Class Management System Project Proposal
PDF
Library management system
PPT
Student management system
DOCX
Report on cloud computing by prashant gupta
PPTX
online mobile phone shopping
DOCX
Library Management System
DOCX
system requirements for android projects
DOC
Sequnce diagram for ONLINE EXAMINATION SYSTEM
PDF
Weather Now
DOCX
college website project report
Android College Application Project Report
Project report
Billing software
Library Management System Waterfall Model
Final project viva presentation
Android Based Application Project Report.
Student management system
Software Requirements Specification on Student Information System (SRS on SIS)
Android app ppt
Ian Sommerville, Software Engineering, 9th Edition Ch 4
Class Management System Project Proposal
Library management system
Student management system
Report on cloud computing by prashant gupta
online mobile phone shopping
Library Management System
system requirements for android projects
Sequnce diagram for ONLINE EXAMINATION SYSTEM
Weather Now
college website project report
Ad

Similar to Yash Agarwal - BCA Final Year (20)

PDF
Pinkle makhijani supermarket billing system vb project
DOCX
Bca Final Year VB Practical File
DOCX
Library Management System Project in PHP with BlackBook & Source Code
PDF
DOCX
Library Management System-converted.docx
PDF
PPT
Internship Project [4350704] Presentation.ppt
DOC
Java library synopsis
PDF
Yogesh_Pingle Resume
PPTX
library management system
PDF
Library_Management_System_Mini_Project_R (1).pdf
DOCX
Synopsis of Library Management System
DOCX
Vijay Aryanew resume
DOCX
Library Management System Project Report
PDF
LBA SYNOPSIS.pdf
DOC
Library manaementreport1
DOCX
PDF
Digital-Library with pdf for class 12 c.s
PDF
E library mangment system presentation
PDF
Library management project
Pinkle makhijani supermarket billing system vb project
Bca Final Year VB Practical File
Library Management System Project in PHP with BlackBook & Source Code
Library Management System-converted.docx
Internship Project [4350704] Presentation.ppt
Java library synopsis
Yogesh_Pingle Resume
library management system
Library_Management_System_Mini_Project_R (1).pdf
Synopsis of Library Management System
Vijay Aryanew resume
Library Management System Project Report
LBA SYNOPSIS.pdf
Library manaementreport1
Digital-Library with pdf for class 12 c.s
E library mangment system presentation
Library management project
Ad

More from Dezyneecole (20)

PDF
Pratibha Kumari, Diploma Fashion Design First Year, (Basic Pattern Developmen...
PDF
Shaily Goyar, Diploma Fashion Design First Year, (Basic Pattern Development P...
PDF
Shaily Goyar, Diploma Fashion Design First Year, (Fashion illustration for Fa...
PDF
Shaily Goyar, Diploma Fashion Design First Year, (Embroidery Project)
PDF
Shaily Goyar, Diploma Fashion Design First Year, (Fashion Draping Project)
PDF
Shaily Goyar, Diploma Fashion Design First Year, (Design Basics Project)
PDF
Shaily Goyar, Diploma Fashion Design First Year, (Corel Draw Project)
PDF
Tanya Jain, Diploma Fashion Design First Year, (Fashion illustration for Fash...
PDF
Tanya Jain , Diploma Fashion Design First Year, (Basic Pattern Development Pr...
PDF
Tanya Jain, Diploma Fashion Design First Year, (Embroidery Project)
PDF
Tanya Jain, Diploma Fashion Design First Year, (Fashion Draping Project)
PDF
Tanya Jain , Diploma Fashion Design First Year, (Design Basics Project)
PDF
Gouri Ramchandani, Diploma Fashion Design First Year, (Illustration For Fashi...
PDF
Gouri Ramchandani, Diploma Fashion Design First Year, (Basic Pattern Developm...
PDF
Gouri Ramchandani, Diploma Fashion Design First Year, (Embroidery Project)
PDF
Gouri Ramchandani, Diploma Fashion Design First Year, (Design Basics Project)
PDF
Gouri Ramchandani, Diploma Fashion Design First Year, (Corel DrawProject)
PDF
Dimple Mordani, Diploma Fashion Design First Year, (Embroidery Project)
PDF
Dimple Mordani, Diploma Fashion Design First Year, (illustration for Fashion ...
PDF
Dimple Mordani, Diploma Fashion Design First Year, (Basic Pattern Development...
Pratibha Kumari, Diploma Fashion Design First Year, (Basic Pattern Developmen...
Shaily Goyar, Diploma Fashion Design First Year, (Basic Pattern Development P...
Shaily Goyar, Diploma Fashion Design First Year, (Fashion illustration for Fa...
Shaily Goyar, Diploma Fashion Design First Year, (Embroidery Project)
Shaily Goyar, Diploma Fashion Design First Year, (Fashion Draping Project)
Shaily Goyar, Diploma Fashion Design First Year, (Design Basics Project)
Shaily Goyar, Diploma Fashion Design First Year, (Corel Draw Project)
Tanya Jain, Diploma Fashion Design First Year, (Fashion illustration for Fash...
Tanya Jain , Diploma Fashion Design First Year, (Basic Pattern Development Pr...
Tanya Jain, Diploma Fashion Design First Year, (Embroidery Project)
Tanya Jain, Diploma Fashion Design First Year, (Fashion Draping Project)
Tanya Jain , Diploma Fashion Design First Year, (Design Basics Project)
Gouri Ramchandani, Diploma Fashion Design First Year, (Illustration For Fashi...
Gouri Ramchandani, Diploma Fashion Design First Year, (Basic Pattern Developm...
Gouri Ramchandani, Diploma Fashion Design First Year, (Embroidery Project)
Gouri Ramchandani, Diploma Fashion Design First Year, (Design Basics Project)
Gouri Ramchandani, Diploma Fashion Design First Year, (Corel DrawProject)
Dimple Mordani, Diploma Fashion Design First Year, (Embroidery Project)
Dimple Mordani, Diploma Fashion Design First Year, (illustration for Fashion ...
Dimple Mordani, Diploma Fashion Design First Year, (Basic Pattern Development...

Recently uploaded (20)

PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Complications of Minimal Access Surgery at WLH
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Computing-Curriculum for Schools in Ghana
PPTX
Cell Structure & Organelles in detailed.
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
master seminar digital applications in india
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PPTX
Pharma ospi slides which help in ospi learning
PDF
01-Introduction-to-Information-Management.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Complications of Minimal Access Surgery at WLH
A systematic review of self-coping strategies used by university students to ...
O7-L3 Supply Chain Operations - ICLT Program
Computing-Curriculum for Schools in Ghana
Cell Structure & Organelles in detailed.
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
Supply Chain Operations Speaking Notes -ICLT Program
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
102 student loan defaulters named and shamed – Is someone you know on the list?
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
master seminar digital applications in india
202450812 BayCHI UCSC-SV 20250812 v17.pptx
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
Pharma ospi slides which help in ospi learning
01-Introduction-to-Information-Management.pdf

Yash Agarwal - BCA Final Year

  • 2. 1 | P a g e Visual Basic Project Report A WORK REPORT SUBMITTED IN PARTIAL FULLFILLMENT OF THE REQUIREMENT FOR THE DEGREE Bachelor of Computer Application Dezyne E’cole College 106/10, CIVIL LINES AJMER RAJASTHAN - 305001 (INDIA) (FEBRUARY, 2017) www.dezyneecole.com SUBMITTED BY YASH AGARWAL BCA 3rd year
  • 3. 2 | P a g e GRADE SHEET This project report has been made under the guidance of Mr. Tarun Sharma faculty of Bachelor of Computer Application. This project focus on various parameter of Library Management System. The overall project report is _______________________________________________________ ______________________________________________________________________________ ______________________________________________________________________________ _______________________________________________________. Principal Signature __________________ Date __________________
  • 4. 3 | P a g e CONTENT Acknowledgement........................................................................................................................... 3 Synopsis........................................................................................................................................... 2 Introduction Page of Student........................................................................................................... 3 Chapter – 1 Introduction of Information Technology (IT)................................................................. 4 Chapter – 2 Introduction to Project ................................................................................................. 8 Chapter – 3 Project & Their Facilities............................................................................................. 10 Chapter – 4 Project Design............................................................................................................. 11 Chapter – 5 Database Development .............................................................................................. 15 Chapter – 6 System Requirements of PC...................................................................................... 215 Chapter – 7 Conclusion................................................................................................................ 216 Bibliography................................................................................................................................. 217
  • 5. 1 | P a g e Acknowledgement The satisfaction that accompanies that the successful completion of any task would be incomplete without the mention of people whose ceaseless co-operation made it possible, whose constant guidance and encouragement crown all efforts with success. The project on Library Management System was developed in Visual Basic Language at Dezyne E’cole College. During the making of this project we have learnt a lot and we are extremely grateful and remain indebted to our guide MR. Tarun Sharma for being a source of inspiration and for his constant support in the design, implementation and evaluation of the project. We are thankful to them for their constant constructive criticism and invaluable suggestions, which benefited us a lot while developing the project on “Library Management System”. He has been a constant source of inspiration and motivation for hard work. He has been very co- operative throughout this project work. Through this column, we express our warm thanks to him for their encouragement, co-operation and consent without which we mightn’t be able to accomplish this project. I cannot move on beloved without thank beloved Principal Mrs. Vinita Mathur for creating the required academic environment which made my task appreciable. We would like to thank the other faculty member also, at this occasion. Last but not the least, we would like to thank our friends & family for support and encouragement they have given us during the course of our work. We also thanks our colleague Ms. Heena Tejwani who have helped in successful completion of the project. With due regards Mr. Yash Agarwal BCA 3rd Year
  • 6. 2 | P a g e Synopsis The project Library Management System gives us the complete information about the Library. We give a Title for project that is “Your Helpmate” it means this application is helpful for users and any time user can access it through staff or admin. This application is access by only staff and admin. Members can’t access it directly. The project is very useful for those who want to know about Library Management System. This application maintains the records related to New Books, Issue Books, and Return Books etc. We can enter the records of new books and retrieve the details of books available in the Library. We can issue the books available in the Library. We can issue the books to the members and maintain their records and can also check how many books are issued and stock available in the Library. In this project we can maintain the late fine of members who returns the issued books after due date. All necessary requirements for the Library to manage added.
  • 7. 3 | P a g e Qualification School/College Board/University Year Percentage BCA-3rd Year Dezyne E’cole College M.D.S. University 2016-17 Pursuing BCA-2nd Year Dezyne E’cole College M.D.S. University 2015-16 82.66% BCA-1st Year Dezyne E’cole College M.D.S. University 2014-15 78.88% 12th Gujrati Sr. Sec. School RBSE 2014 62% 10th Gujrati Sr. Sec. School RBSE 2012 56% Introduction Page of Student Yash Agarwal Professional Qualification: Pursuing Bachelor Degree in Computer Application from Dezyne E’cole College, Ajmer Affiliated from Maharshi Dayanand Saraswati University, I have mastered the basic languages and created lot of projects during my study period to hone my skills. Academic Record - Technical Skill Set:  Good knowledge of Languages like o C, C++, JAVA, Visual Basic 6.0, Java Script, HTML, CSS, SQL.  Excellent knowledge of Microsoft Office.  Knowledge of Web Design & Development.  Other Skills Like: o Presentation Skill Co-Curricular and Achievements:-  Participated and presented project on “Delhi Metro Fare System” on Java Language in the yearly Identity Exhibition, 2016 at Dezyne E’cole College.  Participated and presented project on “Money Transaction System” on C++ Language in the yearly Identity Exhibition, 2016 at Dezyne E’cole College.  Participated and presented project on “Student Management System” on C++ Language in the yearly Identity Exhibition, 2015 at Dezyne E’cole College.  Participated and presented project on “Smart Learning Web” Website in the yearly Identity Exhibition, 2014 at Dezyne E’cole College.  Awarded for Best Performance in Batch (B.C.A. 1st year) Annual Event, 2015.
  • 8. 4 | P a g e Main Project Undertaken (During College Study):  C++ Language Assignment : This Project includes many C++ programs for e.g. Currency Calculator, Text to Machine Code Convertor, String Diamond, Array Operations, Number System Calculator, Birth days Calculator, Power Calculator, Armstrong Calculator, Prime Number Calculator, Perfect Number Calculator, Student Mark sheet Printer, Palindrome Calculator, Text Printer, Password Checker etc.  Java Language Assignment : This Project includes many Java GUI programs for e.g. Swaping, Word Statics, Arithmetic Calculator, Change Case, Square and Double, ASCII Character Convertor, Number System etc.  C++ Language Assignment : This Project includes management of Student data like Id, Name, Class, Date of Birth, City, Phone no. etc. and containing many other data manipulation operations like Adding, Viewing, Deleting, Modifying and Searching of Records. This project is useful to manage College/School Students data.  Java Language Assignment : This Project includes many Java CUI programs for e.g. Friend Number Calculator, Currency Calculator, Mobile Bill Calculator, Employee Salary System, Student Mark sheet etc.  C++ Language Assignment : This Project includes manage transaction of Money and Users Account like Deposit, Withdrawal, Transfer, Mini Statement, User Account Information etc. and it has two parts that 1 for Exist User and 2 for Create New User. This project is useful to manage Multiple Users Bank Account and their transactions. Declaration: I hereby declare that particulars given here are true and complete to the best of my knowledge and belief.  Awarded for 1st position in who is the best competition (C++ Language) in Annual Event, 2015.  Awarded for 2nd position in who is the best competition (pc software) in Annual Event, 2015.  Awarded for 3rd position in who is the best competition (C Language) in Annual Event, 2015 by Dezyne E′cole College.  Attended Government Skill Development Program at college NDLM (National Digital Literacy Mission).  Attended Government Skill Development Program at college PMKVY (Pradhan Mantri Kaushal Vikas Yojana).  Attended Government Skill Development Program at college NSDC (National Skill Development Corporation).
  • 9. 5 | P a g e Chapter – 1 Introduction of Information Technology (IT) Information Technology – Set of tools, processes, and methodologies (such as coding, programming, data communication, data conversion, storage & retrieval, system analysis & design, system control) and associated equipment employee to collect process and present information. In broad terms, it also includes office automation, multimedia and Tele – communication. Information Technology, a source we call the “computer”, that can show you what information via Tele-portal, scoping, working calibration for transmitting throughout the world. More commonly known as I.T. is the most popular career and the fastest growing industry in the world. There are several success stories about people who choose this field for a career and are now on top of their game. Few reasons for why people choose IT -  Low cost of education The biggest advantage of choosing information technology for a career is that it has very low cost of education as compared to many other career choices. You don’t need degree to become an I.T. professional. Instead, you can get quick training to be certified in specific areas of information technology. This way you save huge amounts of money that you may have otherwise spent on years of college tuition.  Fastest changing industry The information technology industry operates at a speed much faster than any other industry and for this reason, there’s always a significant demand for highly skilled workers with the innovations in cloud computing, big data and cyber security an aspiring I.T. professional has many avenues to pursue and grow from and I.T. professional never stops learning, and must always stay on top of the latest technology trend in order to be successful in the field. The more training and knowledge the I.T. professional has the more employable he or she will be.  Better income It is well known fact that information technology professionals are paid well, compared to other professionals. An I.T. professional with the right mix of certifications & experience can find a permanent position in either the public or private sector. Recently many companies have been extensively hiring experts in cloud computing, cyber security and network security to help enhance their current systems. Bachelor of Computer Application
  • 10. 6 | P a g e BCA is a part of information technology. In this age of computers and everything being digitalized, knowledge about machines is very important. It helps the person have a distinct advantage over the others who do not have a degree in computer applications. The domain is growing a rapid pace. In the 1990’s with the advent of globalization computers grew in prominence and slowly started to replace the paper and files in offices. It brought down the cost to quite an exist. BCA is a three year undergraduate degree course. Students will be taught subjects which are related to the technological applications that are requires in today’s practical work field. 1. Skills to be learnt – Students who study for a bachelor of computer application (BCA) will get skills and information not only about computer and information technology but also in communication, organization and management. One also get to learn programming languages such as C, C++, JAVA, JavaScript, HTML&CSS, SQL, Foxpro etc. 2. Career opportunities – BCA given a number of opportunities to individuals to go ahead and shine in their lives. The opportunities available for people doing BCA are galore. A few of them like software programmer, system and network administrator, web designer, faculty for computer science / communication technology etc. the range of chances in information technology are immense. According to our MDS University we have learnt many theory & practical subjects –  First Year o Management and accounting o Computer fundamental o PC software o Fundamentals of C Programming o Data structure and algorithm o Multimedia Basic  Second year o Communication skills o Database management system o Client server technology o Java Programming o C++ Programming o Computer Graphics  Third year o Visual Basic Programming o Relational database management system (ORACLE / SQL) o E - Commerce
  • 11. 7 | P a g e o Computer Network and Mobile Computing o Internet tools & website development (JavaScript, ASP) o Management Information System
  • 12. 8 | P a g e Chapter – 2 Introduction to Project The project titled “Your Helpmate” is Library Management System software for monitoring and controlling the transactions in a library. The project Library Management System is developed on visual basic language which mainly focuses on basic operation in a library like – adding new member, staff, new books & updating new information, searching books and members and facility to issue and return books and calculate penalty amount. Library Management System is a windows application designed to help users maintain & organize library. Our application is easy to use for both beginners & advanced users. It features a familiar and well thought – out, an attractive user interface, combined with strong searching, insertion & deletion capabilities. It can generate a library card for member of library. The application library management system has four main module –  Insertion, Deletion, Updation to database module – User friendly input screen.  Extracting from the database module –Attractive output screen.  Generate library card module – Issued books though card.  Search facility system Module – Search for books and members. The Library Management System is designed and develop for a receipt and issuance of books in the library along with the member’s details. The books received in the library are entered in books entry form and the new member is entered in the member entry form through staff. Why it is made – The main objective of this project is to provide a friendly environment to maintain the details of books and library members. The main purpose of this project is replace the manually work. What Language – Visual Basic 6.0 Language Visual basic (VB) is a 3rd generation event-driven programming language developed by Microsoft for their operating system windows. Visual basic is a widely understood high level programming language, written using simple English. Like – words & syntax. It is an interpreted language. Code can be run immediately after being written. Having an interpreter makes its simpler to use, as there is no need for the computer to compile the code, possibly finding errors to fix, before the compiled version can be run. Once the code is working, it can be compiled into an .exe file so that it will run on all modern windows computers, whether VB is installed or not. The language allows a beginning programmer to produce professional – looking windows applications, as its include drawing tools to create normal windows and
  • 13. 9 | P a g e structures which allow programs to be adapted for use with the internet. VB will not run on operating systems other than windows. Visual Basic has its origin in basic which was developed round about the year 1960, when high level languages were just being introduced to the computer community. Microsoft has made it extremely powerful by gearing all its good features to the windows environment. Evaluation of Visual Basic – VB 1.0 was introduced in 1991. The drag and drop design for creating the user interface is derived from prototype from generator developed by Allan cooper and his company called Tripod. Microsoft contracted with cooper and his associates to develop Tripod into a programmable form system for windows 3.0, under the code name Ruby (no relation to the Ruby programming language). Tripod did not include a programming language at all. Microsoft decided to combine Ruby with the basic language to create Visual Basic. Need of Visual Basic – Visual Basic is easy to learn programming language. With Visual Basic you can develop windows based applications and Games. Visual Basic is much easier to learn than others language (like Visual C++), and yet it’s powerful programming language. Visual Basic suite more for desktop application developing than for Games developing. You can create sophisticated games using Visual Basic, Visual Basic will be probably powerful enough to suite all your application and games programming needs. Integrated Development Environment – The working environment in VB is often referred to as the Integrated Development Environment or IDE, because it integrates many different functions such as design, editing, compiling and debugging within a common environment. Since all our projects are developed only in the IDE.
  • 14. 10 | P a g e Chapter – 3 Project & Their Facilities Library Management System is a project which aims in developing a computerized system to maintain all the daily work of library. This project has many features which are generally not available in normal Library Management System like – Staff login. It has also a facility where member issue a book so all details of books issue date and return date show. It has a facility where we add a new member so member card will be create for member. Overall this project is ours is being developed to help the schools, organizations, college to maintain the library in the best way possible and also reduce the human efforts. Here is a list of some features which are in provided in this application –  Keep records of different categories like – IT Books, other Books, Journals, and Magazines etc.  Classify the books subject wise.  Easy way to enter new books.  Easy way to Log-In and Log-Out.  Automatic Fine calculation for late returns.  Different criteria for searching a book.  No need to invest heavily on hardware. Objective of Library Management System – 1. Automation –The application automates each and every activity of the manual system and increases its throughput. Thus the response time of the system is very less and it works very fast. 2. Accuracy – The application provides the user a quick response with very accurate information regarding the user etc. any details or system in an accurate manner, as when required. 3. User Friendly – The application Library Management System has a very user friendly interface. Thus the users will full very easy to work on it. The application provides accuracy along with a pleasant interface. Make the present manual system more interactive, speedy and user friendly. 4. Availability – The all transaction of books stored permanently in the database admin can see the data in the availability of any information, whatever needed. 5. Maintain Cost – Reduce the cost of maintenance. It is standalone application so no required of cost for maintain it.
  • 15. 11 | P a g e Chapter – 4 Project Design The project design process is not a step by step. But still much of design work depends on knowledge and experience of the designs, when we start working on project design, we will face different types of problems. However, following considerations should be kept in mind during the project design phase: Design Objectives – The primary objective of the design of course, is to deliver the requirements as specified already. In general the following design objectives kept in mind. Practically – The system must be stable and can be operated by people with average. Efficiency – This involves accuracy, timeliness, and comprehensiveness to the system output. Cost – It is desirable to aim for a system with a minimum cost subject to the condition that it must satisfy all requirements & maintain maintenance. Flexibility – The system should be modifiable depending on the changing needs if the user. It should also be portable to different computer system but not other than Windows OS. Security – This is very important aspect of the design and should cover areas of hardware reliability, fall back procedures, physical security if the data. System design involves first logical design and then physical construction of the system. Major Project Design Activities – Several development activities are carried out during structured design. They are database design, implementation planning, and system interface. Design Process – The system design process is an exercise of specifying how, the system will work. It is an interactive process which is based on what the system will be do as shown in the report. Mainly following two parts have been included in the system design process.
  • 16. 12 | P a g e 1. Output Design – The starting point of the design process is the proper knowledge of system requirements which will normally be converted on terms of output. 2. Input Design – Once the output requirements have been finalized the next step in to find out what data need to be made available to the system to procedure the desired outputs. Data Flow Diagrams of Library Management System:  DFD Level 0  DFD Level 1  DFD Level 2 Admin / Staff Library Management System Request Response Admin / Staff Library Management System Database Request Request Response Response Admin / Staff Library Management System Database Interaction Store in MS Access
  • 17. 13 | P a g e  DFD Level 3 Admin / Staff Library Management System Database Interaction Store in MS Access Display Message Configuration Author Book Publisher Book Issue Member Staff Subject Categories Book Return Fine (If any) Insert, Save, Update, Save Update, Delete, Search
  • 18. 14 | P a g e  DFD Level 4 Admin / Staff Library Management System Database Interaction Store in MS Access Display Message Configuration Library Cards Update Security Daily News Application Form Forgot Password
  • 19. 15 | P a g e Chapter – 5 Database Development This activity deals with the design of the physical database. A key is to determine how the access path art to be implemented. As a programmer, we are expected to design and develop any program that works correctly efficiently and the time is easy to be used by every person, who may or may not be well versed with computer and its capabilities. The project is based on the Library Management System, Being the Information System it requires extensive use of some Database Management System to store, manipulate & handle the huge and complex record. In DBMS we can act various attributes with the database like editing the records, modifications, deletions of the records, view the records in various formats, listing the database etc. MS Access – Microsoft Access is an office product that allows the user to create relational databases that have tables of data. MS Access stores data in its own format based on the Access Jet Database Engine. It can also import or link directly to data stored in other applications & databases. It’s an easy to use tool for quickly creating browser based database applications. In very simple term, MS Access is an Information Management tool that helps you store information for reference, reporting & analysis. Microsoft Access helps you analyze large amount of information, and manage related data more efficient than MS Excel or other spreadsheet applications. In our project we create 10 tables in MS Access-  Book Info Field Name Data Type ISBN Number Staff Name Text Publisher Memo Author Memo Book Name Memo Subject Text Price Number Rack No. No. of Books Books Edition Publish Date Book Categories Image Id Number Number Text Date/Time Text Text Number  Staff
  • 20. 16 | P a g e Field Name Data Type ID Number User Name Text Staff Type Text First Name Text Last Name Text Address Text Contact No. Text Adhaar Password Sec Ques1 Ans1 Sec Ques2 Ans2 Image Education DOB Text Text Text Text Text Text Text Text Date/Time  Author Field Name Data Type ID Number Name Memo Address Memo Contact No. Text Image Text  Publisher Field Name Data Type ID Number Name Memo Address Memo Contact No. Text Image Text  Members Field Name Data Type ID Number First Name Last Name Member Type Text Text Text Address Ref. Name Ref. Department Ref. Contact Text Text Text Text
  • 21. 17 | P a g e Father Name Email Education Text Text Text Contact No. Text DOB Member Image Ref. Image Date/Time Text Text  Book Issue Field Name Data Type ID Number Book Text Issue Date Date/Time Return Date Date/Time Book Issued Copies Left Book Categories Fine Number Number Text Number  Book Return Field Name Data Type ID Number Book Text Issued Date Date/Time Return Date Date/Time Fine Time Number Date/Time  Book Categories Field Name Data Type ID Number Book Type Text  Login Field Name Data Type Type Text User Name Text Password Text First Name Text Last Name Text  Daily News
  • 22. 18 | P a g e Field Name Data Type Date Date/Time Add Author Number Delete Author Number Update Author Number Add Publisher Delete Publisher Update Publisher Add Staff Delete Staff Update Staff Add Member Delete Member Update Member Add Book Delete Book Update Book Add Book Issue Delete Book Issue Update Book Issue Add Book Return Delete Book Return Update Book Return Add Book Category Delete Category Update Category Cards Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number Number All Forms and Coding of our project:  Splash Screen
  • 23. 19 | P a g e Dim path As String Dim i, j As Integer Private Sub Form_Activate() adrs = CurDir End Sub Private Sub Form_Load() i = 1 Dim c% Call connect With dailyrs Do Until .EOF If .Fields(0) <> Date Then c = 0 Else c = 1 Exit Do End If .MoveNext Loop If c = 0 Then .AddNew .Fields(0) = Date .Update End If End With End Sub Private Sub Timer1_Timer() i = i + 1 If i < 10 Then
  • 24. 20 | P a g e path = "d:lms project 2imagegif" & i & ".jpg" Image2.Picture = LoadPicture(path) Else Timer1.Enabled = False Timer2.Enabled = True End If End Sub Private Sub Timer2_Timer() Me.Left = Screen.Width / 2 - Me.Width / 2 Me.Top = Screen.Height / 2 - Me.Height / 2 Me.Height = Me.Height - 300 Me.Width = Me.Width - 463 If Me.Height < 300 Or Me.Width < 300 Then Timer2.Enabled = False Unload Me login.Show End If End Sub  Login Page
  • 25. 21 | P a g e Dim tm, ci As Integer Private Sub Form_Load() login.Left = Screen.Width / 2 - login.Width / 2 login.Top = Screen.Height / 2 - login.Height / 2 Label2.Left = login.Width - Label2.Width Label2.BackColor = RGB(110, 110, 110) Label6.BackColor = RGB(170, 170, 170) Label7.BackColor = RGB(170, 170, 170) Label8.BackColor = RGB(170, 170, 170) Label9.ForeColor = RGB(30, 30, 30) End Sub Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Label2.BackColor = RGB(110, 110, 110) Label2.ForeColor = RGB(255, 255, 255) Label6.BackColor = RGB(170, 170, 170) Label6.ForeColor = RGB(0, 0, 0) Label7.BackColor = RGB(170, 170, 170) Label7.ForeColor = RGB(0, 0, 0) Label8.BackColor = RGB(170, 170, 170) Label8.ForeColor = RGB(0, 0, 0) End Sub Private Sub Label2_Click() Me.WindowState = 1 End Sub Private Sub Label2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Label2.BackColor = RGB(170, 170, 170) Label2.ForeColor = RGB(64, 64, 64) End Sub Private Sub Label6_Click()
  • 26. 22 | P a g e ChDrive (Left(adrs, 1)) ChDir (Right(adrs, Len(adrs) - 2)) Call connect If Combo1.Text <> "" Then If Len(Text1.Text) > 0 Then If Len(Text2.Text) > 0 Then Do Until rs.EOF If rs.Fields(0) = Combo1.Text And rs.Fields(1) = Text1.Text And rs.Fields(2) = Text2.Text Then fn = rs.Fields(3) + " " + rs.Fields(4) Do Until staffrs.EOF If staffrs.Fields(3) = rs.Fields(3) Then id = Val(staffrs.Fields(0)) img = staffrs.Fields(13) End If staffrs.MoveNext Loop If Combo1.Text = "Admin" Then Else menu.Label6(1).Enabled = False menu.Label6(2).Enabled = False menu.Label6(4).Enabled = False End If welcome.Show ci = 1 Exit Do Else ci = 0
  • 27. 23 | P a g e End If rs.MoveNext Loop If ci = 0 Then MsgBox ("Your are not authorized") Text1 = "" Text2 = "" Text1.SetFocus End If Else MsgBox "Please insert password" End If Else MsgBox "Please insert user name" End If Else MsgBox "Please select user type" End If End Sub Private Sub Label6_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Label6.BackColor = RGB(128, 128, 128) Label6.ForeColor = RGB(220, 220, 220) End Sub Private Sub Label7_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Label7.BackColor = RGB(128, 128, 128) Label7.ForeColor = RGB(220, 220, 220) End Sub Private Sub Label8_Click() Call connect
  • 28. 24 | P a g e If Combo1.Text <> "" Then If Text1.Text <> "" Then Do Until rs.EOF If Text1.Text = rs.Fields(1) Then tr = Text1.Text Unload Me forgot.Show c = 1 Exit Do Else End If rs.MoveNext Loop If c = 0 Then MsgBox "please enter correct user name" End If Else MsgBox "please enter user name" End If Else MsgBox "Please select user type" End If End Sub Private Sub Label8_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Label8.BackColor = RGB(128, 128, 128) Label8.ForeColor = RGB(220, 220, 220) End Sub Private Sub Label7_Click() Unload Me
  • 29. 25 | P a g e a = MsgBox("Good To See You", vbExclamation = vbOKOnly, "Bye") = vbCancel End Sub  Forgot Password Form Private Sub label3_Click() Call connect If Text4.Text <> "" Then If Text5.Text <> "" Then With staffrs Do Until .EOF If tr = .Fields(1) Then If Text4.Text = .Fields(10) And Text5.Text = .Fields(12) Then MsgBox "Your Password is " & .Fields(8) Unload Me login.Show Else MsgBox "Please contact with Your Main Administrater" Unload Me End If End If
  • 30. 26 | P a g e .MoveNext Loop End With Else MsgBox "please give second question answer" End If Else MsgBox "please give first question answer" End If End Sub Private Sub Label2_Click() MsgBox "Please contact with Your Main Administrater" Unload Me End Sub Private Sub Form_Load() forgot.Left = Screen.Width / 2 - forgot.Width / 2 forgot.Top = Screen.Height / 2 - forgot.Height / 2 Call connect With staffrs Do Until .EOF If tr = .Fields(1) Then Text1.Text = .Fields(9) Text2.Text = .Fields(11) End If .MoveNext Loop End With End Sub Private Sub Form_Unload(Cancel As Integer)
  • 31. 27 | P a g e Unload Me login.Show End Sub Private Sub Text4_KeyPress(KeyAscii As Integer) If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Text5_KeyPress(KeyAscii As Integer) If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub  Home Page or Menu Pages
  • 32. 28 | P a g e Dim menucheck As Boolean Dim a, b, c, quote_no As Integer Dim qoute As String Dim r As Integer Private Sub Form_Activate() Label27.ForeColor = RGB(20, 20, 20) r = Rnd(r) * 50 Call connect With qs Do Until .EOF If r = .Bookmark Then quote = .Fields(0)
  • 33. 29 | P a g e quote_no = .Fields(1) Label27.Caption = quote .Delete .Update End If .MoveNext Loop .MoveLast .AddNew .Fields(0) = quote .Fields(1) = quote_no .Update End With End Sub Private Sub Form_Click() For i = 0 To 7 Label6(i).Visible = False Next For i = 0 To 1 Label7(i).Visible = False Next For i = 0 To 4 Label8(i).Visible = False Next menucheck = False End Sub Private Sub Form_Load() Timer2.Enabled = True Label25.Caption = Time menu.Left = Screen.Width / 2 - menu.Width / 2 menu.Top = Screen.Height / 2 - menu.Height / 2 Label1.Left = menu.Width - Label1.Width Label1.BackColor = RGB(110, 110, 110) Shape2.FillColor = RGB(200, 200, 200) Label26.ForeColor = RGB(30, 30, 30) ' title bar Label3.BackColor = RGB(200, 200, 200) Label4.BackColor = RGB(200, 200, 200) Label5.BackColor = RGB(200, 200, 200) Call connect Label15.Caption = members.RecordCount Label16.Caption = birs.RecordCount ad = 0 st = 0 Do Until staffrs.EOF
  • 34. 30 | P a g e If staffrs.Fields(2) = "Admin" Then ad = ad + 1 ElseIf staffrs.Fields(2) = "Staff" Then st = st + 1 End If staffrs.MoveNext Loop Label17.Caption = ad Label18.Caption = st Label19.Caption = bcatrs.RecordCount Label20.Caption = bookrs.RecordCount Label21.Caption = publishers.RecordCount Label23.Caption = authorrs.RecordCount End Sub Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) If menucheck = False Then Label3.BackColor = RGB(200, 200, 200) Label3.ForeColor = RGB(0, 0, 0) Label4.BackColor = RGB(200, 200, 200) Label4.ForeColor = RGB(0, 0, 0) Label5.BackColor = RGB(200, 200, 200) Label5.ForeColor = RGB(0, 0, 0) End If Label6(0).BackColor = RGB(240, 240, 240) Label6(1).BackColor = RGB(240, 240, 240) Label6(2).BackColor = RGB(240, 240, 240) Label6(3).BackColor = RGB(240, 240, 240) Label6(4).BackColor = RGB(240, 240, 240) Label6(5).BackColor = RGB(240, 240, 240) Label6(6).BackColor = RGB(240, 240, 240) Label6(7).BackColor = RGB(240, 240, 240) Label7(0).BackColor = RGB(240, 240, 240) Label7(1).BackColor = RGB(240, 240, 240) Label8(0).BackColor = RGB(240, 240, 240) Label8(1).BackColor = RGB(240, 240, 240) Label8(2).BackColor = RGB(240, 240, 240) Label8(3).BackColor = RGB(240, 240, 240) Label8(4).BackColor = RGB(240, 240, 240) Label6(0).ForeColor = RGB(0, 0, 0) Label6(1).ForeColor = RGB(0, 0, 0) Label6(2).ForeColor = RGB(0, 0, 0) Label6(3).ForeColor = RGB(0, 0, 0) Label6(4).ForeColor = RGB(0, 0, 0)
  • 35. 31 | P a g e Label6(5).ForeColor = RGB(0, 0, 0) Label6(6).ForeColor = RGB(0, 0, 0) Label6(7).ForeColor = RGB(0, 0, 0) Label7(0).ForeColor = RGB(0, 0, 0) Label7(1).ForeColor = RGB(0, 0, 0) Label8(0).ForeColor = RGB(0, 0, 0) Label8(1).ForeColor = RGB(0, 0, 0) Label8(2).ForeColor = RGB(0, 0, 0) Label8(3).ForeColor = RGB(0, 0, 0) Label8(4).ForeColor = RGB(0, 0, 0) End Sub Private Sub Label1_Click() Me.WindowState = 1 End Sub Private Sub Label3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Label3.BackColor = RGB(200, 200, 200) Label3.ForeColor = RGB(0, 0, 0) Label4.BackColor = RGB(200, 200, 200) Label4.ForeColor = RGB(0, 0, 0) Label5.BackColor = RGB(200, 200, 200) Label5.ForeColor = RGB(0, 0, 0) Label3.BackColor = RGB(150, 150, 150) Label3.ForeColor = RGB(240, 240, 240) End Sub Private Sub Label4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Label3.BackColor = RGB(200, 200, 200) Label3.ForeColor = RGB(0, 0, 0) Label4.BackColor = RGB(200, 200, 200) Label4.ForeColor = RGB(0, 0, 0) Label5.BackColor = RGB(200, 200, 200) Label5.ForeColor = RGB(0, 0, 0) Label4.BackColor = RGB(150, 150, 150) Label4.ForeColor = RGB(240, 240, 240) End Sub Private Sub Label5_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Label3.BackColor = RGB(200, 200, 200) Label3.ForeColor = RGB(0, 0, 0) Label5.BackColor = RGB(200, 200, 200) Label5.ForeColor = RGB(0, 0, 0) Label4.BackColor = RGB(200, 200, 200) Label4.ForeColor = RGB(0, 0, 0)
  • 36. 32 | P a g e Label5.BackColor = RGB(150, 150, 150) Label5.ForeColor = RGB(240, 240, 240) End Sub Private Sub Label3_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If menucheck = True Then For i = 0 To 1 Label7(i).Visible = False Next For i = 0 To 4 Label8(i).Visible = False Next For j = 0 To 7 Label6(j).Visible = False Next End If If Button = 1 Then For i = 0 To 7 Label6(i).Visible = True Next End If menucheck = True a = 1: b = 0: c = 0 Timer3.Enabled = True End Sub Private Sub Label4_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If menucheck = True Then For i = 0 To 1 Label7(i).Visible = False Next For i = 0 To 4 Label8(i).Visible = False Next For j = 0 To 7 Label6(j).Visible = False Next End If If Button = 1 Then For i = 0 To 1 Label7(i).Visible = True Next End If menucheck = True
  • 37. 33 | P a g e a = 0: b = 1: c = 0 Timer3.Enabled = True End Sub Private Sub Label5_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If menucheck = True Then For i = 0 To 1 Label7(i).Visible = False Next For i = 0 To 4 Label8(i).Visible = False Next For j = 0 To 7 Label6(j).Visible = False Next End If If Button = 1 Then For i = 0 To 4 Label8(i).Visible = True Next End If menucheck = True a = 0: b = 0: c = 1 Timer3.Enabled = True End Sub Private Sub Label6_Click(Index As Integer) Unload Me If Index = 0 Then book.Show ElseIf Index = 1 Then author.Show ElseIf Index = 2 Then publisher.Show ElseIf Index = 3 Then subject.Show ElseIf Index = 4 Then staff.Show ElseIf Index = 5 Then login.Show ElseIf Index = 6 Then member1.Show ElseIf Index = 7 Then MsgBox "Good to see you" Else
  • 38. 34 | P a g e MsgBox "Good To See You" End If End Sub Private Sub Label6_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single) Label6(0).BackColor = RGB(240, 240, 240) Label6(1).BackColor = RGB(240, 240, 240) Label6(2).BackColor = RGB(240, 240, 240) Label6(3).BackColor = RGB(240, 240, 240) Label6(4).BackColor = RGB(240, 240, 240) Label6(5).BackColor = RGB(240, 240, 240) Label6(6).BackColor = RGB(240, 240, 240) Label6(7).BackColor = RGB(240, 240, 240) Label6(0).ForeColor = RGB(0, 0, 0) Label6(1).ForeColor = RGB(0, 0, 0) Label6(2).ForeColor = RGB(0, 0, 0) Label6(3).ForeColor = RGB(0, 0, 0) Label6(4).ForeColor = RGB(0, 0, 0) Label6(5).ForeColor = RGB(0, 0, 0) Label6(6).ForeColor = RGB(0, 0, 0) Label6(7).ForeColor = RGB(0, 0, 0) Label6(Index).BackColor = RGB(180, 180, 180) Label6(Index).ForeColor = RGB(240, 240, 240) End Sub Private Sub Label7_Click(Index As Integer) Unload Me If Index = 0 Then Book_issue.Show ElseIf Index = 1 Then book_Return.Show End If End Sub Private Sub Label7_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single) Label7(0).BackColor = RGB(240, 240, 240) Label7(1).BackColor = RGB(240, 240, 240) Label7(0).ForeColor = RGB(0, 0, 0) Label7(1).ForeColor = RGB(0, 0, 0) Label7(Index).BackColor = RGB(180, 180, 180) Label7(Index).ForeColor = RGB(240, 240, 240) End Sub Private Sub Label8_Click(Index As Integer) Call connect Unload Me
  • 39. 35 | P a g e If Index = 0 Then updat.Show ElseIf Index = 1 Then about.Show ElseIf Index = 2 Then Cards.Show ElseIf Index = 3 Then Set application_form.DataSource = rs application_form.Show ElseIf Index = 4 Then daily_news.Show End If End Sub Private Sub Label8_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single) For i = 0 To 4 Label8(i).BackColor = RGB(240, 240, 240) Label8(i).ForeColor = RGB(0, 0, 0) Next Label8(Index).BackColor = RGB(180, 180, 180) Label8(Index).ForeColor = RGB(240, 240, 240) End Sub Private Sub Timer1_Timer() If Right(Time, 2) = "PM" Then If Left(Time, 1) < 4 Then Label2.Caption = "Good Noon " + fn ElseIf Left(Time, 1) < 8 And Left(Time, 1) >= 4 Then Label2.Caption = "Good Evening " + fn Else Label2.Caption = "Good Night " + fn End If Else Label2.Caption = "Good Morning " + fn End If End Sub Private Sub Timer2_Timer() Label25.Caption = Time End Sub  Welcome Page
  • 40. 36 | P a g e Dim a As Integer Private Sub Form_Activate() Timer2.Enabled = True End Sub Private Sub Form_Load() a = 0 login.Hide menu.Show Label2.Caption = Label2.Caption + " " + fn Timer1.Enabled = True welcome.Left = Screen.Width welcome.Top = Screen.Height - 1600 Image1.Picture = LoadPicture(img) End Sub Private Sub Timer1_Timer() a = a + 1 If a = 5 Then Timer1.Enabled = False Timer2.Enabled = False Unload Me End If End Sub Private Sub Timer2_Timer() If welcome.Left > Screen.Width - 4500 Then welcome.Left = welcome.Left - 30 End If End Sub  Add New Book Page
  • 41. 37 | P a g e Dim temp2 As Variant Dim up As Integer Dim a As Integer Dim bok As Integer Dim txt As String Private Sub Label12_Click() CommonDialog1.ShowOpen CommonDialog1.Filter = "Image|*.jpg|*.bmp|*.*" CommonDialog1.InitDir = "d:lms project 2" Image1.Picture = LoadPicture(CommonDialog1.FileName) End Sub Private Sub Label14_Click() bok = Val(Text7.Text) + Val(InputBox("How many books You want to add", "Add")) End Sub Private Sub Label15_Click() Call connect If Text2.Text = "" And bookrs.RecordCount > 0 Then
  • 42. 38 | P a g e With bookrs Text9.Text = .Fields(1) Combo2.Text = .Fields(2) Text1.Text = .Fields(5) Text2.Text = .Fields(0) Text4.Text = .Fields(4) Text3.Text = .Fields(6) Text5.Text = .Fields(7) Text7.Text = .Fields(8) Text6.Text = .Fields(9) Combo5.Text = .Fields(3) DTPicker1.Value = .Fields(10) Combo1.Text = .Fields(11) Image1.Picture = LoadPicture(.Fields(12)) Text12.Text = .Fields(13) End With ElseIf Text2.Text <> "" And bookrs.RecordCount > 0 Then With bookrs Do Until .EOF If Text2.Text = .Fields(0) Then .MoveNext Exit Do End If .MoveNext Loop If .EOF = False Then Text9.Text = .Fields(1) Combo2.Text = .Fields(2) Text1.Text = .Fields(5) Text2.Text = .Fields(0)
  • 43. 39 | P a g e Text4.Text = .Fields(4) Text3.Text = .Fields(6) Text5.Text = .Fields(7) Text7.Text = .Fields(8) Text6.Text = .Fields(9) Combo5.Text = .Fields(3) DTPicker1.Value = .Fields(10) Combo1.Text = .Fields(11) Image1.Picture = LoadPicture(.Fields(12)) Text12.Text = .Fields(13) End If End With End If End Sub Private Sub Label16_Click() Call connect If Text2.Text = "" And bookrs.RecordCount > 0 Then With bookrs .MoveLast Text9.Text = .Fields(1) Combo2.Text = .Fields(2) Text1.Text = .Fields(5) Text2.Text = .Fields(0) Text4.Text = .Fields(4) Text3.Text = .Fields(6) Text5.Text = .Fields(7) Text7.Text = .Fields(8) Text6.Text = .Fields(9) Combo5.Text = .Fields(3) DTPicker1.Value = .Fields(10)
  • 44. 40 | P a g e Combo1.Text = .Fields(11) Image1.Picture = LoadPicture(.Fields(12)) Text12.Text = .Fields(13) End With ElseIf Text2.Text <> "" And bookrs.RecordCount > 0 Then With bookrs .MoveLast Text9.Text = .Fields(1) Combo2.Text = .Fields(2) Text1.Text = .Fields(5) Text2.Text = .Fields(0) Text4.Text = .Fields(4) Text3.Text = .Fields(6) Text5.Text = .Fields(7) Text7.Text = .Fields(8) Text6.Text = .Fields(9) Combo5.Text = .Fields(3) DTPicker1.Value = .Fields(10) Combo1.Text = .Fields(11) Image1.Picture = LoadPicture(.Fields(12)) Text12.Text = .Fields(13) End With End If End Sub Private Sub Label17_Click() Call connect If Text2.Text = "" And bookrs.RecordCount > 0 Then With bookrs Text9.Text = .Fields(1) Combo2.Text = .Fields(2)
  • 45. 41 | P a g e Text1.Text = .Fields(5) Text2.Text = .Fields(0) Text4.Text = .Fields(4) Text3.Text = .Fields(6) Text5.Text = .Fields(7) Text7.Text = .Fields(8) Text6.Text = .Fields(9) Combo5.Text = .Fields(3) DTPicker1.Value = .Fields(10) Combo1.Text = .Fields(11) Image1.Picture = LoadPicture(.Fields(12)) Text12.Text = .Fields(13) End With ElseIf Text2.Text <> "" And bookrs.RecordCount > 0 Then With bookrs Do Until .EOF If Text2.Text = .Fields(0) Then .MovePrevious Exit Do End If .MoveNext Loop If .BOF = False Then Text9.Text = .Fields(1) Combo2.Text = .Fields(2) Text1.Text = .Fields(5) Text2.Text = .Fields(0) Text4.Text = .Fields(4) Text3.Text = .Fields(6) Text5.Text = .Fields(7)
  • 46. 42 | P a g e Text7.Text = .Fields(8) Text6.Text = .Fields(9) Combo5.Text = .Fields(3) DTPicker1.Value = .Fields(10) Combo1.Text = .Fields(11) Image1.Picture = LoadPicture(.Fields(12)) Text12.Text = .Fields(13) End If End With End If End Sub Private Sub Label18_Click() Call connect If Text2.Text = "" And bookrs.RecordCount > 0 Then With bookrs Text9.Text = .Fields(1) Combo2.Text = .Fields(2) Text1.Text = .Fields(5) Text2.Text = .Fields(0) Text4.Text = .Fields(4) Text3.Text = .Fields(6) Text5.Text = .Fields(7) Text7.Text = .Fields(8) Text6.Text = .Fields(9) Combo5.Text = .Fields(3) DTPicker1.Value = .Fields(10) Combo1.Text = .Fields(11) Image1.Picture = LoadPicture(.Fields(12)) Text12.Text = .Fields(13) End With
  • 47. 43 | P a g e ElseIf Text2.Text <> "" And bookrs.RecordCount > 0 Then With bookrs .MoveFirst Text9.Text = .Fields(1) Combo2.Text = .Fields(2) Text1.Text = .Fields(5) Text2.Text = .Fields(0) Text4.Text = .Fields(4) Text3.Text = .Fields(6) Text5.Text = .Fields(7) Text7.Text = .Fields(8) Text6.Text = .Fields(9) Combo5.Text = .Fields(3) DTPicker1.Value = .Fields(10) Combo1.Text = .Fields(11) Image1.Picture = LoadPicture(.Fields(12)) Text12.Text = .Fields(13) End With End If End Sub Private Sub Label20_Click() Call connect If Option3.Value = True Then If Len(Text11.Text) > 0 Then With bookrs Do Until .EOF If Val(Trim(Text11.Text)) = Trim(.Fields(0)) Then Text9.Text = .Fields(1) Combo2.Text = .Fields(2) Text1.Text = .Fields(5)
  • 48. 44 | P a g e Text2.Text = .Fields(0) Text4.Text = .Fields(4) Text3.Text = .Fields(6) Text5.Text = .Fields(7) Text7.Text = .Fields(8) Text6.Text = .Fields(9) Combo5.Text = .Fields(3) DTPicker1.Value = .Fields(10) Combo1.Text = .Fields(11) Image1.Picture = LoadPicture(.Fields(12)) Text12.Text = .Fields(13) Exit Do End If .MoveNext Loop End With Else MsgBox "Please mention ISBN NO. of Books" End If ElseIf Option4.Value = True Then If Len(Text10.Text) > 0 Then With bookrs Do Until .EOF If Trim(Text10.Text) = Trim(.Fields(4)) Then Text9.Text = .Fields(1) Combo2.Text = .Fields(2) Text1.Text = .Fields(5) Text2.Text = .Fields(0) Text4.Text = .Fields(4) Text3.Text = .Fields(6)
  • 49. 45 | P a g e Text5.Text = .Fields(7) Text7.Text = .Fields(8) Text6.Text = .Fields(9) Combo5.Text = .Fields(3) DTPicker1.Value = .Fields(10) Combo1.Text = .Fields(11) Image1.Picture = LoadPicture(.Fields(12)) Text12.Text = .Fields(13) Exit Do End If .MoveNext Loop End With Else MsgBox "Please mention Book Name" End If End If End Sub Private Sub label24_Click() Frame2.Enabled = False Label23.Enabled = True Label22.Enabled = False Label27.Enabled = False Label25.Enabled = False Label24.Enabled = False Combo2.Enabled = True: Combo2.Text = "" Text1.Text = "": Text1.Enabled = True Text2.Text = "": Text2.Enabled = True Text4.Text = "": Text4.Enabled = True Text3.Text = "": Text3.Enabled = True
  • 50. 46 | P a g e Text5.Text = "": Text5.Enabled = True Text7.Text = "": Text7.Enabled = True Text6.Text = "": Text6.Enabled = True Combo5.Text = "": Combo5.Enabled = True Combo1.Text = "": Combo1.Enabled = True Image1.Picture = LoadPicture(""): Label12.Enabled = True DTPicker1.Enabled = True Text9.Text = fn DTPicker1.Value = Date Call connect Combo1.Clear Combo2.Clear Combo5.Clear Do Until authorrs.EOF Combo5.AddItem authorrs.Fields(1) authorrs.MoveNext Loop Do Until publishers.EOF Combo2.AddItem publishers.Fields(1) publishers.MoveNext Loop Do Until bcatrs.EOF Combo1.AddItem bcatrs.Fields(1) bcatrs.MoveNext Loop With bookrs Do Until .EOF a = .Fields(13) .MoveNext Loop
  • 51. 47 | P a g e End With a = a + 1 Text12.Text = a End Sub Private Sub label23_Click() ChDrive (Left(adrs, 1)) ChDir (Right(adrs, Len(adrs) - 2)) Call connect If Combo2.Text <> "" Then If Len(Text1.Text) > 0 Then If Len(Text2.Text) > 0 Then If Len(Text4.Text) > 0 Then If Len(Text3.Text) > 0 Then If Len(Text5.Text) > 0 Then If Len(Text7.Text) > 0 Then If Len(Text6.Text) > 0 Then If Combo5.Text <> "" Then If Combo1.Text <> "" Then If LoadPicture("") <> Image1.Picture Then With bookrs .AddNew .Fields(0).Value = Val(Text2.Text) .Fields(1).Value = Text9.Text .Fields(2).Value = Combo2.Text .Fields(3).Value = Combo5.Text .Fields(4).Value = Text4.Text .Fields(5).Value = Text1.Text .Fields(6).Value = Val(Text3.Text) .Fields(7).Value = Val(Text5.Text) .Fields(8).Value = Val(Text7.Text)
  • 52. 48 | P a g e .Fields(9).Value = Text6.Text .Fields(10).Value = DTPicker1.Value .Fields(11).Value = Combo1.Text .Fields(12) = ".imagebooks" + CommonDialog1.FileTitle SavePicture Image1.Picture, .Fields(12) .Fields(13) = Text12.Text .Update Do Until dailyrs.EOF If dailyrs.Fields(0) = Date Then dailyrs.Fields(13) = dailyrs.Fields(13) + 1 dailyrs.Update End If dailyrs.MoveNext Loop MsgBox "Book Record insert" Text9.Text = "": Text9.Enabled = False Combo2.Text = "": Combo2.Enabled = False Text1.Text = "": Text1.Enabled = False Text2.Text = "": Text2.Enabled = False Text4.Text = "": Text4.Enabled = False Text3.Text = "": Text3.Enabled = False Text5.Text = "": Text5.Enabled = False Text7.Text = "": Text7.Enabled = False Text6.Text = "": Text6.Enabled = False Combo5.Text = "": Combo5.Enabled = False Combo1.Text = "": Combo1.Enabled = False Image1.Picture = LoadPicture(""): Label12.Enabled = False DTPicker1.Enabled = False UpDown1.Enabled = True UpDown1.Enabled = False
  • 53. 49 | P a g e Frame2.Enabled = True Label22.Enabled = True Label24.Enabled = True Label25.Enabled = True Label23.Enabled = False Label27.Enabled = False End With Else MsgBox "Please select Book Image" End If Else MsgBox "Please Select Book Category" Combo1.SetFocus End If Else MsgBox "Please Select Book Author" Combo5.SetFocus End If Else MsgBox "Please Insert Book Edition" Text6.SetFocus End If Else MsgBox "Please Insert No. of Books" Text7.SetFocus End If Else MsgBox "Please Insert Rack No." Text5.SetFocus End If
  • 54. 50 | P a g e Else MsgBox "Please Insert Book Price" Text3.SetFocus End If Else MsgBox "Please Insert Book Name" Text4.SetFocus End If Else MsgBox "Please Insert ISBN No." Text2.SetFocus End If Else MsgBox "Please Insert Subject" Text1.SetFocus End If Else MsgBox "Please Select Publisher" Combo2.SetFocus End If End Sub Private Sub Label22_Click() Dim author, publisher, category As String Call connect If Len(Text3.Text) > 0 Then Frame2.Enabled = False Label22.Enabled = False Label23.Enabled = False Label24.Enabled = False Label25.Enabled = False
  • 55. 51 | P a g e Label26.Enabled = True Label27.Enabled = True Label14.Enabled = True Label29.Enabled = True Combo2.Enabled = True Text1.Enabled = True Text2.Enabled = True Text4.Enabled = True Text3.Enabled = True Text5.Enabled = True Text7.Enabled = True Text6.Enabled = True Combo5.Enabled = True Combo1.Enabled = True Label12.Enabled = True DTPicker1.Enabled = True category = Combo1.Text publisher = Combo2.Text author = Combo5.Text Combo1.Clear Combo2.Clear Combo5.Clear Do Until authorrs.EOF Combo5.AddItem authorrs.Fields(1) authorrs.MoveNext Loop Do Until publishers.EOF Combo2.AddItem publishers.Fields(1) publishers.MoveNext Loop
  • 56. 52 | P a g e Do Until bcatrs.EOF Combo1.AddItem bcatrs.Fields(1) bcatrs.MoveNext Loop Combo1.Text = category Combo2.Text = publisher Combo5.Text = author Else MsgBox "Please select a record" End If End Sub Private Sub Label25_Click() Call connect If Len(Text2.Text) > 0 Then Do Until bookrs.EOF If Val(Text2.Text) = bookrs.Fields(0) Then bookrs.Delete Text9.Text = "" Combo2.Text = "": Combo2.Clear Text1.Text = "" Text2.Text = "" Text4.Text = "" Text3.Text = "" Text5.Text = "" Text7.Text = "" Text6.Text = "" Combo5.Text = "": Combo5.Clear Combo1.Text = "": Combo1.Clear Image1.Picture = LoadPicture("") Do Until dailyrs.EOF
  • 57. 53 | P a g e If dailyrs.Fields(0) = Date Then dailyrs.Fields(14) = dailyrs.Fields(14) + 1 dailyrs.Update End If dailyrs.MoveNext Loop MsgBox "Data Deleted" End If bookrs.MoveNext Loop Else MsgBox "Please Select Record" End If End Sub Private Sub Label26_Click() Frame2.Enabled = True Label22.Enabled = True Label24.Enabled = True Label25.Enabled = True Label23.Enabled = False Label27.Enabled = False Label14.Enabled = False Label29.Enabled = False Combo2.Enabled = False: Combo2.Clear Text1.Enabled = False: Text1.Text = "" Text2.Enabled = False: Text2.Text = "" Text4.Enabled = False: Text4.Text = "" Text3.Enabled = False: Text3.Text = "" Text5.Enabled = False: Text5.Text = "" Text7.Enabled = False: Text7.Text = ""
  • 58. 54 | P a g e Text6.Enabled = False: Text6.Text = "" Combo5.Enabled = False: Combo5.Clear Combo1.Enabled = False: Combo1.Clear Label12.Enabled = False: Image1.Picture = LoadPicture("") DTPicker1.Enabled = False End Sub Private Sub Form_Load() book.Left = Screen.Width / 2 - book.Width / 2 book.Top = Screen.Height / 2 - book.Height / 2 Text9.Enabled = False Combo2.Enabled = False Text1.Enabled = False Text2.Enabled = False Text4.Enabled = False Combo5.Enabled = False Text5.Enabled = False Text7.Enabled = False Text6.Enabled = False Text3.Enabled = False DTPicker1.Enabled = False End Sub Private Sub Form_Unload(Cancel As Integer) Unload Me menu.Show Text9 = "" End Sub Private Sub Label21_Click() Call connect If bookrs.RecordCount < 1 Then MsgBox "There have no Book"
  • 59. 55 | P a g e Else list_book.Show End If End Sub Private Sub Label27_Click() ChDrive (Left(adrs, 1)) ChDir (Right(adrs, Len(adrs) - 2)) Call connect If Combo2.Text <> "" Then If Len(Text1.Text) > 0 Then If Len(Text2.Text) > 0 Then If Len(Text4.Text) > 0 Then If Len(Text3.Text) > 0 Then If Len(Text5.Text) > 0 Then If Len(Text7.Text) > 0 Then If Len(Text6.Text) > 0 Then If Combo5.Text <> "" Then If Combo1.Text <> "" Then If LoadPicture("") <> Image1.Picture Then With bookrs Do Until .EOF If Val(Trim(Text12.Text)) = .Fields(13) Then Print .Fields(13) .Fields(0).Value = Val(Text2.Text) .Fields(1).Value = Text9.Text .Fields(2).Value = Combo2.Text .Fields(3).Value = Combo5.Text .Fields(4).Value = Text4.Text .Fields(5).Value = Text1.Text .Fields(6).Value = Val(Text3.Text)
  • 60. 56 | P a g e .Fields(7).Value = Val(Text5.Text) .Fields(8).Value = bok .Fields(9).Value = Text6.Text .Fields(10).Value = DTPicker1.Value .Fields(11).Value = Combo1.Text If Len(CommonDialog1.FileTitle) > 0 Then .Fields(12) = ".imagebooks" + CommonDialog1.FileTitle SavePicture Image1.Picture, .Fields(12) End If .Update Do Until dailyrs.EOF If dailyrs.Fields(0) = Date Then dailyrs.Fields(15) = dailyrs.Fields(15) + 1 dailyrs.Update End If dailyrs.MoveNext Loop MsgBox "Book Record update" Text9.Text = "": Text9.Enabled = False Combo2.Text = "": Combo2.Enabled = False Text1.Text = "": Text1.Enabled = False Text2.Text = "": Text2.Enabled = False Text4.Text = "": Text4.Enabled = False Text3.Text = "": Text3.Enabled = False Text5.Text = "": Text5.Enabled = False Text7.Text = "": Text7.Enabled = False Text6.Text = "": Text6.Enabled = False Combo5.Text = "": Combo5.Enabled = False Combo1.Text = "": Combo1.Enabled = False Image1.Picture = LoadPicture(""): Label12.Enabled = False
  • 61. 57 | P a g e DTPicker1.Enabled = False Frame2.Enabled = True Label22.Enabled = True Label24.Enabled = True Label25.Enabled = True Label23.Enabled = False Label27.Enabled = False Label14.Enabled = False Label29.Enabled = False End If .MoveNext Loop End With Else MsgBox "Please select Book Image" End If Else MsgBox "Please Select Book Category" Combo1.SetFocus End If Else MsgBox "Please Select Book Author" Combo5.SetFocus End If Else MsgBox "Please Insert Book Edition" Text6.SetFocus End If Else MsgBox "Please Insert No. of Books"
  • 62. 58 | P a g e Text7.SetFocus End If Else MsgBox "Please Insert Rack No." Text5.SetFocus End If Else MsgBox "Please Insert Book Price" Text3.SetFocus End If Else MsgBox "Please Insert Book Name" Text4.SetFocus End If Else MsgBox "Please Insert ISBN No." Text2.SetFocus End If Else MsgBox "Please Insert Subject" Text1.SetFocus End If Else MsgBox "Please Select Publisher" Combo2.SetFocus End If End Sub Private Sub Label28_Click() Timer1.Enabled = True End Sub
  • 63. 59 | P a g e Private Sub Label29_Click() bok = Val(Text7.Text) - Val(InputBox("How many books You want to less", "Less")) If bok < 0 Then MsgBox "Sorry, Have no Enough Book" bok = Val(Text7.Text) Else End If End Sub Private Sub Option3_Click() If Option3.Value = True Then Text10.Enabled = False Text10.Text = "" Text11.Enabled = True End If End Sub Private Sub Option4_Click() If Option4.Value = True Then Text11.Enabled = False Text11.Text = "" Text10.Enabled = True End If End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Text11_KeyPress(KeyAscii As Integer) If Not IsNumeric(Text11.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then KeyAscii = 0
  • 64. 60 | P a g e End If End Sub Private Sub Text2_KeyPress(KeyAscii As Integer) If Not IsNumeric(Text2.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Text2_LostFocus() If Len(Text2.Text) < 8 Then If Text2.Enabled = True Then Text2.SetFocus Else End If End If Call connect With bookrs Do Until .EOF If .Fields(0) = Text2.Text Then MsgBox "ISBN already exist" Text2.SetFocus End If .MoveNext Loop End With End Sub Private Sub Text3_KeyPress(KeyAscii As Integer) If Not IsNumeric(Text3.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub
  • 65. 61 | P a g e Private Sub Text5_KeyPress(KeyAscii As Integer) If Not IsNumeric(Text5.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Text7_KeyPress(KeyAscii As Integer) If Not IsNumeric(Text7.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Timer1_Timer() If up = 0 Then If Frame5.Top > 7220 Then Label28.Top = Label28.Top - 20 Frame5.Top = Frame5.Top - 20 Else Timer1.Enabled = False up = 1 End If Else If Frame5.Top < 7830 Then Label28.Top = Label28.Top + 20 Frame5.Top = Frame5.Top + 20 Else Timer1.Enabled = False up = 0 End If End If End Sub  Add New Author Page
  • 66. 62 | P a g e Dim up As Integer Dim a As Integer Private Sub Combo1_Click() Call connect With authorrs Do Until .EOF If Combo1.Text = .Fields(0) Then Text1 = .Fields(1) Text2 = .Fields(2) Text4 = .Fields(3) Image1.Picture = LoadPicture(.Fields(4)) End If .MoveNext Loop End With End Sub Private Sub Label15_Click() Call connect
  • 67. 63 | P a g e If Combo1.Text = "" And authorrs.RecordCount > 0 Then Combo1.Text = authorrs.Fields(0) Text1.Text = authorrs.Fields(1) Text2.Text = authorrs.Fields(2) Text4.Text = authorrs.Fields(3) Image1.Picture = LoadPicture(authorrs.Fields(4)) ElseIf Combo1.Text <> "" And authorrs.RecordCount > 0 Then Do Until authorrs.EOF If Combo1.Text = authorrs.Fields(0) Then authorrs.MoveNext Exit Do End If authorrs.MoveNext Loop If authorrs.EOF = False Then Combo1.Text = authorrs.Fields(0) Text1.Text = authorrs.Fields(1) Text2.Text = authorrs.Fields(2) Text4.Text = authorrs.Fields(3) Image1.Picture = LoadPicture(authorrs.Fields(4)) End If End If End Sub Private Sub Label16_Click() Call connect If Combo1.Text = "" And authorrs.RecordCount > 0 Then authorrs.MoveLast Combo1.Text = authorrs.Fields(0) Text1.Text = authorrs.Fields(1) Text2.Text = authorrs.Fields(2)
  • 68. 64 | P a g e Text4.Text = authorrs.Fields(3) Image1.Picture = LoadPicture(authorrs.Fields(4)) ElseIf Combo1.Text <> "" And authorrs.RecordCount > 0 Then authorrs.MoveLast Combo1.Text = authorrs.Fields(0) Text1.Text = authorrs.Fields(1) Text2.Text = authorrs.Fields(2) Text4.Text = authorrs.Fields(3) Image1.Picture = LoadPicture(authorrs.Fields(4)) End If End Sub Private Sub Label17_Click() Call connect If Combo1.Text = "" And authorrs.RecordCount > 0 Then Combo1.Text = authorrs.Fields(0) Text1.Text = authorrs.Fields(1) Text2.Text = authorrs.Fields(2) Text4.Text = authorrs.Fields(3) Image1.Picture = LoadPicture(authorrs.Fields(4)) ElseIf Combo1.Text <> "" And authorrs.RecordCount > 0 Then Do Until authorrs.EOF If Combo1.Text = authorrs.Fields(0) Then authorrs.MovePrevious Exit Do End If authorrs.MoveNext Loop If authorrs.BOF = False Then Combo1.Text = authorrs.Fields(0) Text1.Text = authorrs.Fields(1)
  • 69. 65 | P a g e Text2.Text = authorrs.Fields(2) Text4.Text = authorrs.Fields(3) Image1.Picture = LoadPicture(authorrs.Fields(4)) End If End If End Sub Private Sub Label18_Click() Call connect If Combo1.Text = "" And authorrs.RecordCount > 0 Then Combo1.Text = authorrs.Fields(0) Text1.Text = authorrs.Fields(1) Text2.Text = authorrs.Fields(2) Text4.Text = authorrs.Fields(3) Image1.Picture = LoadPicture(authorrs.Fields(4)) ElseIf Combo1.Text <> "" And authorrs.RecordCount > 0 Then authorrs.MoveFirst Combo1.Text = authorrs.Fields(0) Text1.Text = authorrs.Fields(1) Text2.Text = authorrs.Fields(2) Text4.Text = authorrs.Fields(3) Image1.Picture = LoadPicture(authorrs.Fields(4)) End If End Sub Private Sub Label20_Click() Call connect If Option3.Value = True Then If Len(Text11.Text) > 0 Then authorrs.MoveFirst Do Until authorrs.EOF If Val(Text11.Text) = authorrs.Fields(0) Then
  • 70. 66 | P a g e Combo1.Text = authorrs.Fields(0) Text1.Text = authorrs.Fields(1) Text2.Text = authorrs.Fields(2) Text4.Text = authorrs.Fields(3) Image1.Picture = LoadPicture(authorrs.Fields(4)) Exit Do End If authorrs.MoveNext Loop Else MsgBox "Please mention ID" End If ElseIf Option4.Value = True Then If Len(Text10.Text) > 0 Then authorrs.MoveFirst Do Until authorrs.EOF If Text10.Text = authorrs.Fields(1) Then Combo1.Text = authorrs.Fields(0) Text1.Text = authorrs.Fields(1) Text2.Text = authorrs.Fields(2) Text4.Text = authorrs.Fields(3) Image1.Picture = LoadPicture(authorrs.Fields(4)) Exit Do End If authorrs.MoveNext Loop Else MsgBox "Please mention Name" End If End If
  • 71. 67 | P a g e End Sub Private Sub Label21_Click() If authorrs.RecordCount > 0 Then list_authors.Show Else MsgBox "There have no authors" End If End Sub Private Sub label24_Click() Frame2.Enabled = False Label23.Enabled = True Label26.Enabled = True Label24.Enabled = False Label25.Enabled = False Label22.Enabled = False Label27.Enabled = False Label12.Enabled = True Combo1.Text = "" Text1.Text = "" Text2.Text = "" Text4.Text = "" Image1.Picture = LoadPicture("") Combo1.Enabled = False Text1.Enabled = True Text2.Enabled = True Text4.Enabled = True Call connect With authorrs Do Until .EOF a = .Fields(0)
  • 72. 68 | P a g e .MoveNext Loop End With a = a + 1 Combo1.Text = a End Sub Private Sub label23_Click() ChDrive (Left(adrs, 1)) ChDir (Right(adrs, Len(adrs) - 2)) Call connect If Len(Text1.Text) > 0 Then If Len(Text2.Text) > 0 Then If Len(Text4.Text) > 0 Then If LoadPicture("") <> Image1.Picture Then With authorrs .AddNew .Fields(0) = Combo1.Text .Fields(1) = Text1.Text .Fields(2) = Text2.Text .Fields(3) = Text4.Text .Fields(4) = ".imageauthor" + CommonDialog1.FileTitle SavePicture Image1.Picture, .Fields(4) .Update End With Do Until dailyrs.EOF If dailyrs.Fields(0) = Date Then dailyrs.Fields(1) = dailyrs.Fields(1) + 1 dailyrs.Update End If dailyrs.MoveNext
  • 73. 69 | P a g e Loop MsgBox "Data Saved" Combo1.Text = "" Text1.Text = "" Text2.Text = "" Text4.Text = "" Image1.Picture = LoadPicture("") Text1.Enabled = False Text2.Enabled = False Text4.Enabled = False Label12.Enabled = False Frame2.Enabled = True Label23.Enabled = False Label27.Enabled = False Label25.Enabled = True Label22.Enabled = True Label24.Enabled = True Label26.Enabled = True Else MsgBox "Please select author profile" End If Else Text4.SetFocus MsgBox "please insert contact no." End If Else Text2.SetFocus MsgBox "please insert addresss" End If Else
  • 74. 70 | P a g e Text1.SetFocus MsgBox "please insert name" End If End Sub Private Sub Form_Load() author.Left = Screen.Width / 2 - author.Width / 2 author.Top = Screen.Height / 2 - author.Height / 2 Call connect End Sub Private Sub Form_Unload(Cancel As Integer) Unload Me menu.Show End Sub Private Sub Label12_Click() CommonDialog1.ShowOpen Image1.Picture = LoadPicture(CommonDialog1.FileName) End Sub Private Sub Label22_Click() Call connect Frame2.Enabled = False Label22.Enabled = False Label23.Enabled = False Label24.Enabled = False Label25.Enabled = False Label26.Enabled = True Label27.Enabled = True Combo1.Enabled = True Text1.Enabled = True Text2.Enabled = True Text4.Enabled = True
  • 75. 71 | P a g e Label12.Enabled = True Combo1.Clear Do Until authorrs.EOF Combo1.AddItem authorrs.Fields(0) authorrs.MoveNext Loop End Sub Private Sub Label25_Click() Call connect If Combo1.Text <> "" Then Do Until authorrs.EOF If Combo1.Text = authorrs.Fields(0) Then authorrs.Delete Combo1.Clear Text1.Text = "" Text2.Text = "" Text4.Text = "" Image1.Picture = LoadPicture("") Do Until dailyrs.EOF If dailyrs.Fields(0) = Date Then dailyrs.Fields(2) = dailyrs.Fields(2) + 1 dailyrs.Update End If dailyrs.MoveNext Loop MsgBox "Data Deleted" End If authorrs.MoveNext Loop Else
  • 76. 72 | P a g e MsgBox "Please Select Record" End If End Sub Private Sub Label26_Click() Frame2.Enabled = True Label23.Enabled = False Label27.Enabled = False Label25.Enabled = True Label22.Enabled = True Label24.Enabled = True Label26.Enabled = True Text1.Enabled = False Text2.Enabled = False Text4.Enabled = False Label12.Enabled = False Image1.Picture = LoadPicture("") Combo1.Text = "" Combo1.Enabled = False Text1.Text = "" Text2.Text = "" Text4.Text = "" End Sub Private Sub Label27_Click() ChDrive (Left(adrs, 1)) ChDir (Right(adrs, Len(adrs) - 2)) Call connect With authorrs If Len(Text1.Text) > 0 Then If Len(Text2.Text) > 0 Then If Len(Text4.Text) > 0 Then
  • 77. 73 | P a g e If LoadPicture("") <> Image1.Picture Then Do Until .EOF If Combo1.Text = .Fields(0) Then .Fields(1) = Text1 .Fields(2) = Text2.Text .Fields(3) = Text4.Text If Len(CommonDialog1.FileTitle) > 0 Then .Fields(4) = ".imageauthor" + CommonDialog1.FileTitle SavePicture Image1.Picture, .Fields(4) Else End If .Update Do Until dailyrs.EOF If dailyrs.Fields(0) = Date Then dailyrs.Fields(3) = dailyrs.Fields(3) + 1 dailyrs.Update End If dailyrs.MoveNext Loop MsgBox ("Data Updated") Text1.Text = "" Exit Do End If .MoveNext Loop Frame2.Enabled = True Label23.Enabled = False Label27.Enabled = False Label25.Enabled = True Label22.Enabled = True
  • 78. 74 | P a g e Label24.Enabled = True Label26.Enabled = True Text1.Text = "" Text2.Text = "" Text4.Text = "" Combo1.Clear Label12.Enabled = False Image1.Picture = LoadPicture("") Combo1.Enabled = False Text1.Enabled = False Text2.Enabled = False Text4.Enabled = False Else MsgBox "Please Select Image" End If Else Text4.SetFocus MsgBox "Please Enter Contact No." End If Else Text2.SetFocus MsgBox "Please Enter Address" End If Else Text1.SetFocus MsgBox "Please Enter Author Name" End If End With End Sub Private Sub Label28_Click()
  • 79. 75 | P a g e Timer1.Enabled = True End Sub Private Sub Option3_Click() If Option3.Value = True Then Text10.Enabled = False Text10.Text = "" Text11.Enabled = True End If End Sub Private Sub Option4_Click() If Option4.Value = True Then Text11.Enabled = False Text11.Text = "" Text10.Enabled = True End If End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not KeyAscii = 8 And KeyAscii = 32 Then KeyAscii = 0 End If End Sub Private Sub Text10_KeyPress(KeyAscii As Integer) If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not KeyAscii = 8 And KeyAscii = 32 Then KeyAscii = 0 End If End Sub Private Sub Text11_KeyPress(KeyAscii As Integer) If Not IsNumeric(Text11.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then KeyAscii = 0
  • 80. 76 | P a g e End If End Sub Private Sub Text4_KeyPress(KeyAscii As Integer) If Not IsNumeric(Text4.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Timer1_Timer() If up = 0 Then If Frame5.Top > 5380 Then Label28.Top = Label28.Top - 20 Frame5.Top = Frame5.Top - 20 Else Timer1.Enabled = False : up = 1 End If Else If Frame5.Top < 6000 Then Label28.Top = Label28.Top + 20 Frame5.Top = Frame5.Top + 20 Else Timer1.Enabled = False : up = 0 End If End If End Sub  Add New Publisher Page
  • 81. 77 | P a g e Dim up As Integer Dim a As Integer Private Sub Combo1_Click() Call connect With publishers Do Until .EOF If Combo1.Text = .Fields(0) Then Text1 = .Fields(1) Text2 = .Fields(2) Text4 = .Fields(3) Image1.Picture = LoadPicture(.Fields(4)) End If .MoveNext Loop End With End Sub Private Sub Form_Load() publisher.Left = Screen.Width / 2 - publisher.Width / 2 publisher.Top = Screen.Height / 2 - publisher.Height / 2
  • 82. 78 | P a g e Call connect End Sub Private Sub Form_Unload(Cancel As Integer) Unload Me menu.Show End Sub Private Sub Label12_Click() CommonDialog1.ShowOpen CommonDialog1.Filter = "Image|*.jpg|*.bmp|*.*" CommonDialog1.InitDir = "d:lms project 2" Image1.Picture = LoadPicture(CommonDialog1.FileName) End Sub Private Sub Label15_Click() Call connect If Combo1.Text = "" And publishers.RecordCount > 0 Then Combo1.Text = publishers.Fields(0) Text1.Text = publishers.Fields(1) Text2.Text = publishers.Fields(2) Text4.Text = publishers.Fields(3) Image1.Picture = LoadPicture(publishers.Fields(4)) ElseIf Combo1.Text <> "" And publishers.RecordCount > 0 Then Do Until publishers.EOF If Combo1.Text = publishers.Fields(0) Then publishers.MoveNext Exit Do End If publishers.MoveNext Loop If publishers.EOF = False Then
  • 83. 79 | P a g e Combo1.Text = publishers.Fields(0) Text1.Text = publishers.Fields(1) Text2.Text = publishers.Fields(2) Text4.Text = publishers.Fields(3) Image1.Picture = LoadPicture(publishers.Fields(4)) End If End If End Sub Private Sub Label16_Click() Call connect If Combo1.Text = "" And publishers.RecordCount > 0 Then publishers.MoveLast Combo1.Text = publishers.Fields(0) Text1.Text = publishers.Fields(1) Text2.Text = publishers.Fields(2) Text4.Text = publishers.Fields(3) Image1.Picture = LoadPicture(publishers.Fields(4)) ElseIf Combo1.Text <> "" And publishers.RecordCount > 0 Then publishers.MoveLast Combo1.Text = publishers.Fields(0) Text1.Text = publishers.Fields(1) Text2.Text = publishers.Fields(2) Text4.Text = publishers.Fields(3) Image1.Picture = LoadPicture(publishers.Fields(4)) End If End Sub Private Sub Label17_Click() Call connect If Combo1.Text = "" And publishers.RecordCount > 0 Then
  • 84. 80 | P a g e Combo1.Text = publishers.Fields(0) Text1.Text = publishers.Fields(1) Text2.Text = publishers.Fields(2) Text4.Text = publishers.Fields(3) Image1.Picture = LoadPicture(publishers.Fields(4)) ElseIf Combo1.Text <> "" And publishers.RecordCount > 0 Then Do Until publishers.EOF If Combo1.Text = publishers.Fields(0) Then publishers.MovePrevious Exit Do End If publishers.MoveNext Loop If publishers.BOF = False Then Combo1.Text = publishers.Fields(0) Text1.Text = publishers.Fields(1) Text2.Text = publishers.Fields(2) Text4.Text = publishers.Fields(3) Image1.Picture = LoadPicture(publishers.Fields(4)) End If End If End Sub Private Sub Label18_Click() Call connect If Combo1.Text = "" And publishers.RecordCount > 0 Then Combo1.Text = publishers.Fields(0) Text1.Text = publishers.Fields(1) Text2.Text = publishers.Fields(2) Text4.Text = publishers.Fields(3)
  • 85. 81 | P a g e Image1.Picture = LoadPicture(publishers.Fields(4)) ElseIf Combo1.Text <> "" And publishers.RecordCount > 0 Then publishers.MoveFirst Combo1.Text = publishers.Fields(0) Text1.Text = publishers.Fields(1) Text2.Text = publishers.Fields(2) Text4.Text = publishers.Fields(3) Image1.Picture = LoadPicture(publishers.Fields(4)) End If End Sub Private Sub Label20_Click() Call connect If Option3.Value = True Then If Len(Text11.Text) > 0 Then Do Until publishers.EOF If Val(Text11.Text) = publishers.Fields(0) Then Combo1.Text = publishers.Fields(0) Text1.Text = publishers.Fields(1) Text2.Text = publishers.Fields(2) Text4.Text = publishers.Fields(3) Image1.Picture = LoadPicture(publishers.Fields(4)) Exit Do End If publishers.MoveNext Loop Else MsgBox "Please mention ID" End If ElseIf Option4.Value = True Then
  • 86. 82 | P a g e If Len(Text10.Text) > 0 Then Do Until publishers.EOF If Text10.Text = publishers.Fields(1) Then Combo1.Text = publishers.Fields(0) Text1.Text = publishers.Fields(1) Text2.Text = publishers.Fields(2) Text4.Text = publishers.Fields(3) Image1.Picture = LoadPicture(publishers.Fields(4)) Exit Do End If publishers.MoveNext Loop Else MsgBox "Please mention Name" End If End If End Sub Private Sub Label21_Click() If publishers.RecordCount > 0 Then list_publishers.Show Else MsgBox "There have no publishers" End If End Sub Private Sub Label22_Click() Call connect Frame2.Enabled = False Label22.Enabled = False Label23.Enabled = False
  • 87. 83 | P a g e Label24.Enabled = False Label25.Enabled = False Label26.Enabled = True Label27.Enabled = True Combo1.Enabled = True Text1.Enabled = True Text2.Enabled = True Text4.Enabled = True Label12.Enabled = True Combo1.Clear Do Until publishers.EOF Combo1.AddItem publishers.Fields(0) publishers.MoveNext Loop End Sub Private Sub label23_Click() ChDrive (Left(adrs, 1)) ChDir (Right(adrs, Len(adrs) - 2)) Call connect If Len(Text1.Text) > 0 Then If Len(Text2.Text) > 0 Then If Len(Text4.Text) > 0 Then If LoadPicture("") <> Image1.Picture Then With publishers .AddNew .Fields(0) = Combo1.Text .Fields(1) = Text1.Text .Fields(2) = Text2.Text .Fields(3) = Text4.Text
  • 88. 84 | P a g e .Fields(4) = ".imagepublishers" + CommonDialog1.FileTitle SavePicture Image1.Picture, .Fields(4) .Update End With Do Until dailyrs.EOF If dailyrs.Fields(0) = Date Then dailyrs.Fields(4) = dailyrs.Fields(4) + 1 dailyrs.Update End If dailyrs.MoveNext Loop MsgBox "Data Saved" Combo1.Text = "" Text1.Text = "" Text2.Text = "" Text4.Text = "" Image1.Picture = LoadPicture("") Text1.Enabled = False Text2.Enabled = False Text4.Enabled = False Label12.Enabled = False Frame2.Enabled = True Label23.Enabled = False Label27.Enabled = False Label25.Enabled = True Label22.Enabled = True Label24.Enabled = True Label26.Enabled = True Else
  • 89. 85 | P a g e MsgBox "Please select author profile" End If Else Text4.SetFocus MsgBox "please insert contact no." End If Else Text2.SetFocus MsgBox "please insert addresss" End If Else Text1.SetFocus MsgBox "please insert name" End If End Sub Private Sub label24_Click() Frame2.Enabled = False Label23.Enabled = True Label26.Enabled = True Label24.Enabled = False Label25.Enabled = False Label22.Enabled = False Label27.Enabled = False Call connect Combo1.Text = "" Combo1.Enabled = False Text1.Text = "" Text2.Text = "" Text4.Text = ""
  • 90. 86 | P a g e Image1.Picture = LoadPicture("") Text1.Enabled = True Text2.Enabled = True Text4.Enabled = True Label12.Enabled = True With publishers Do Until .EOF a = .Fields(0) .MoveNext Loop End With a = a + 1 Combo1.Text = a End Sub Private Sub Label25_Click() Call connect If Combo1.Text <> "" Then Do Until publishers.EOF If Combo1.Text = publishers.Fields(0) Then publishers.Delete Combo1.Clear Text1.Text = "" Text2.Text = "" Text4.Text = "" Image1.Picture = LoadPicture("") Do Until dailyrs.EOF If dailyrs.Fields(0) = Date Then dailyrs.Fields(5) = dailyrs.Fields(5) + 1 dailyrs.Update
  • 91. 87 | P a g e End If dailyrs.MoveNext Loop MsgBox "Data Deleted" End If publishers.MoveNext Loop Else MsgBox "Please Select Record" End If End Sub Private Sub Label26_Click() Frame2.Enabled = True Label23.Enabled = False Label27.Enabled = False Label25.Enabled = True Label22.Enabled = True Label24.Enabled = True Label26.Enabled = True Text1.Enabled = False Text2.Enabled = False Text4.Enabled = False Label12.Enabled = False Image1.Picture = LoadPicture("") Text1.Text = "" Text2.Text = "" Text4.Text = "" Combo1.Text = "" End Sub
  • 92. 88 | P a g e Private Sub Label27_Click() ChDrive (Left(adrs, 1)) ChDir (Right(adrs, Len(adrs) - 2)) Call connect With publishers If Len(Text1.Text) > 0 Then If Len(Text2.Text) > 0 Then If Len(Text4.Text) > 0 Then If LoadPicture("") <> Image1.Picture Then Do Until .EOF If Combo1.Text = .Fields(0) Then .Fields(1) = Text1 .Fields(2) = Text2.Text .Fields(3) = Text4.Text If Len(CommonDialog1.FileTitle) > 0 Then .Fields(4) = ".imagepublishers" + CommonDialog1.FileTitle SavePicture Image1.Picture, .Fields(4) Else End If .Update Do Until dailyrs.EOF If dailyrs.Fields(0) = Date Then dailyrs.Fields(6) = dailyrs.Fields(6) + 1 dailyrs.Update End If dailyrs.MoveNext Loop MsgBox ("Data Updated") Text1.Text = ""
  • 93. 89 | P a g e Exit Do End If .MoveNext Loop Frame2.Enabled = True Label23.Enabled = False Label27.Enabled = False Label25.Enabled = True Label22.Enabled = True Label24.Enabled = True Label26.Enabled = True Text1.Text = "" Text2.Text = "" Text4.Text = "" Combo1.Clear Label12.Enabled = False Image1.Picture = LoadPicture("") Combo1.Enabled = False Text1.Enabled = False Text2.Enabled = False Text4.Enabled = False Else MsgBox "Please Select Image" End If Else Text4.SetFocus MsgBox "Please Enter Contact No." End If Else
  • 94. 90 | P a g e Text2.SetFocus MsgBox "Please Enter Address" End If Else Text1.SetFocus MsgBox "Please Enter Author Name" End If End With End Sub Private Sub Label28_Click() Timer1.Enabled = True End Sub Private Sub Option3_Click() If Option3.Value = True Then Text10.Enabled = False Text10.Text = "" Text11.Enabled = True End If End Sub Private Sub Option4_Click() If Option4.Value = True Then Text11.Enabled = False Text11.Text = "" Text10.Enabled = True End If End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not KeyAscii = 8 And Not KeyAscii = 32 Then
  • 95. 91 | P a g e KeyAscii = 0 End If End Sub Private Sub Text10_KeyPress(KeyAscii As Integer) If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not KeyAscii = 8 And KeyAscii = 32 Then KeyAscii = 0 End If End Sub Private Sub Text11_KeyPress(KeyAscii As Integer) If Not IsNumeric(Text11.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Text4_KeyPress(KeyAscii As Integer) If Not IsNumeric(Text4.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Timer1_Timer() If up = 0 Then If Frame5.Top > 5380 Then Label28.Top = Label28.Top - 20 Frame5.Top = Frame5.Top - 20 Else Timer1.Enabled = False up = 1 End If Else
  • 96. 92 | P a g e If Frame5.Top < 6000 Then Label28.Top = Label28.Top + 20 Frame5.Top = Frame5.Top + 20 Else Timer1.Enabled = False up = 0 End If End If End Sub  Add New Subject Category Page Dim up% Private Sub Form_Load() subject.Left = Screen.Width / 2 - subject.Width / 2 subject.Top = Screen.Height / 2 - subject.Height / 2 End Sub Private Sub Form_Unload(Cancel As Integer) Unload Me menu.Show End Sub
  • 97. 93 | P a g e Private Sub Label15_Click() Call connect If Combo1.Text = "" And bcatrs.RecordCount > 0 Then With bcatrs Combo1.Text = .Fields(0) Text1.Text = .Fields(1) End With ElseIf Combo1.Text <> "" And bcatrs.RecordCount > 0 Then With bcatrs Do Until .EOF If Val(Combo1.Text) = .Fields(0) Then .MoveNext Exit Do End If .MoveNext Loop If .EOF = False Then Combo1.Text = .Fields(0) Text1.Text = .Fields(1) End If End With End If End Sub Private Sub Label16_Click() Call connect If Combo1.Text = "" And bcatrs.RecordCount > 0 Then With bcatrs .MoveLast Combo1.Text = .Fields(0) Text1.Text = .Fields(1)
  • 98. 94 | P a g e End With ElseIf Combo1.Text <> "" And bcatrs.RecordCount > 0 Then With bcatrs .MoveLast Combo1.Text = .Fields(0) Text1.Text = .Fields(1) End With End If End Sub Private Sub Label17_Click() Call connect If Combo1.Text = "" And bcatrs.RecordCount > 0 Then With bcatrs Combo1.Text = .Fields(0) Text1.Text = .Fields(1) End With ElseIf Combo1.Text <> "" And bcatrs.RecordCount > 0 Then With bcatrs Do Until .EOF If Val(Combo1.Text) = .Fields(0) Then .MovePrevious Exit Do End If .MoveNext Loop If .BOF = False Then Combo1.Text = .Fields(0) Text1.Text = .Fields(1) End If End With
  • 99. 95 | P a g e End If End Sub Private Sub Label18_Click() Call connect If Combo1.Text = "" And bcatrs.RecordCount > 0 Then With bcatrs Combo1.Text = .Fields(0) Text1.Text = .Fields(1) End With ElseIf Combo1.Text <> "" And bcatrs.RecordCount > 0 Then With bcatrs .MoveFirst Combo1.Text = .Fields(0) Text1.Text = .Fields(1) End With End If End Sub Private Sub Label2_Click() Timer1.Enabled = True End Sub Private Sub Label20_Click() Call connect If Option3.Value = True Then If Len(Text11.Text) > 0 Then With bcatrs Do Until .EOF If Val(Trim(Text11.Text)) = Val(Trim(.Fields(0))) Then Combo1.Text = .Fields(0) Text1.Text = .Fields(1) Exit Do
  • 100. 96 | P a g e End If .MoveNext Loop End With Else MsgBox "Please mention ID NO." End If ElseIf Option4.Value = True Then If Len(Text10.Text) > 0 Then With bcatrs Do Until .EOF If Trim(Text10.Text) = Trim(.Fields(1)) Then Combo1.Text = .Fields(0) Text1.Text = .Fields(1) Exit Do End If .MoveNext Loop End With Else MsgBox "Please mention Member Category Name" End If End If End Sub Private Sub Label21_Click() Call connect If bcatrs.RecordCount < 1 Then MsgBox "Have no Category" Else list_categories.Show
  • 101. 97 | P a g e End If End Sub Private Sub Label22_Click() If Len(Combo1.Text) > 0 Then Text1.Enabled = True Frame2.Enabled = False Label22.Enabled = False Label23.Enabled = False Label24.Enabled = False Label25.Enabled = False Label26.Enabled = True Label27.Enabled = True Else MsgBox "Please selet a record" End If End Sub Private Sub label23_Click() Call connect If Len(Trim(Text1.Text)) > 0 Then With bcatrs .AddNew .Fields(0) = Combo1.Text .Fields(1) = Text1.Text .Update Do Until dailyrs.EOF If dailyrs.Fields(0) = Date Then dailyrs.Fields(22) = dailyrs.Fields(22) + 1 dailyrs.Update End If dailyrs.MoveNext
  • 102. 98 | P a g e Loop MsgBox "Record Saved" Combo1.Text = "" Text1.Text = "" Text1.Enabled = False Frame2.Enabled = True Label23.Enabled = False Label27.Enabled = False Label25.Enabled = True Label22.Enabled = True Label24.Enabled = True Label26.Enabled = True End With Else MsgBox "please Enter Category Name" Text1.SetFocus End If End Sub Private Sub label24_Click() Dim a% Frame2.Enabled = False Label23.Enabled = True Label26.Enabled = True Label24.Enabled = False Label25.Enabled = False Label22.Enabled = False Label27.Enabled = False Text1.Text = "" Combo1.Text = "" Text1.Enabled = True
  • 103. 99 | P a g e Call connect With bcatrs Do Until .EOF a = .Fields(0) .MoveNext Loop End With a = a + 1 Combo1.Text = a End Sub Private Sub Label25_Click() If Len(Combo1.Text) > 0 Then With bcatrs Do Until .EOF If Combo1.Text = .Fields(0) Then .Delete Combo1.Text = "" Text1.Text = "" Do Until dailyrs.EOF If dailyrs.Fields(0) = Date Then dailyrs.Fields(23) = dailyrs.Fields(23) + 1 dailyrs.Update End If dailyrs.MoveNext Loop MsgBox "Record deleted" End If .MoveNext Loop End With
  • 104. 100 | P a g e Else MsgBox "Please select a record" End If End Sub Private Sub Label26_Click() Frame2.Enabled = True Label23.Enabled = False Label27.Enabled = False Label25.Enabled = True Label22.Enabled = True Label24.Enabled = True Label26.Enabled = True Combo1.Enabled = False Text1.Enabled = False Combo1.Text = "" Text1.Text = "" End Sub Private Sub Label27_Click() Call connect If Len(Trim(Text1.Text)) > 0 Then With bcatrs Do Until .EOF If Val(Combo1.Text) = .Fields(0) Then .Fields(0) = Combo1.Text .Fields(1) = Text1.Text .Update End If .MoveNext Loop Do Until dailyrs.EOF
  • 105. 101 | P a g e If dailyrs.Fields(0) = Date Then dailyrs.Fields(24) = dailyrs.Fields(24) + 1 dailyrs.Update End If dailyrs.MoveNext Loop MsgBox "Record Saved" Combo1.Text = "" Text1.Text = "" Text1.Enabled = False Frame2.Enabled = True Label23.Enabled = False Label27.Enabled = False Label25.Enabled = True Label22.Enabled = True Label24.Enabled = True Label26.Enabled = True End With Else MsgBox "please Enter Category Name" Text1.SetFocus End If End Sub Private Sub Option3_Click() If Option3.Value = True Then Text10.Enabled = False Text10.Text = "" Text11.Enabled = True End If End Sub
  • 106. 102 | P a g e Private Sub Option4_Click() If Option4.Value = True Then Text11.Enabled = False Text11.Text = "" Text10.Enabled = True End If End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not KeyAscii = 8 And Not KeyAscii = 32 Then KeyAscii = 0 End If End Sub Private Sub Text10_KeyPress(KeyAscii As Integer) If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not KeyAscii = 8 And Not KeyAscii = 32 Then KeyAscii = 0 End If End Sub Private Sub Text11_KeyPress(KeyAscii As Integer) If Not IsNumeric(Text11.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Timer1_Timer() If up = 0 Then If Frame5.Top > 3740 Then Label2.Top = Label2.Top - 20 Frame5.Top = Frame5.Top - 20 Else Timer1.Enabled = False : up = 1
  • 107. 103 | P a g e End If Else If Frame5.Top < 4400 Then Label2.Top = Label2.Top + 20 Frame5.Top = Frame5.Top + 20 Else Timer1.Enabled = False : up = 0 End If End If End Sub  Add New Staff Page Dim up As Integer Private Sub Check1_Click() If Check1 = False Then Text5.PasswordChar = "*" Else Text5.PasswordChar = "" End If End Sub Private Sub Combo1_Click()
  • 108. 104 | P a g e Call connect With staffrs Do Until .EOF If Combo1.Text = .Fields(0) Then Text1 = .Fields(1) Combo2.Text = .Fields(2) Text2 = .Fields(3) Text3 = .Fields(4) Text4 = .Fields(5) Text9 = .Fields(6) Text8 = .Fields(7) Text5 = .Fields(8) Combo3 = .Fields(9) Text6 = .Fields(10) Combo4 = .Fields(11) Text7 = .Fields(12) Image1.Picture = LoadPicture(.Fields(13)) End If .MoveNext Loop End With End Sub Private Sub Combo3_Click() If Combo3.Text <> "Select Question" And Len(Combo3.Text) > 0 Then Text6.Enabled = True Else Text6.Enabled = False End If End Sub Private Sub Combo3_Change()
  • 109. 105 | P a g e If Combo3.Text <> "Select Question" And Len(Combo3.Text) > 0 Then Text6.Enabled = True Else Text6.Enabled = False End If End Sub Private Sub Combo4_Click() If Combo4.Text <> "Select Question" And Len(Combo4.Text) > 0 Then Text7.Enabled = True Else Text7.Enabled = False End If End Sub Private Sub Combo4_Change() If Combo4.Text <> "Select Question" And Len(Combo4.Text) > 0 Then Text7.Enabled = True Else Text7.Enabled = False End If End Sub Private Sub Command6_Click() Command7.Enabled = False Command1.Enabled = True Combo1.Text = "" Text1.Enabled = False Text2.Enabled = False Text3.Enabled = False Text4.Enabled = False Text5.Enabled = False Text6.Enabled = False
  • 110. 106 | P a g e Text7.Enabled = False Text8.Enabled = False Text9.Enabled = False Combo2.Enabled = False Combo3.Enabled = False Combo4.Enabled = False Combo1.Enabled = False Check1.Enabled = False Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" Image1.Picture = LoadPicture("") End Sub Private Sub label13_Click() CommonDialog1.ShowOpen CommonDialog1.Filter = "Image|*.jpg|*.bmp|*.*" CommonDialog1.InitDir = "d:lms project 2" Image1.Picture = LoadPicture(CommonDialog1.FileName) End Sub Private Sub Form_Load() staff.Left = Screen.Width / 2 - staff.Width / 2 staff.Top = Screen.Height / 2 - staff.Height / 2 End Sub Private Sub Form_Unload(Cancel As Integer)
  • 111. 107 | P a g e Unload Me menu.Show End Sub Private Sub Label16_Click() Call connect If Combo1.Text = "" And staffrs.RecordCount > 0 Then With staffrs .MoveLast Combo1.Text = .Fields(0) Text1.Text = .Fields(1) Combo2.Text = .Fields(2) Text2.Text = .Fields(3) Text3.Text = .Fields(4) Text4.Text = .Fields(5) Text9.Text = .Fields(6) Text8.Text = .Fields(7) Text5.Text = .Fields(8) Combo3.Text = .Fields(9) Text6.Text = .Fields(10) Combo4.Text = .Fields(11) Text7.Text = .Fields(12) Image1.Picture = LoadPicture(.Fields(13)) Text13.Text = .Fields(14) DTPicker1.Value = .Fields(15) End With ElseIf Combo1.Text <> "" And staffrs.RecordCount > 0 Then With staffrs .MoveLast Combo1.Text = .Fields(0) Text1.Text = .Fields(1)
  • 112. 108 | P a g e Combo2.Text = .Fields(2) Text2.Text = .Fields(3) Text3.Text = .Fields(4) Text4.Text = .Fields(5) Text9.Text = .Fields(6) Text8.Text = .Fields(7) Text5.Text = .Fields(8) Combo3.Text = .Fields(9) Text6.Text = .Fields(10) Combo4.Text = .Fields(11) Text7.Text = .Fields(12) Image1.Picture = LoadPicture(.Fields(13)) Text13.Text = .Fields(14) DTPicker1.Value = .Fields(15) End With End If End Sub Private Sub Label17_Click() Call connect If Combo1.Text = "" And staffrs.RecordCount > 0 Then With staffrs Combo1.Text = .Fields(0) Text1.Text = .Fields(1) Combo2.Text = .Fields(2) Text2.Text = .Fields(3) Text3.Text = .Fields(4) Text4.Text = .Fields(5) Text9.Text = .Fields(6) Text8.Text = .Fields(7) Text5.Text = .Fields(8)
  • 113. 109 | P a g e Combo3.Text = .Fields(9) Text6.Text = .Fields(10) Combo4.Text = .Fields(11) Text7.Text = .Fields(12) Image1.Picture = LoadPicture(.Fields(13)) Text13.Text = .Fields(14) DTPicker1.Value = .Fields(15) End With ElseIf Combo1.Text <> "" And staffrs.RecordCount > 0 Then With staffrs Do Until .EOF If Val(Combo1.Text) = .Fields(0) Then .MovePrevious Exit Do End If .MoveNext Loop If .BOF = False Then Combo1.Text = .Fields(0) Text1.Text = .Fields(1) Combo2.Text = .Fields(2) Text2.Text = .Fields(3) Text3.Text = .Fields(4) Text4.Text = .Fields(5) Text9.Text = .Fields(6) Text8.Text = .Fields(7) Text5.Text = .Fields(8) Combo3.Text = .Fields(9) Text6.Text = .Fields(10) Combo4.Text = .Fields(11)
  • 114. 110 | P a g e Text7.Text = .Fields(12) Image1.Picture = LoadPicture(.Fields(13)) Text13.Text = .Fields(14) DTPicker1.Value = .Fields(15) End If End With End If End Sub Private Sub Label18_Click() Call connect If Combo1.Text = "" And staffrs.RecordCount > 0 Then With staffrs Combo1.Text = .Fields(0) Text1.Text = .Fields(1) Combo2.Text = .Fields(2) Text2.Text = .Fields(3) Text3.Text = .Fields(4) Text4.Text = .Fields(5) Text9.Text = .Fields(6) Text8.Text = .Fields(7) Text5.Text = .Fields(8) Combo3.Text = .Fields(9) Text6.Text = .Fields(10) Combo4.Text = .Fields(11) Text7.Text = .Fields(12) Image1.Picture = LoadPicture(.Fields(13)) Text13.Text = .Fields(14) DTPicker1.Value = .Fields(15) End With ElseIf Combo1.Text <> "" And staffrs.RecordCount > 0 Then
  • 115. 111 | P a g e With staffrs .MoveFirst Combo1.Text = .Fields(0) Text1.Text = .Fields(1) Combo2.Text = .Fields(2) Text2.Text = .Fields(3) Text3.Text = .Fields(4) Text4.Text = .Fields(5) Text9.Text = .Fields(6) Text8.Text = .Fields(7) Text5.Text = .Fields(8) Combo3.Text = .Fields(9) Text6.Text = .Fields(10) Combo4.Text = .Fields(11) Text7.Text = .Fields(12) Image1.Picture = LoadPicture(.Fields(13)) Text13.Text = .Fields(14) DTPicker1.Value = .Fields(15) End With End If End Sub Private Sub Label19_Click() Call connect If Combo1.Text = "" And staffrs.RecordCount > 0 Then With staffrs Combo1.Text = .Fields(0) Text1.Text = .Fields(1) Combo2.Text = .Fields(2) Text2.Text = .Fields(3) Text3.Text = .Fields(4)
  • 116. 112 | P a g e Text4.Text = .Fields(5) Text9.Text = .Fields(6) Text8.Text = .Fields(7) Text5.Text = .Fields(8) Combo3.Text = .Fields(9) Text6.Text = .Fields(10) Combo4.Text = .Fields(11) Text7.Text = .Fields(12) Image1.Picture = LoadPicture(.Fields(13)) Text13.Text = .Fields(14) DTPicker1.Value = .Fields(15) End With ElseIf Combo1.Text <> "" And staffrs.RecordCount > 0 Then With staffrs Do Until .EOF If Val(Combo1.Text) = .Fields(0) Then .MoveNext Exit Do End If .MoveNext Loop If .EOF = False Then Combo1.Text = .Fields(0) Text1.Text = .Fields(1) Combo2.Text = .Fields(2) Text2.Text = .Fields(3) Text3.Text = .Fields(4) Text4.Text = .Fields(5) Text9.Text = .Fields(6) Text8.Text = .Fields(7)
  • 117. 113 | P a g e Text5.Text = .Fields(8) Combo3.Text = .Fields(9) Text6.Text = .Fields(10) Combo4.Text = .Fields(11) Text7.Text = .Fields(12) Image1.Picture = LoadPicture(.Fields(13)) Text13.Text = .Fields(14) DTPicker1.Value = .Fields(15) End If End With End If End Sub Private Sub Label20_Click() Call connect If Option3.Value = True Then If Len(Text11.Text) > 0 Then With staffrs Do Until .EOF If Val(Trim(Text11.Text)) = Val(.Fields(0)) Then Combo1.Text = .Fields(0) Text1.Text = .Fields(1) Combo2.Text = .Fields(2) Text2.Text = .Fields(3) Text3.Text = .Fields(4) Text4.Text = .Fields(5) Text9.Text = .Fields(6) Text8.Text = .Fields(7) Text5.Text = .Fields(8) Combo3.Text = .Fields(9) Text6.Text = .Fields(10)
  • 118. 114 | P a g e Combo4.Text = .Fields(11) Text7.Text = .Fields(12) Image1.Picture = LoadPicture(.Fields(13)) Text13.Text = .Fields(14) DTPicker1.Value = .Fields(15) Exit Do End If .MoveNext Loop End With Else MsgBox "Please mention ID NO." End If ElseIf Option4.Value = True Then If Len(Text10.Text) > 0 Then With staffrs Do Until .EOF If Trim(Text10.Text) = Trim(.Fields(7)) Then Combo1.Text = .Fields(0) Text1.Text = .Fields(1) Combo2.Text = .Fields(2) Text2.Text = .Fields(3) Text3.Text = .Fields(4) Text4.Text = .Fields(5) Text9.Text = .Fields(6) Text8.Text = .Fields(7) Text5.Text = .Fields(8) Combo3.Text = .Fields(9) Text6.Text = .Fields(10) Combo4.Text = .Fields(11)
  • 119. 115 | P a g e Text7.Text = .Fields(12) Image1.Picture = LoadPicture(.Fields(13)) Text13.Text = .Fields(14) DTPicker1.Value = .Fields(15) Exit Do End If .MoveNext Loop End With Else MsgBox "Please mention Adhaar No." End If ElseIf Option1.Value = True Then If Len(Text12.Text) > 0 Then With staffrs Do Until .EOF If Trim(Text12.Text) = Trim(.Fields(3)) Then Combo1.Text = .Fields(0) Text1.Text = .Fields(1) Combo2.Text = .Fields(2) Text2.Text = .Fields(3) Text3.Text = .Fields(4) Text4.Text = .Fields(5) Text9.Text = .Fields(6) Text8.Text = .Fields(7) Text5.Text = .Fields(8) Combo3.Text = .Fields(9) Text6.Text = .Fields(10) Combo4.Text = .Fields(11) Text7.Text = .Fields(12)
  • 120. 116 | P a g e Image1.Picture = LoadPicture(.Fields(13)) Text13.Text = .Fields(14) DTPicker1.Value = .Fields(15) Exit Do End If .MoveNext Loop End With Else MsgBox "Please mention First Name" End If End If End Sub Private Sub Label21_Click() Call connect If staffrs.RecordCount < 1 Then MsgBox "Have no Staff Member" Else list_staff.Show End If End Sub Private Sub Label22_Click() If Len(Combo1.Text) > 0 Then Frame2.Enabled = False Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True
  • 121. 117 | P a g e Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text13.Enabled = True Combo2.Enabled = True Combo3.Enabled = True Combo4.Enabled = True Check1.Enabled = True Label13.Enabled = True Label23.Enabled = False Label26.Enabled = True Label22.Enabled = False Label24.Enabled = False Label25.Enabled = False Label27.Enabled = True Else MsgBox "Please select record" End If End Sub Private Sub label23_Click() ChDrive (Left(adrs, 1)) ChDir (Right(adrs, Len(adrs) - 2)) Call connect If Len(Text1.Text) > 0 Then If Len(Text2.Text) > 0 Then If Len(Text3.Text) > 0 Then If Len(Text4.Text) > 0 Then If Len(Text9.Text) > 0 Then If Len(Text8.Text) > 0 Then If Len(Text5.Text) > 0 Then
  • 122. 118 | P a g e If Len(Text6.Text) > 0 Then If Len(Text7.Text) > 0 Then If Len(Text13.Text) > 0 Then If Combo2.Text <> "Select Type" Then If LoadPicture("") <> Image1.Picture Then With staffrs .AddNew .Fields(0) = Combo1.Text .Fields(1) = Text1.Text .Fields(2) = Combo2.Text .Fields(3) = Text2.Text .Fields(4) = Text3.Text .Fields(5) = Text4.Text .Fields(6) = Text9.Text .Fields(7) = Text8.Text .Fields(8) = Text5.Text .Fields(9) = Combo3.Text .Fields(10) = Text6.Text .Fields(11) = Combo4.Text .Fields(12) = Text7.Text .Fields(13) = ".imagestaff_admin" + CommonDialog1.FileTitle SavePicture Image1.Picture, .Fields(13) .Fields(14) = Text13.Text .Fields(15) = DTPicker1.Value .Update End With With rs .AddNew .Fields(0) = Combo2.Text .Fields(1) = Text1.Text
  • 123. 119 | P a g e .Fields(2) = Text5.Text .Fields(3) = Text2.Text .Fields(4) = Text3.Text .Update End With Do Until dailyrs.EOF If dailyrs.Fields(0) = Date Then dailyrs.Fields(7) = dailyrs.Fields(7) + 1 dailyrs.Update End If dailyrs.MoveNext Loop MsgBox "Data Saved" Combo1.Text = "" Combo2.Text = "Select Type" Combo3.Text = "" Combo4.Text = "" Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" Text13.Text = "" Image1.Picture = LoadPicture("") DTPicker1.Value = Date Frame2.Enabled = True
  • 124. 120 | P a g e Text1.Enabled = False Text2.Enabled = False Text3.Enabled = False Text4.Enabled = False Text5.Enabled = False Text6.Enabled = False Text7.Enabled = False Text8.Enabled = False Text9.Enabled = False Text13.Enabled = False Combo2.Enabled = False Combo3.Enabled = False Combo4.Enabled = False DTPicker1.Enabled = False Label13.Enabled = False Label23.Enabled = False Label27.Enabled = False Label25.Enabled = True Label22.Enabled = True Label24.Enabled = True Label26.Enabled = True Else MsgBox "Please select Staff member photo" End If Else MsgBox "Please select Staff member Type" Combo2.SetFocus End If Else MsgBox "Please Enter Education"
  • 125. 121 | P a g e Text13.SetFocus End If Else MsgBox "Please Enter answer of" + Chr(32) + " second security question" Text7.SetFocus End If Else MsgBox "Please Enter answer of" + Chr(32) + " first security question" Text6.SetFocus End If Else MsgBox "Please put your password" Text5.SetFocus End If Else MsgBox "Please Enter aadhar no. for your security" Text8.SetFocus End If Else MsgBox "Please Enter contact no." Text9.SetFocus End If Else MsgBox "Please enter address of person" Text4.SetFocus End If Else MsgBox "Please enter last name of person" Text3.SetFocus End If
  • 126. 122 | P a g e Else MsgBox "Please enter first name of person" Text2.SetFocus End If Else MsgBox "Please enter username of person" Text1.SetFocus End If End Sub Private Sub label24_Click() Frame2.Enabled = False Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text8.Enabled = True Text9.Enabled = True Text13.Enabled = True Combo2.Enabled = True: Combo2.Text = "Staff Type" Combo3.Enabled = True: Combo3.Text = "Select Question" Combo4.Enabled = True: Combo4.Text = "Select Question" Check1.Enabled = True DTPicker1.Enabled = True Label13.Enabled = True Combo1.Text = "" Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = ""
  • 127. 123 | P a g e Text5.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" Text13.Text = "" Image1.Picture = LoadPicture("") DTPicker1.Value = Date Call connect With staffrs Do Until .EOF a = .Fields(0) .MoveNext Loop End With a = a + 1 Combo1.Text = a Label23.Enabled = True Label26.Enabled = True Label22.Enabled = False Label24.Enabled = False Label25.Enabled = False Label27.Enabled = False End Sub Private Sub Label25_Click() Call connect If Len(Text2.Text) > 0 Then Do Until staffrs.EOF If Val(Combo1.Text) = staffrs.Fields(0) Then Do Until rs.EOF
  • 128. 124 | P a g e If rs.Fields(1) = staffrs.Fields(1) And rs.Fields(2) = staffrs.Fields(8) Then rs.Delete rs.Update Exit Do End If rs.MoveNext Loop staffrs.Delete Combo1.Text = "" Combo2.Text = "Select Type" Combo3.Text = "" Combo4.Text = "" Text1.Text = "" Text2.Text = "" Text4.Text = "" Text3.Text = "" Text5.Text = "" Text7.Text = "" Text6.Text = "" Text8.Text = "" Text9.Text = "" Text13.Text = "" DTPicker1.Value = Date Image1.Picture = LoadPicture("") Do Until dailyrs.EOF If dailyrs.Fields(0) = Date Then dailyrs.Fields(8) = dailyrs.Fields(8) + 1 dailyrs.Update End If dailyrs.MoveNext
  • 129. 125 | P a g e Loop MsgBox "Data Deleted" End If staffrs.MoveNext Loop Else MsgBox "Please Select Record" End If End Sub Private Sub Label26_Click() Combo1.Text = "" Combo2.Text = "Select Type" Combo3.Text = "" Combo4.Text = "" Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" Text13.Text = "" Image1.Picture = LoadPicture("") DTPicker1.Value = Date Frame2.Enabled = True Combo1.Enabled = False Combo2.Enabled = False Combo3.Enabled = False
  • 130. 126 | P a g e Combo4.Enabled = False Text1.Enabled = False Text2.Enabled = False Text3.Enabled = False Text4.Enabled = False Text5.Enabled = False Text6.Enabled = False Text7.Enabled = False Text8.Enabled = False Text9.Enabled = False Text13.Enabled = False DTPicker1.Enabled = False Label13.Enabled = False Check1.Enabled = False Label23.Enabled = False Label24.Enabled = True Label25.Enabled = True Label26.Enabled = True Label27.Enabled = False Label22.Enabled = True End Sub Private Sub Label27_Click() ChDrive (Left(adrs, 1)) ChDir (Right(adrs, Len(adrs) - 2)) Call connect If Len(Text1.Text) > 0 Then If Len(Text2.Text) > 0 Then If Len(Text3.Text) > 0 Then If Len(Text4.Text) > 0 Then If Len(Text9.Text) > 0 Then
  • 131. 127 | P a g e If Len(Text8.Text) > 0 Then If Len(Text5.Text) > 0 Then If Len(Text6.Text) > 0 Then If Len(Text7.Text) > 0 Then If Len(Text13.Text) > 0 Then If Combo2.Text <> "Select Type" Then If LoadPicture("") <> Image1.Picture Then With staffrs Do Until .EOF If Combo1.Text = .Fields(0) Then .Fields(1) = Text1.Text .Fields(2) = Combo2.Text .Fields(3) = Text2.Text .Fields(4) = Text3.Text .Fields(5) = Text4.Text .Fields(6) = Text9.Text .Fields(7) = Text8.Text .Fields(8) = Text5.Text .Fields(9) = Combo3.Text .Fields(10) = Text6.Text .Fields(11) = Combo4.Text .Fields(12) = Text7.Text If Len(CommonDialog1.FileTitle) > 0 Then .Fields(12) = ".imagestaff_admin" + CommonDialog1.FileTitle SavePicture Image1.Picture, .Fields(12) End If .Fields(14) = Text13.Text .Fields(15) = DTPicker1.Value .Update End If
  • 132. 128 | P a g e .MoveNext Loop End With With rs Do Until .EOF If .Fields(1) = Text1.Text Then .Fields(0) = Combo2.Text .Fields(1) = Text1.Text .Fields(2) = Text5.Text .Fields(3) = Text2.Text .Fields(4) = Text3.Text .Update End If .MoveNext Loop End With Do Until dailyrs.EOF If dailyrs.Fields(0) = Date Then dailyrs.Fields(9) = dailyrs.Fields(9) + 1 dailyrs.Update End If dailyrs.MoveNext Loop MsgBox "Data update" Combo1.Text = "" Combo2.Text = "Select Type" Combo3.Text = "" Combo4.Text = "" Text1.Text = "" Text2.Text = ""
  • 133. 129 | P a g e Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" Text13.Text = "" Image1.Picture = LoadPicture("") DTPicker1.Value = Date Frame2.Enabled = True Text1.Enabled = False Text2.Enabled = False Text3.Enabled = False Text4.Enabled = False Text5.Enabled = False Text6.Enabled = False Text7.Enabled = False Text8.Enabled = False Text9.Enabled = False Text13.Enabled = False Combo2.Enabled = False Combo3.Enabled = False Combo4.Enabled = False DTPicker1.Enabled = False Label13.Enabled = False Label23.Enabled = False Label27.Enabled = False Label25.Enabled = True Label22.Enabled = True
  • 134. 130 | P a g e Label24.Enabled = True Label26.Enabled = True Else MsgBox "Please select Staff member photo" End If Else MsgBox "Please select Staff member Type" Combo2.SetFocus End If Else MsgBox "Please Enter Education" Text13.SetFocus End If Else MsgBox "Please Enter answer of" + Chr(32) + " second security question" Text7.SetFocus End If Else MsgBox "Please Enter answer of" + Chr(32) + " first security question" Text6.SetFocus End If Else MsgBox "Please put your password" Text5.SetFocus End If Else MsgBox "Please Enter aadhar no. for your security" Text8.SetFocus End If Else
  • 135. 131 | P a g e MsgBox "Please Enter contact no." Text9.SetFocus End If Else MsgBox "Please enter address of person" Text4.SetFocus End If Else MsgBox "Please enter last name of person" Text3.SetFocus End If Else MsgBox "Please enter first name of person" Text2.SetFocus End If Else MsgBox "Please enter username of person" Text1.SetFocus End If End Sub Private Sub Label28_Click() Timer1.Enabled = True End Sub Private Sub Option1_Click() If Option1.Value = True Then Text10.Enabled = False: Text10.Text = "" Text11.Enabled = False: Text11.Text = "" Text12.Enabled = True End If End Sub
  • 136. 132 | P a g e Private Sub Option3_Click() If Option3.Value = True Then Text10.Enabled = False: Text10.Text = "" Text12.Enabled = False: Text12.Text = "" Text11.Enabled = True End If End Sub Private Sub Option4_Click() If Option4.Value = True Then Text11.Enabled = False: Text11.Text = "" Text12.Enabled = False: Text12.Text = "" Text10.Enabled = True End If End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 32 Then KeyAscii = 0 End If End Sub Private Sub Text10_KeyPress(KeyAscii As Integer) If Not IsNumeric(Text10.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Text11_KeyPress(KeyAscii As Integer) If Not IsNumeric(Text11.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Text12_KeyPress(KeyAscii As Integer)
  • 137. 133 | P a g e If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Text2_KeyPress(KeyAscii As Integer) If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Text3_KeyPress(KeyAscii As Integer) If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Text6_KeyPress(KeyAscii As Integer) If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Text7_KeyPress(KeyAscii As Integer) If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Text8_KeyPress(KeyAscii As Integer) If Not IsNumeric(Text8.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then KeyAscii = 0
  • 138. 134 | P a g e End If End Sub Private Sub Text9_KeyPress(KeyAscii As Integer) If Not IsNumeric(Text9.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Timer1_Timer() If up = 0 Then If Frame5.Top > 5380 Then Label28.Top = Label28.Top - 20 Frame5.Top = Frame5.Top - 20 Else Timer1.Enabled = False up = 1 End If Else If Frame5.Top < 6000 Then Label28.Top = Label28.Top + 20 Frame5.Top = Frame5.Top + 20 Else Timer1.Enabled = False up = 0 End If End If End Sub  Add New Member Page
  • 139. 135 | P a g e Dim up%, a% Dim imag1, imag2 As String Private Sub Form_Unload(Cancel As Integer) Unload Me menu.Show End Sub Private Sub Label15_Click() Call connect If Combo1.Text = "" And members.RecordCount > 0 Then With members Combo1.Text = .Fields(0) Text1.Text = .Fields(1) Text2.Text = .Fields(2) Combo2.Text = .Fields(3) Text4.Text = .Fields(4) Text5.Text = .Fields(5) Text6.Text = .Fields(6)
  • 140. 136 | P a g e Text3.Text = .Fields(7) Text10.Text = .Fields(8) Text8.Text = .Fields(9) Text9.Text = .Fields(10) Text7.Text = .Fields(11) DTPicker1.Value = .Fields(12) Image1.Picture = LoadPicture(.Fields(13)) Image2.Picture = LoadPicture(.Fields(14)) End With ElseIf Combo1.Text <> "" And members.RecordCount > 0 Then With members Do Until .EOF If Val(Combo1.Text) = .Fields(0) Then .MoveNext Exit Do End If .MoveNext Loop If .EOF = False Then Combo1.Text = .Fields(0) Text1.Text = .Fields(1) Text2.Text = .Fields(2) Combo2.Text = .Fields(3) Text4.Text = .Fields(4) Text5.Text = .Fields(5) Text6.Text = .Fields(6) Text3.Text = .Fields(7) Text10.Text = .Fields(8) Text8.Text = .Fields(9)
  • 141. 137 | P a g e Text9.Text = .Fields(10) Text7.Text = .Fields(11) DTPicker1.Value = .Fields(12) Image1.Picture = LoadPicture(.Fields(13)) Image2.Picture = LoadPicture(.Fields(14)) End If End With End If End Sub Private Sub Label16_Click() Call connect If Combo1.Text = "" And members.RecordCount > 0 Then With members .MoveLast Combo1.Text = .Fields(0) Text1.Text = .Fields(1) Text2.Text = .Fields(2) Combo2.Text = .Fields(3) Text4.Text = .Fields(4) Text5.Text = .Fields(5) Text6.Text = .Fields(6) Text3.Text = .Fields(7) Text10.Text = .Fields(8) Text8.Text = .Fields(9) Text9.Text = .Fields(10) Text7.Text = .Fields(11) DTPicker1.Value = .Fields(12) Image1.Picture = LoadPicture(.Fields(13)) Image2.Picture = LoadPicture(.Fields(14))
  • 142. 138 | P a g e End With ElseIf Combo1.Text <> "" And members.RecordCount > 0 Then With members .MoveLast Combo1.Text = .Fields(0) Text1.Text = .Fields(1) Text2.Text = .Fields(2) Combo2.Text = .Fields(3) Text4.Text = .Fields(4) Text5.Text = .Fields(5) Text6.Text = .Fields(6) Text3.Text = .Fields(7) Text10.Text = .Fields(8) Text8.Text = .Fields(9) Text9.Text = .Fields(10) Text7.Text = .Fields(11) DTPicker1.Value = .Fields(12) Image1.Picture = LoadPicture(.Fields(13)) Image2.Picture = LoadPicture(.Fields(14)) End With End If End Sub Private Sub Label17_Click() Call connect If Combo1.Text = "" And members.RecordCount > 0 Then With members Combo1.Text = .Fields(0) Text1.Text = .Fields(1) Text2.Text = .Fields(2)
  • 143. 139 | P a g e Combo2.Text = .Fields(3) Text4.Text = .Fields(4) Text5.Text = .Fields(5) Text6.Text = .Fields(6) Text3.Text = .Fields(7) Text10.Text = .Fields(8) Text8.Text = .Fields(9) Text9.Text = .Fields(10) Text7.Text = .Fields(11) DTPicker1.Value = .Fields(12) Image1.Picture = LoadPicture(.Fields(13)) Image2.Picture = LoadPicture(.Fields(14)) End With ElseIf Combo1.Text <> "" And members.RecordCount > 0 Then With members Do Until .EOF If Val(Combo1.Text) = .Fields(0) Then .MovePrevious Exit Do End If .MoveNext Loop If .BOF = False Then Combo1.Text = .Fields(0) Text1.Text = .Fields(1) Text2.Text = .Fields(2) Combo2.Text = .Fields(3) Text4.Text = .Fields(4) Text5.Text = .Fields(5)
  • 144. 140 | P a g e Text6.Text = .Fields(6) Text3.Text = .Fields(7) Text10.Text = .Fields(8) Text8.Text = .Fields(9) Text9.Text = .Fields(10) Text7.Text = .Fields(11) DTPicker1.Value = .Fields(12) Image1.Picture = LoadPicture(.Fields(13)) Image2.Picture = LoadPicture(.Fields(14)) End If End With End If End Sub Private Sub Label18_Click() Call connect If Combo1.Text = "" And members.RecordCount > 0 Then With members Combo1.Text = .Fields(0) Text1.Text = .Fields(1) Text2.Text = .Fields(2) Combo2.Text = .Fields(3) Text4.Text = .Fields(4) Text5.Text = .Fields(5) Text6.Text = .Fields(6) Text3.Text = .Fields(7) Text10.Text = .Fields(8) Text8.Text = .Fields(9) Text9.Text = .Fields(10) Text7.Text = .Fields(11)
  • 145. 141 | P a g e DTPicker1.Value = .Fields(12) Image1.Picture = LoadPicture(.Fields(13)) Image2.Picture = LoadPicture(.Fields(14)) End With ElseIf Combo1.Text <> "" And members.RecordCount > 0 Then With members .MoveFirst Combo1.Text = .Fields(0) Text1.Text = .Fields(1) Text2.Text = .Fields(2) Combo2.Text = .Fields(3) Text4.Text = .Fields(4) Text5.Text = .Fields(5) Text6.Text = .Fields(6) Text3.Text = .Fields(7) Text10.Text = .Fields(8) Text8.Text = .Fields(9) Text9.Text = .Fields(10) Text7.Text = .Fields(11) DTPicker1.Value = .Fields(12) Image1.Picture = LoadPicture(.Fields(13)) Image2.Picture = LoadPicture(.Fields(14)) End With End If End Sub Private Sub Label19_Click() Call connect If Option3.Value = True Then If Len(Text11.Text) > 0 Then
  • 146. 142 | P a g e With members Do Until .EOF If Val(Trim(Text11.Text)) = Val(Trim(.Fields(0))) Then Combo1.Text = .Fields(0) Text1.Text = .Fields(1) Text2.Text = .Fields(2) Combo2.Text = .Fields(3) Text4.Text = .Fields(4) Text5.Text = .Fields(5) Text6.Text = .Fields(6) Text3.Text = .Fields(7) Text10.Text = .Fields(8) Text8.Text = .Fields(9) Text9.Text = .Fields(10) Text7.Text = .Fields(11) DTPicker1.Value = .Fields(12) Image1.Picture = LoadPicture(.Fields(13)) Image2.Picture = LoadPicture(.Fields(14)) Exit Do End If .MoveNext Loop End With Else MsgBox "Please mention ID NO. of Member" End If ElseIf Option4.Value = True Then If Len(Text12.Text) > 0 Then With members
  • 147. 143 | P a g e Do Until .EOF If Trim(Text12.Text) = Trim(.Fields(1)) Then Combo1.Text = .Fields(0) Text1.Text = .Fields(1) Text2.Text = .Fields(2) Combo2.Text = .Fields(3) Text4.Text = .Fields(4) Text5.Text = .Fields(5) Text6.Text = .Fields(6) Text3.Text = .Fields(7) Text10.Text = .Fields(8) Text8.Text = .Fields(9) Text9.Text = .Fields(10) Text7.Text = .Fields(11) DTPicker1.Value = .Fields(12) Image1.Picture = LoadPicture(.Fields(13)) Image2.Picture = LoadPicture(.Fields(14)) Exit Do End If .MoveNext Loop End With Else MsgBox "Please mention Member First Name" End If End If End Sub Private Sub Label21_Click() ChDrive (Left(adrs, 1))
  • 148. 144 | P a g e ChDir (Right(adrs, Len(adrs) - 2)) Call connect If Len(Text1.Text) > 0 Then If Len(Text2.Text) > 0 Then If Len(Text4.Text) > 0 Then If Len(Text3.Text) > 0 Then If Len(Text5.Text) > 0 Then If Len(Text6.Text) > 0 Then If Len(Text7.Text) > 0 Then If Len(Text8.Text) > 0 Then If Len(Text9.Text) > 0 Then If Len(Text10.Text) > 0 Then If Image1.Picture <> LoadPicture("") Then If Image2.Picture <> LoadPicture("") Then With members Do Until .EOF If Val(Combo1.Text) = .Fields(0) Then .Fields(0) = Combo1.Text .Fields(1) = Text1.Text .Fields(2) = Text2.Text .Fields(3) = Combo2.Text .Fields(4) = Text4.Text .Fields(5) = Text5.Text .Fields(6) = Text6.Text .Fields(7) = Text3.Text .Fields(8) = Text10.Text .Fields(9) = Text8.Text .Fields(10) = Text9.Text .Fields(11) = Text7.Text
  • 149. 145 | P a g e .Fields(12) = DTPicker1.Value If Len(imag1) > 0 Then .Fields(13) = imag1 SavePicture Image1.Picture, imag1 End If If Len(imag2) > 0 Then .Fields(14) = imag2 SavePicture Image2.Picture, imag2 End If .Update End If .MoveNext Loop End With Do Until dailyrs.EOF If dailyrs.Fields(0) = Date Then dailyrs.Fields(12) = dailyrs.Fields(12) + 1 dailyrs.Update End If dailyrs.MoveNext Loop MsgBox "Data Updated" Combo1.Text = "" Combo2.Text = "Select Type" Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = ""
  • 150. 146 | P a g e Text6.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" Text10.Text = "" Image1.Picture = LoadPicture("") Image2.Picture = LoadPicture("") DTPicker1.Value = Date Frame3.Enabled = True Combo1.Enabled = False Text1.Enabled = False Text2.Enabled = False Text3.Enabled = False Text4.Enabled = False Text5.Enabled = False Text6.Enabled = False Text7.Enabled = False Text8.Enabled = False Text9.Enabled = False Text10.Enabled = False DTPicker1.Enabled = False Label27.Enabled = False Label28.Enabled = False Label25.Enabled = False Label22.Enabled = True Label21.Enabled = False Label23.Enabled = True Label24.Enabled = True Label26.Enabled = True
  • 151. 147 | P a g e Else MsgBox "please select reference person photo" End If Else MsgBox "please select member photo" End If Else Text10.SetFocus MsgBox "please enter Father's name" End If Else Text9.SetFocus MsgBox "please enter your education" End If Else Text8.SetFocus MsgBox "please enter your email" End If Else Text7.SetFocus MsgBox "please enter contact number" End If Else Text6.SetFocus MsgBox "please insert reference department" End If Else Text5.SetFocus MsgBox "please insert reference name"
  • 152. 148 | P a g e End If Else Text3.SetFocus MsgBox "please insert reference contact no." End If Else Text4.SetFocus MsgBox "please insert contact no." End If Else Text2.SetFocus MsgBox "please insert addresss" End If Else Text1.SetFocus MsgBox "please insert name" End If End Sub Private Sub label24_Click() If Len(Text4.Text) > 0 Then imag1 = "" imag2 = "" Combo1.Enabled = False Frame3.Enabled = False Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True
  • 153. 149 | P a g e Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True DTPicker1.Enabled = True Label27.Enabled = True Label28.Enabled = True Label25.Enabled = False Label22.Enabled = True Label21.Enabled = True Label23.Enabled = False Label24.Enabled = False Label26.Enabled = False Else MsgBox "please select a record" End If End Sub Private Sub Label25_Click() ChDrive (Left(adrs, 1)) ChDir (Right(adrs, Len(adrs) - 2)) Call connect If Len(Text1.Text) > 0 Then If Len(Text2.Text) > 0 Then If Len(Text4.Text) > 0 Then If Len(Text3.Text) > 0 Then If Len(Text5.Text) > 0 Then If Len(Text6.Text) > 0 Then If Len(Text7.Text) > 0 Then
  • 154. 150 | P a g e If Len(Text8.Text) > 0 Then If Len(Text9.Text) > 0 Then If Len(Text10.Text) > 0 Then If Image1.Picture <> LoadPicture("") Then If Image2.Picture <> LoadPicture("") Then With members .AddNew .Fields(0) = Combo1.Text .Fields(1) = Text1.Text .Fields(2) = Text2.Text .Fields(3) = Combo2.Text .Fields(4) = Text4.Text .Fields(5) = Text5.Text .Fields(6) = Text6.Text .Fields(7) = Text3.Text .Fields(8) = Text10.Text .Fields(9) = Text8.Text .Fields(10) = Text9.Text .Fields(11) = Text7.Text .Fields(12) = DTPicker1.Value .Fields(13) = imag1 .Fields(14) = imag2 SavePicture Image1.Picture, imag1 SavePicture Image2.Picture, imag2 .Update End With Do Until dailyrs.EOF If dailyrs.Fields(0) = Date Then dailyrs.Fields(10) = dailyrs.Fields(10) + 1
  • 155. 151 | P a g e dailyrs.Update End If dailyrs.MoveNext Loop MsgBox "Data Saved" Combo1.Text = "" Combo2.Text = "Select Type" Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" Text10.Text = "" Image1.Picture = LoadPicture("") Image2.Picture = LoadPicture("") DTPicker1.Value = Date Frame3.Enabled = True Combo1.Enabled = False Text1.Enabled = False Text2.Enabled = False Text3.Enabled = False Text4.Enabled = False Text5.Enabled = False Text6.Enabled = False Text7.Enabled = False
  • 156. 152 | P a g e Text8.Enabled = False Text9.Enabled = False Text10.Enabled = False DTPicker1.Enabled = False Label27.Enabled = False Label28.Enabled = False Label25.Enabled = False Label22.Enabled = True Label21.Enabled = False Label23.Enabled = True Label24.Enabled = True Label26.Enabled = True Else MsgBox "please select reference person photo" End If Else MsgBox "please select member photo" End If Else Text10.SetFocus MsgBox "please enter Father's name" End If Else Text9.SetFocus MsgBox "please enter your education" End If Else Text8.SetFocus MsgBox "please enter your email"
  • 157. 153 | P a g e End If Else Text7.SetFocus MsgBox "please enter contact number" End If Else Text6.SetFocus MsgBox "please insert reference department" End If Else Text5.SetFocus MsgBox "please insert reference name" End If Else Text3.SetFocus MsgBox "please insert reference contact no." End If Else Text4.SetFocus MsgBox "please insert contact no." End If Else Text2.SetFocus MsgBox "please insert addresss" End If Else Text1.SetFocus MsgBox "please insert name" End If
  • 158. 154 | P a g e End Sub Private Sub Combo1_Click() Call connect With members Do Until .EOF If Combo1.Text = .Fields(0) Then Text1 = .Fields(1) Text2 = .Fields(2) Text4 = .Fields(4) Combo2 = .Fields(3) Text5 = .Fields(5) Text6 = .Fields(6) Text3 = .Fields(7) End If .MoveNext Loop End With End Sub Private Sub Form_Load() member1.Left = Screen.Width / 2 - member1.Width / 2 member1.Top = Screen.Height / 2 - member1.Height / 2 Call connect End Sub Private Sub Label14_Click() Call connect If members.RecordCount < 1 Then MsgBox "Have no Member" Else list_member.Show
  • 159. 155 | P a g e End If End Sub Private Sub Label20_Click() Timer1.Enabled = True End Sub Private Sub Label22_Click() Combo1.Text = "" Combo2.Text = "Select Type" Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" Text10.Text = "" Image1.Picture = LoadPicture("") Image2.Picture = LoadPicture("") DTPicker1.Value = Date Frame3.Enabled = True Combo1.Enabled = False Text1.Enabled = False Text2.Enabled = False Text3.Enabled = False Text4.Enabled = False Text5.Enabled = False Text6.Enabled = False
  • 160. 156 | P a g e Text7.Enabled = False Text8.Enabled = False Text9.Enabled = False Text10.Enabled = False DTPicker1.Enabled = False Label27.Enabled = False Label28.Enabled = False Label25.Enabled = False Label22.Enabled = True Label21.Enabled = False Label23.Enabled = True Label24.Enabled = True Label26.Enabled = True End Sub Private Sub label23_Click() Call connect If Len(Text2.Text) > 0 Then Do Until members.EOF If Val(Combo1.Text) = members.Fields(0) Then members.Delete Combo2.Text = "Select Type" Text1.Text = "" Text2.Text = "" Text4.Text = "" Text3.Text = "" Text5.Text = "" Text7.Text = "" Text6.Text = "" Text8.Text = ""
  • 161. 157 | P a g e Text9.Text = "" Text10.Text = "" DTPicker1.Value = Date Image1.Picture = LoadPicture("") Image2.Picture = LoadPicture("") Do Until dailyrs.EOF If dailyrs.Fields(0) = Date Then dailyrs.Fields(11) = dailyrs.Fields(11) + 1 dailyrs.Update End If dailyrs.MoveNext Loop MsgBox "Data Deleted" End If members.MoveNext Loop Else MsgBox "Please Select Record" End If End Sub Private Sub Label26_Click() imag1 = "" imag2 = "" Combo1.Text = "" Combo2.Text = "Select Type" Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = ""
  • 162. 158 | P a g e Text5.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" Text10.Text = "" Image1.Picture = LoadPicture("") Image2.Picture = LoadPicture("") DTPicker1.Value = Date Combo1.Enabled = False Frame3.Enabled = False Text1.Enabled = True Text2.Enabled = True Text3.Enabled = True Text4.Enabled = True Text5.Enabled = True Text6.Enabled = True Text7.Enabled = True Text8.Enabled = True Text9.Enabled = True Text10.Enabled = True DTPicker1.Enabled = True Label27.Enabled = True Label28.Enabled = True Label25.Enabled = True Label22.Enabled = True Label21.Enabled = False Label23.Enabled = False Label24.Enabled = False
  • 163. 159 | P a g e Label26.Enabled = False Call connect With members Do Until .EOF a = .Fields(0) .MoveNext Loop End With a = a + 1 Combo1.Text = a End Sub Private Sub Label27_Click() CommonDialog1.ShowOpen CommonDialog1.Filter = "Image|*.jpg|*.bmp|*.*" CommonDialog1.InitDir = "d:lms project 2" imag1 = ".imagemembers" + CommonDialog1.FileTitle Image1.Picture = LoadPicture(CommonDialog1.FileName) End Sub Private Sub Label28_Click() CommonDialog1.ShowOpen CommonDialog1.Filter = "Image|*.jpg|*.bmp|*.*" CommonDialog1.InitDir = "d:lms project 2" imag2 = ".imagemembers" + CommonDialog1.FileTitle Image2.Picture = LoadPicture(CommonDialog1.FileName) End Sub Private Sub Option3_Click() If Option3.Value = True Then Text12.Enabled = False Text12.Text = ""
  • 164. 160 | P a g e Text11.Enabled = True End If End Sub Private Sub Option4_Click() If Option4.Value = True Then Text11.Enabled = False Text11.Text = "" Text12.Enabled = True End If End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Text10_KeyPress(KeyAscii As Integer) If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not KeyAscii = 8 And KeyAscii = 32 Then KeyAscii = 0 End If End Sub Private Sub Text11_KeyPress(KeyAscii As Integer) If Not IsNumeric(Text11.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Text12_KeyPress(KeyAscii As Integer) If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not KeyAscii = 8 Then
  • 165. 161 | P a g e KeyAscii = 0 End If End Sub Private Sub Text2_KeyPress(KeyAscii As Integer) If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Text3_KeyPress(KeyAscii As Integer) If Not IsNumeric(Text3.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Text5_KeyPress(KeyAscii As Integer) If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not KeyAscii = 8 And KeyAscii = 32 Then KeyAscii = 0 End If End Sub Private Sub Text6_KeyPress(KeyAscii As Integer) If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not KeyAscii = 8 And KeyAscii = 32 Then KeyAscii = 0 End If End Sub Private Sub Text7_KeyPress(KeyAscii As Integer) If Not IsNumeric(Text7.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then KeyAscii = 0 End If
  • 166. 162 | P a g e End Sub Private Sub Timer1_Timer() If up = 0 Then If Frame6.Top > 8240 Then Label20.Top = Label20.Top - 20 Frame6.Top = Frame6.Top - 20 Else Timer1.Enabled = False up = 1 End If Else If Frame6.Top < 8880 Then Label20.Top = Label20.Top + 20 Frame6.Top = Frame6.Top + 20 Else Timer1.Enabled = False up = 0 End If End If End Sub  Book Issue Page
  • 167. 163 | P a g e Dim flag%, up% Private Sub Combo1_Click() Call connect Dim a% Combo2.Enabled = True With members Do Until .EOF If .Fields(0) = Combo1.Text Then Label1.Caption = .Fields(1) End If .MoveNext Loop End With If flag = 1 Then With birs Combo2.Clear Combo2.Text = "Select issued Category" Do Until .EOF
  • 168. 164 | P a g e If Combo1.Text = .Fields(0) Then Combo2.AddItem .Fields(6) End If .MoveNext Loop End With Dim c, i, j As Integer For i = 0 To Combo2.ListCount - 1 c = 0 For j = 0 To Combo2.ListCount - 1 If Combo2.List(i) = Combo2.List(j) Then c = c + 1 End If Next If c > 1 Then Combo2.RemoveItem (i) End If Next End If End Sub Private Sub Combo2_Click() Call connect Combo3.Enabled = True Combo3.Clear Combo3.Text = "Book" Text2.Text = "" With bookrs Do Until .EOF If Combo2.Text = .Fields(11) Then Combo3.AddItem .Fields(4)
  • 169. 165 | P a g e End If .MoveNext Loop End With With birs Do Until .EOF If Combo2.Text = .Fields(6) Then For i = 0 To Combo3.ListCount - 1 If Combo1.Text = .Fields(0) And Combo3.List(i) = .Fields(1) Then Combo3.RemoveItem (i) End If Next End If .MoveNext Loop End With If birs.BOF = False Then birs.MoveFirst End If If flag = 1 Then With birs Combo3.Clear Combo3.Text = "Select issued Book" Do Until .EOF If Combo1.Text = .Fields(0) And Combo2.Text = .Fields(6) Then Combo3.AddItem .Fields(1) End If .MoveNext Loop End With
  • 170. 166 | P a g e End If End Sub Private Sub Combo4_Click() Call connect Combo5.Enabled = True Combo5.Clear Combo5.Text = "New Book" Text2.Text = "" With bookrs Do Until .EOF If Combo4.Text = .Fields(11) Then Combo5.AddItem .Fields(4) End If .MoveNext Loop End With If Combo2.Text = Combo4.Text Then For i = 0 To Combo3.ListCount - 1 If Combo3.Text = Combo5.List(i) Then Combo5.RemoveItem (i) End If Next End If End Sub Private Sub Combo3_Click() Call connect DTPicker2.Enabled = True With bookrs Do Until .EOF If .Fields(4) = Combo3.Text Then
  • 171. 167 | P a g e Text2.Text = .Fields(8) - Val(Text1) End If .MoveNext Loop End With If flag = 0 Then Text1.Enabled = True Else Text1.Enabled = False End If If flag = 1 Then Combo4.Enabled = True Combo4.Text = "New Category" bookrs.MoveFirst Combo5.Clear Combo5.Text = "New Book" With bookrs Do Until .EOF If Combo4.Text = .Fields(11) Then Combo5.AddItem .Fields(4) End If .MoveNext Loop End With If Combo2.Text = Combo4.Text Then For i = 0 To Combo3.ListCount - 1 If Combo3.Text = Combo5.List(i) Then Combo5.RemoveItem (i) End If Next
  • 172. 168 | P a g e End If With birs Do Until .EOF If Combo1.Text = .Fields(0) And Combo2.Text = .Fields(6) And Combo3.Text = .Fields(1) Then Text1.Text = .Fields(4) Text2.Text = .Fields(5) End If .MoveNext Loop End With End If End Sub Private Sub Combo5_Click() Call connect With bookrs Do Until .EOF If .Fields(4) = Combo5.Text Then Text2.Text = .Fields(8) - Val(Text1) End If .MoveNext Loop End With Text1.Enabled = True End Sub Private Sub Command1_Click() flag = 0 Combo4.Visible = False Combo5.Visible = False Dim c%, a$ Call connect
  • 173. 169 | P a g e Combo1.Enabled = True Command1.Enabled = False Command2.Enabled = True Text1.Text = "0" Combo1.Clear With members Do Until .EOF Combo1.AddItem .Fields(0) .MoveNext Loop End With With birs Do Until .EOF a = .Fields(0) c = 0 birs1.MoveFirst Do Until birs1.EOF If birs1.Fields(0) = a Then c = c + 1 End If birs1.MoveNext Loop For i = 0 To Combo1.ListCount - 1 If a = Combo1.List(i) And c = 2 Then Combo1.RemoveItem (i) End If Next .MoveNext Loop End With
  • 174. 170 | P a g e End Sub Private Sub Command2_Click() Call connect If Combo1.Text <> "" Then If Combo3.Text <> "" Then If Len(Text1.Text) > 0 Then If Text1.Text <> "0" Then With birs .AddNew .Fields(0) = Combo1.Text .Fields(1) = Combo3.Text .Fields(2) = DTPicker1.Value .Fields(3) = DTPicker2.Value .Fields(4) = Text1.Text .Fields(5) = Text2.Text .Fields(6) = Combo2.Text birs1.Fields(0) = Combo1.Text birs1.Fields(1) = Combo3.Text birs1.Fields(2) = DTPicker1.Value birs1.Fields(2) = DTPicker2.Value birs1.Fields(4) = Text1.Text birs1.Fields(5) = Text2.Text birs1.Fields(6) = Combo2.Text If Len(Text3.Text) > 0 Then .Fields(7) = Text3.Text birs1.Fields(7) = Text3.Text Else .Fields(7) = "0" birs1.Fields(7) = "0" End If
  • 175. 171 | P a g e birs1.Update .Update bookrs.MoveFirst Do Until bookrs.EOF If bookrs.Fields(4) = Combo3.Text Then bookrs.Fields(8) = Text2.Text bookrs.Update End If bookrs.MoveNext Loop Do Until dailyrs.EOF If dailyrs.Fields(0) = Date Then dailyrs.Fields(16) = dailyrs.Fields(16) + 1 dailyrs.Update End If dailyrs.MoveNext Loop MsgBox "Book Issued" Text1.Text = "0" Text2.Text = "" Text3.Text = "" Combo1.Clear Combo2.Clear: Combo2.Text = "Category1" Combo3.Clear: Combo3.Text = "Book1" With members Do Until .EOF Combo1.AddItem .Fields(0) .MoveNext Loop End With
  • 176. 172 | P a g e With bcatrs Do Until .EOF Combo2.AddItem .Fields(1) .MoveNext Loop End With Text1.Enabled = False DTPicker2.Enabled = False Combo1.Enabled = False Combo2.Enabled = False Combo3.Enabled = False Text1.Enabled = False Command2.Enabled = False Command1.Enabled = True Label1.Caption = "" Text3.Text = "" Text3.Visible = False End With Else MsgBox "can't issue 0 books" Text1.SetFocus End If Else MsgBox "Please insert books to be issue" End If Else MsgBox "Please Select book" End If Else MsgBox "Please Select Member"
  • 177. 173 | P a g e End If End Sub Private Sub Command3_Click() flag = 1 Call connect Combo1.Enabled = True Combo1.Clear DTPicker2.Enabled = True With birs Do Until .EOF If DTPicker1.Value = .Fields(2) Then Combo1.AddItem .Fields(0) End If .MoveNext Loop End With Dim c, i, j As Integer For i = 0 To Combo1.ListCount - 1 c = 0 For j = 0 To Combo1.ListCount - 1 If Combo1.List(i) = Combo1.List(j) Then c = c + 1 End If Next If c > 1 Then Combo1.RemoveItem (i) End If Next For i = 0 To Combo1.ListCount - 1 For j = 0 To Combo1.ListCount - 1
  • 178. 174 | P a g e If Combo1.List(i) < Combo1.List(j) Then t = Combo1.List(i) Combo1.List(i) = Combo1.List(j) Combo1.List(j) = t End If Next Next Combo2.Text = "Select Issued Category" Combo3.Text = "Select Issued Book" Combo4.Visible = True Combo5.Visible = True Combo5.Enabled = False End Sub Private Sub Command4_Click() Call connect Dim temp% If Len(Text1.Text) > 0 Then If Len(Text2.Text) > 0 Then If Combo2.Text <> "Select issued Category" Then If Combo3.Text <> "Select issued Book" Then With birs If Combo4.Text <> "New Category" And Combo5.Text <> "New Book" Then Do Until .EOF If Combo1.Text = .Fields(0) And Combo3.Text = .Fields(1) Then temp = Val(.Fields(5)) .Fields(1) = Combo5.Text .Fields(6) = Combo4.Text .Fields(3) = DTPicker2.Value .Fields(7) = Text3.Text .Fields(5) = Text2.Text
  • 179. 175 | P a g e birs1.Fields(1) = Combo5.Text birs1.Fields(6) = Combo4.Text birs1.Fields(3) = DTPicker2.Value birs1.Fields(7) = Text3.Text birs1.Fields(5) = Text2.Text .Update birs1.Update Do Until dailyrs.EOF If dailyrs.Fields(0) = Date Then dailyrs.Fields(18) = dailyrs.Fields(18) + 1 dailyrs.Update End If dailyrs.MoveNext Loop Do Until bookrs.EOF If bookrs.Fields(4) = Combo3.Text Then bookrs.Fields(8) = temp + 1 bookrs.Update ElseIf bookrs.Fields(4) = Combo5.Text Then bookrs.Fields(8) = Text2.Text bookrs.Update End If bookrs.MoveNext Loop End If .MoveNext birs1.MoveNext Loop Else Do Until .EOF
  • 180. 176 | P a g e If Combo1.Text = .Fields(0) And Combo3.Text = .Fields(1) Then .Fields(1) = Combo3.Text .Fields(6) = Combo2.Text .Fields(3) = DTPicker2.Value .Fields(7) = Text3.Text .Fields(5) = Text2.Text birs1.Fields(1) = Combo3.Text birs1.Fields(6) = Combo2.Text birs1.Fields(3) = DTPicker2.Value birs1.Fields(7) = Text3.Text birs1.Fields(5) = Text2.Text .Update birs1.Update End If .MoveNext birs1.MoveNext Loop End If End With MsgBox ("Updation Successful") Text1.Text = "" Text2.Text = "" Text3.Text = "" Text3.Visible = False Else End If Else End If Else End If
  • 181. 177 | P a g e Else End If End Sub Private Sub Command6_Click() Combo1.Enabled = False Combo2.Enabled = False Combo3.Enabled = False Combo4.Enabled = False Combo5.Enabled = False Text1.Enabled = False Text2.Enabled = False Command1.Enabled = True DTPicker2.Enabled = False DTPicker1.Value = Date DTPicker2.Value = Date + 15 End Sub Private Sub DTPicker2_Change() If DTPicker2.Value < Date Then DTPicker2.Value = Date + 15 Text3.Text = "" Text3.Visible = False ElseIf DTPicker2.Value > (Date + 30) Then DTPicker2.Value = Date + 15 Text3.Text = "" Text3.Visible = False ElseIf DTPicker2.Value = (Date + 15) Then Text3.Text = "" Text3.Visible = False End If Dim dt As Date
  • 182. 178 | P a g e dt = DTPicker2.Value If (dt - DTPicker1.Value) > 15 Then Text3.Visible = True Text3.Text = ((dt - DTPicker1.Value) - 15) * 2 End If End Sub Private Sub Form_Activate() DTPicker1.Value = Date DTPicker2.Value = Date + 15 End Sub Private Sub Form_Load() Book_issue.Left = Screen.Width / 2 - Book_issue.Width / 2 Book_issue.Top = Screen.Height / 2 - Book_issue.Height / 2 Call connect Dim a% With bcatrs Do Until .EOF Combo2.AddItem .Fields(1) Combo4.AddItem .Fields(1) .MoveNext Loop End With Combo1.Enabled = False Combo2.Enabled = False Combo3.Enabled = False Text1.Enabled = False End Sub Private Sub Form_Unload(Cancel As Integer) Unload Me menu.Show
  • 183. 179 | P a g e End Sub Private Sub Label11_Click() Call connect If birs.RecordCount < 1 Then MsgBox "There have no book issue" Else List_Issue.Show End If End Sub Private Sub Label12_Click() End Sub Private Sub Label15_Click() Call connect If Combo1.Text = "" And birs.RecordCount > 0 Then Combo1.Text = birs.Fields(0) Text1.Text = birs.Fields(4) Text2.Text = birs.Fields(5) Combo2.Text = birs.Fields(6) Combo3.Text = birs.Fields(1) Image1.Picture = LoadPicture(birs.Fields(7)) ElseIf Combo1.Text <> "" Then With birs Do Until .EOF If Combo1.Text = .Fields(0) Then .MoveNext Exit Do End If .MoveNext Loop If .EOF = False Then
  • 184. 180 | P a g e Combo1.Text = .Fields(0) Text1.Text = .Fields(4) Text2.Text = .Fields(5) Combo2.Text = .Fields(6) Combo3.Text = .Fields(1) Image1.Picture = LoadPicture(.Fields(7)) End If End With End If End Sub Private Sub Label16_Click() Call connect With birs If Combo1.Text = "" And .RecordCount > 0 Then .MoveLast Combo1.Text = .Fields(0) Text1.Text = .Fields(4) Text2.Text = .Fields(5) Combo2.Text = .Fields(6) Combo3.Text = .Fields(1) Image1.Picture = LoadPicture(.Fields(7)) ElseIf Combo1.Text <> "" Then .MoveLast Combo1.Text = .Fields(0) Text1.Text = .Fields(4) Text2.Text = .Fields(5) Combo2.Text = .Fields(6) Combo3.Text = .Fields(1) Image1.Picture = LoadPicture(.Fields(7)) End If
  • 185. 181 | P a g e End With End Sub Private Sub Label17_Click() Call connect If Combo1.Text = "" And authorrs.RecordCount > 0 Then Combo1.Text = birs.Fields(0) Text1.Text = birs.Fields(4) Text2.Text = birs.Fields(5) Combo2.Text = birs.Fields(6) Combo3.Text = birs.Fields(1) Image1.Picture = LoadPicture(birs.Fields(7)) ElseIf Combo1.Text <> "" Then With birs Do Until .EOF If Combo1.Text = .Fields(0) Then .MovePrevious Exit Do End If .MoveNext Loop If .BOF = False Then Combo1.Text = .Fields(0) Text1.Text = .Fields(4) Text2.Text = .Fields(5) Combo2.Text = .Fields(6) Combo3.Text = .Fields(1) Image1.Picture = LoadPicture(.Fields(7)) End If End With End If
  • 186. 182 | P a g e End Sub Private Sub Label18_Click() Call connect With birs If Combo1.Text = "" And .RecordCount > 0 Then Combo1.Text = .Fields(0) Text1.Text = .Fields(4) Text2.Text = .Fields(5) Combo2.Text = .Fields(6) Combo3.Text = .Fields(1) Image1.Picture = LoadPicture(.Fields(7)) ElseIf Combo1.Text <> "" Then .MoveFirst Combo1.Text = .Fields(0) Text1.Text = .Fields(4) Text2.Text = .Fields(5) Combo2.Text = .Fields(6) Combo3.Text = .Fields(1) Image1.Picture = LoadPicture(.Fields(7)) End If End With End Sub Private Sub Label19_Click() Frame2.Enabled = True Label24.Enabled = True Label22.Enabled = True Label21.Enabled = True Label23.Enabled = False Label19.Enabled = False End Sub
  • 187. 183 | P a g e Private Sub Label20_Click() Frame2.Enabled = True Label24.Enabled = True Label22.Enabled = True Label21.Enabled = True Label23.Enabled = False Label19.Enabled = False Call connect If Option3.Value = True Then If Len(Text11.Text) > 0 Then With birs Do Until authorrs.EOF If Val(Text11.Text) = .Fields(0) Then Combo1.Text = birs.Fields(0) Text1.Text = birs.Fields(4) Text2.Text = birs.Fields(5) Combo2.Text = birs.Fields(6) Combo3.Text = birs.Fields(1) Image1.Picture = LoadPicture(birs.Fields(7)) Exit Do End If .MoveNext Loop End With Else MsgBox "Please mention ID" End If ElseIf Option4.Value = True Then If Len(Text10.Text) > 0 Then authorrs.MoveFirst
  • 188. 184 | P a g e Do Until authorrs.EOF If Text10.Text = authorrs.Fields(1) Then Combo1.Text = authorrs.Fields(0) Text1.Text = authorrs.Fields(1) Text2.Text = authorrs.Fields(2) Text4.Text = authorrs.Fields(3) Image1.Picture = LoadPicture(authorrs.Fields(4)) Exit Do End If authorrs.MoveNext Loop Else MsgBox "Please mention Name" End If End If End Sub Private Sub Label22_Click() Frame2.Enabled = False Label24.Enabled = False Label22.Enabled = False Label21.Enabled = False Label23.Enabled = False Label19.Enabled = True Label20.Enabled = True End Sub Private Sub label23_Click() Frame2.Enabled = True Label24.Enabled = True Label22.Enabled = True Label21.Enabled = True
  • 189. 185 | P a g e Label23.Enabled = False Label19.Enabled = False End Sub Private Sub label24_Click() Frame2.Enabled = False Label20.Enabled = True Label23.Enabled = True Label19.Enabled = False Label21.Enabled = False Label22.Enabled = False Label24.Enabled = False End Sub Private Sub Label25_Click() Call connect If Combo1.Text <> "" Then Do Until birs.EOF If Combo1.Text = birs.Fields(0) Then birs.Delete Combo1.Clear Combo2.Clear Combo3.Clear Combo4.Clear Combo5.Clear Text1.Text = "" Text2.Text = "" Combo1.Text = "" Combo2.Text = "Category" Combo3.Text = "Book" Image1.Picture = LoadPicture("") End If
  • 190. 186 | P a g e birs.MoveNext Loop Else MsgBox "Please Select Record" End If End Sub Private Sub Label28_Click() Timer1.Enabled = True End Sub Private Sub Label26_Click() Frame2.Enabled = True Label23.Enabled = False Label27.Enabled = False Label25.Enabled = True Label22.Enabled = True Label24.Enabled = True Label26.Enabled = True Text1.Enabled = False Text2.Enabled = False Image1.Picture = LoadPicture("") Combo1.Text = "" Combo2.Text = "Category" Combo3.Text = "Book" Combo4.Clear Combo5.Clear Combo1.Enabled = False Combo2.Enabled = False Combo3.Enabled = False Combo4.Visible = False Combo5.Visible = False
  • 191. 187 | P a g e Text1.Text = "" Text2.Text = "" End Sub Private Sub Option3_Click() If Option3.Value = True Then Text10.Enabled = False Text10.Text = "" Text11.Enabled = True End If End Sub Private Sub Option4_Click() If Option4.Value = True Then Text11.Enabled = False Text11.Text = "" Text10.Enabled = True End If End Sub Private Sub Text1_Change() If Val(Text1.Text) > 1 Or Val(Text1.Text) < 0 Then Text1.Text = "" End If Call connect With bookrs Do Until .EOF If .Fields(4) = Combo3.Text Then If Val(Text1.Text) < .Fields(8) Then Text2.Text = .Fields(8) - Val(Text1) End If End If .MoveNext
  • 192. 188 | P a g e Loop End With End Sub Private Sub Text1_KeyPress(KeyAscii As Integer) If Not IsNumeric(Text1.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Text1_LostFocus() If Text1.Text = "" Then Text1 = "0" End If End Sub Private Sub Text10_KeyPress(KeyAscii As Integer) If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Text11_KeyPress(KeyAscii As Integer) If Not IsNumeric(Text11.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Timer1_Timer() If up = 0 Then If Frame5.Top > 6990 Then Label28.Top = Label28.Top - 20 Frame5.Top = Frame5.Top - 20 Else Timer1.Enabled = False
  • 193. 189 | P a g e up = 1 End If Else If Frame5.Top < 7580 Then Label28.Top = Label28.Top + 20 Frame5.Top = Frame5.Top + 20 Else Timer1.Enabled = False up = 0 End If End If End Sub  Book Return Page Dim falg As Integer Dim up As Integer Private Sub Combo1_Click() Combo2.Enabled = True Call connect Dim a%
  • 194. 190 | P a g e Combo2.Enabled = True With members Do Until .EOF If .Fields(0) = Combo1.Text Then Label1.Caption = .Fields(1) End If .MoveNext Loop End With birs.MoveFirst With birs Combo2.Clear Do Until .EOF If Combo1.Text = .Fields(0) Then Combo2.AddItem .Fields(1) End If .MoveNext Loop End With Dim c, i, j As Integer For i = 0 To Combo2.ListCount - 1 c = 0 For j = 0 To Combo2.ListCount - 1 If Combo2.List(i) = Combo2.List(j) Then c = c + 1 End If Next If c > 1 Then Combo2.RemoveItem (i) End If
  • 195. 191 | P a g e Next If flag = 1 Then Combo1.Clear Combo2.Clear Combo3.Clear birs.MoveFirst With birs Combo3.Clear Do Until .EOF If Combo1.Text = .Fields(0) Then Combo3.AddItem .Fields(1) End If .MoveNext Loop End With For i = 0 To Combo3.ListCount - 1 c = 0 For j = 0 To Combo3.ListCount - 1 If Combo3.List(i) = Combo3.List(j) Then c = c + 1 End If Next If c > 1 Then Combo3.RemoveItem (i) End If Next With bretrs Combo2.Clear Combo2.Text = "Old Book" Do Until .EOF
  • 196. 192 | P a g e If Combo1.Text = .Fields(0) Then Combo2.AddItem .Fields(1) End If .MoveNext Loop End With For i = 0 To Combo2.ListCount - 1 c = 0 For j = 0 To Combo2.ListCount - 1 If Combo2.List(i) = Combo2.List(j) Then c = c + 1 End If Next If c > 1 Then Combo2.RemoveItem (i) End If Next End If End Sub Private Sub Combo2_Click() Combo3.Enabled = True Call connect With birs Do Until .EOF If Combo1.Text = .Fields(0) And Combo2.Text = .Fields(1) Then Text1.Text = Val(.Fields(7)) DTPicker2.Value = Val(.Fields(2)) DTPicker3.Value = Date If .Fields(3) >= DTPicker3.Value Then Else
  • 197. 193 | P a g e If (DTPicker3.Value - DTPicker2.Value) > 15 Then Text1.Text = ((DTPicker3.Value - DTPicker2.Value) - 15) * 2 End If End If End If .MoveNext Loop End With End Sub Private Sub Combo3_Click() Call connect With birs Do Until .EOF If Combo1.Text = .Fields(0) And Combo2.Text = .Fields(1) Then Text1.Text = Val(.Fields(7)) DTPicker2.Value = Val(.Fields(2)) DTPicker3.Value = Date If .Fields(3) >= DTPicker3.Value Then Else If (DTPicker3.Value - DTPicker2.Value) > 15 Then Text1.Text = ((DTPicker3.Value - DTPicker2.Value) - 15) * 2 End If End If End If .MoveNext Loop End With End Sub Private Sub Command1_Click() Combo1.Enabled = True
  • 198. 194 | P a g e Call connect With birs Do Until .EOF Combo1.AddItem .Fields(0) .MoveNext Loop End With Dim c, i, j As Integer For i = 0 To Combo1.ListCount - 1 c = 0 For j = 0 To Combo1.ListCount - 1 If Combo1.List(i) = Combo1.List(j) Then c = c + 1 End If Next If c > 1 Then Combo1.RemoveItem (i) End If Next For i = 0 To Combo1.ListCount - 1 For j = 0 To Combo1.ListCount - 1 If Combo1.List(i) < Combo1.List(j) Then t = Combo1.List(i) Combo1.List(i) = Combo1.List(j) Combo1.List(j) = t End If Next Next End Sub Private Sub Command2_Click()
  • 199. 195 | P a g e Call connect If Combo1.Text <> "" Then If Combo2.Text <> "" Then With birs Do Until .EOF If Combo1.Text = .Fields(0) And Combo2.Text = .Fields(1) Then Do Until bookrs.EOF If bookrs.Fields(4) = Combo2.Text Then bookrs.Fields(8) = bookrs.Fields(8) + 1 End If bookrs.Update bookrs.MoveNext Loop .Delete With bretrs .AddNew .Fields(0) = Combo1.Text .Fields(1) = Combo2.Text .Fields(2) = DTPicker2.Value .Fields(3) = DTPicker3.Value .Fields(4) = Text1.Text .Update End With MsgBox "book return" Do Until dailyrs.EOF If dailyrs.Fields(0) = Date Then dailyrs.Fields(19) = dailyrs.Fields(19) + 1 dailyrs.Update End If dailyrs.MoveNext
  • 200. 196 | P a g e Loop Combo1.Text = "" Combo2.Text = "" Text1.Text = "" Combo1.Enabled = False Combo2.Enabled = False End If .Update .MoveNext Loop End With Else MsgBox "Please Select Book" End If Else MsgBox "Please Select Member ID" End If End Sub Private Sub Command3_Click() flag = 1 Combo1.Enabled = True Combo3.Visible = True Call connect With bretrs Do Until .EOF If .Fields(3) = Date Then Combo1.AddItem .Fields(0) End If .MoveNext Loop
  • 201. 197 | P a g e End With Dim c, i, j As Integer For i = 0 To Combo1.ListCount - 1 c = 0 For j = 0 To Combo1.ListCount - 1 If Combo1.List(i) = Combo1.List(j) Then c = c + 1 End If Next If c > 1 Then Combo1.RemoveItem (i) End If Next For i = 0 To Combo1.ListCount - 1 For j = 0 To Combo1.ListCount - 1 If Combo1.List(i) < Combo1.List(j) Then t = Combo1.List(i) Combo1.List(i) = Combo1.List(j) Combo1.List(j) = t End If Next Next End Sub Private Sub Command4_Click() Call connect If Combo1.Text <> "" Then If Combo2.Text <> "Old Book" Then If Combo3.Text <> "New Book" Then With bretrs Do Until .EOF
  • 202. 198 | P a g e If Combo1.Text = .Fields(0) And Combo2.Text = .Fields(1) Then .Fields(1) = Combo3.Text .Fields(2) = DTPicker2.Value .Fields(4) = Text1.Text .Update Do Until dailyrs.EOF If dailyrs.Fields(0) = Date Then dailyrs.Fields(21) = dailyrs.Fields(21) + 1 dailyrs.Update End If dailyrs.MoveNext Loop MsgBox "Updation Saved" Combo1.Enabled = False Combo2.Enabled = False Combo3.Visible = False Combo3.Enabled = False Text1.Text = "" End If .MoveNext Loop End With With birs1 Do Until .EOF If .Fields(0) = Combo1.Text And .Fields(1) = Combo2.Text Then End If .MoveNext Loop End With Else
  • 203. 199 | P a g e MsgBox "Please Select Member ID" End If Else MsgBox "Please Select Old returned Book" End If Else MsgBox "Please Select New returned Book" End If End Sub Private Sub Form_Load() book_Return.Left = Screen.Width / 2 - book_Return.Width / 2 book_Return.Top = Screen.Height / 2 - book_Return.Height / 2 End Sub Private Sub Form_Unload(Cancel As Integer) Unload Me menu.Show End Sub Private Sub Label10_Click() Frame2.Enabled = False Label4.Enabled = False Label9.Enabled = False Label10.Enabled = False Label14.Enabled = False Label13.Enabled = True Label19.Enabled = True End Sub Private Sub Label11_Click() Call connect If bretrs.RecordCount < 1 Then MsgBox "Have no Book for Return"
  • 204. 200 | P a g e Else list_return.Show End If End Sub Private Sub label13_Click() Frame2.Enabled = True Label4.Enabled = True Label10.Enabled = True Label14.Enabled = True Label9.Enabled = False Label13.Enabled = False End Sub Private Sub Label15_Click() Call connect If Combo1.Text = "" And authorrs.RecordCount > 0 Then Combo1.Text = authorrs.Fields(0) Text1.Text = authorrs.Fields(1) Text2.Text = authorrs.Fields(2) Text4.Text = authorrs.Fields(3) Image1.Picture = LoadPicture(authorrs.Fields(4)) ElseIf Combo1.Text <> "" Then Do Until authorrs.EOF If Combo1.Text = authorrs.Fields(0) Then authorrs.MoveNext Exit Do End If authorrs.MoveNext Loop If authorrs.EOF = False Then Combo1.Text = authorrs.Fields(0)
  • 205. 201 | P a g e Text1.Text = authorrs.Fields(1) Text2.Text = authorrs.Fields(2) Text4.Text = authorrs.Fields(3) Image1.Picture = LoadPicture(authorrs.Fields(4)) End If End If End Sub Private Sub Label16_Click() Call connect If Combo1.Text = "" And authorrs.RecordCount > 0 Then authorrs.MoveLast Combo1.Text = authorrs.Fields(0) Text1.Text = authorrs.Fields(1) Text2.Text = authorrs.Fields(2) Text4.Text = authorrs.Fields(3) Image1.Picture = LoadPicture(authorrs.Fields(4)) ElseIf Combo1.Text <> "" Then authorrs.MoveLast Combo1.Text = authorrs.Fields(0) Text1.Text = authorrs.Fields(1) Text2.Text = authorrs.Fields(2) Text4.Text = authorrs.Fields(3) Image1.Picture = LoadPicture(authorrs.Fields(4)) End If End Sub Private Sub Label17_Click() Call connect If Combo1.Text = "" And authorrs.RecordCount > 0 Then Combo1.Text = authorrs.Fields(0) Text1.Text = authorrs.Fields(1)
  • 206. 202 | P a g e Text2.Text = authorrs.Fields(2) Text4.Text = authorrs.Fields(3) Image1.Picture = LoadPicture(authorrs.Fields(4)) ElseIf Combo1.Text <> "" Then Do Until authorrs.EOF If Combo1.Text = authorrs.Fields(0) Then authorrs.MovePrevious Exit Do End If authorrs.MoveNext Loop If authorrs.BOF = False Then Combo1.Text = authorrs.Fields(0) Text1.Text = authorrs.Fields(1) Text2.Text = authorrs.Fields(2) Text4.Text = authorrs.Fields(3) Image1.Picture = LoadPicture(authorrs.Fields(4)) End If End If End Sub Private Sub Label18_Click() Call connect If Combo1.Text = "" And authorrs.RecordCount > 0 Then Combo1.Text = authorrs.Fields(0) Text1.Text = authorrs.Fields(1) Text2.Text = authorrs.Fields(2) Text4.Text = authorrs.Fields(3) Image1.Picture = LoadPicture(authorrs.Fields(4)) ElseIf Combo1.Text <> "" Then authorrs.MoveFirst
  • 207. 203 | P a g e Combo1.Text = authorrs.Fields(0) Text1.Text = authorrs.Fields(1) Text2.Text = authorrs.Fields(2) Text4.Text = authorrs.Fields(3) Image1.Picture = LoadPicture(authorrs.Fields(4)) End If End Sub Private Sub Label19_Click() Frame2.Enabled = True Label4.Enabled = True Label10.Enabled = True Label14.Enabled = True Label9.Enabled = False Label13.Enabled = False End Sub Private Sub Label20_Click() Timer1.Enabled = True End Sub Private Sub Label4_Click() Frame2.Enabled = False Label9.Enabled = True Label19.Enabled = True Label10.Enabled = False Label14.Enabled = False Label4.Enabled = False Label13.Enabled = False End Sub Private Sub Label9_Click() Frame2.Enabled = True Label4.Enabled = True
  • 208. 204 | P a g e Label10.Enabled = True Label14.Enabled = True Label9.Enabled = False Label13.Enabled = False End Sub Private Sub Option3_Click() If Option3.Value = True Then Text10.Enabled = False Text10.Text = "" Text11.Enabled = True End If End Sub Private Sub Option4_Click() If Option4.Value = True Then Text11.Enabled = False Text11.Text = "" Text10.Enabled = True End If End Sub Private Sub Text10_KeyPress(KeyAscii As Integer) If Not IsNumeric(Text10.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Text11_KeyPress(KeyAscii As Integer) If Not IsNumeric(Text11.Text & Chr(KeyAscii)) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Timer1_Timer()
  • 209. 205 | P a g e If up = 0 Then If Frame5.Top > 5860 Then Label20.Top = Label20.Top - 20 Frame5.Top = Frame5.Top - 20 Else Timer1.Enabled = False up = 1 End If Else If Frame5.Top < 6500 Then Label20.Top = Label20.Top + 20 Frame5.Top = Frame5.Top + 20 Else Timer1.Enabled = False up = 0 End If End If End Sub  Update Security Settings Page Private Sub Check1_Click()
  • 210. 206 | P a g e If Check1 = False Then Text2.PasswordChar = "*" Else Text2.PasswordChar = "" End If End Sub Private Sub Check2_Click() If Check2 = False Then Text3.PasswordChar = "*" Else Text3.PasswordChar = "" End If End Sub Private Sub Label12_Click() Call connect If Len(Text2.Text) > 0 Then If Len(Text3.Text) > 0 Then If Len(Text4.Text) > 0 Then If Len(Text5.Text) > 0 Then If Combo1.Text <> "" Then If Combo2.Text <> "" Then With staffrs Do Until .EOF If Text1.Text = .Fields(0) Then If Text2.Text = .Fields(8) Then If Text3.Text <> Text2.Text Then .Fields(8) = Text3.Text .Fields(9) = Combo1.Text .Fields(10) = Text4.Text .Fields(11) = Combo2.Text
  • 211. 207 | P a g e .Fields(12) = Text5.Text .Update rs.Fields(2) = Text3.Text rs.Update MsgBox "changes is saved" Unload Me menu.Show Else MsgBox "your new password is same as old password" Text3.Text = "" Text3.SetFocus End If Else MsgBox "your old password is incorrect" Text2.Text = "" Text2.SetFocus End If End If .MoveNext rs.MoveNext Loop End With Else MsgBox "Please select Security Question 2" Combo2.SetFocus End If Else MsgBox "Please select Security Question 1" Combo1.SetFocus End If
  • 212. 208 | P a g e Else MsgBox "Please enter new answer 2 password" Text5.SetFocus End If Else MsgBox "Please enter new answer 1 password" Text4.SetFocus End If Else MsgBox "Please enter new password" Text3.SetFocus End If Else MsgBox "Please enter old password" Text2.SetFocus End If End Sub Private Sub Label9_Click() If Text2.Text = "" And Text3.Text = "" And Text4.Text = "" And Text5.Text = "" And Combo1.Text = "" And Combo2.Text = "" And Check1.Value = False And Check2.Value = False Then Unload Me menu.Show End If Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Combo1.Text = "" Combo2.Text = "" Check1.Value = False Check2.Value = False
  • 213. 209 | P a g e End Sub Private Sub Form_Load() updat.Left = Screen.Width / 2 - updat.Width / 2 updat.Top = Screen.Height / 2 - updat.Height / 2 Text1.Text = id End Sub Private Sub Form_Unload(Cancel As Integer) Unload Me menu.Show End Sub Private Sub Text4_KeyPress(KeyAscii As Integer) If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub Private Sub Text5_KeyPress(KeyAscii As Integer) If Not (KeyAscii >= 65 And KeyAscii <= 90 Or KeyAscii >= 97 And KeyAscii <= 122) And Not KeyAscii = 8 Then KeyAscii = 0 End If End Sub  About Us Page
  • 214. 210 | P a g e Dim pic As Integer Private Sub Form_Load() about.Left = Screen.Width / 2 - about.Width / 2 about.Top = Screen.Height / 2 - about.Height / 2 Timer1.Enabled = True pic = 1 End Sub Private Sub Form_Unload(Cancel As Integer) Timer1.Enabled = False Unload Me menu.Show End Sub Private Sub Timer1_Timer() ChDrive (Left(adrs, 1)) 'ChDir (Right(adrs, Len(adrs) - 2)) If pic = 1 Then pic = 2 Label11.Caption = "Developer (Yash Agarwal)" Image2.Picture = LoadPicture(".imageabout usyash1.jpg")
  • 215. 211 | P a g e ElseIf pic = 2 Then pic = 3 Label11.Caption = "Mentor (Tarun Sharma)" Image2.Picture = LoadPicture(".imageabout ustarun.jpg") ElseIf pic = 3 Then pic = 1 Label11.Caption = "Developer (Heena Tejwani)" Image2.Picture = LoadPicture(".imageabout usheena.jpg") End If End Sub  Library Membership Card Dim path As String Private Sub Combo1_Click() Call connect
  • 216. 212 | P a g e With members Do Until .EOF If Combo1.Text = .Fields(0) Then Label7.Caption = .Fields(0) Label8.Caption = .Fields(1) + " " + .Fields(2) Label10.Caption = .Fields(8) Label11.Caption = .Fields(12) Label12.Caption = .Fields(11) Image1.Picture = LoadPicture(.Fields(13)) path = .Fields(13) End If .MoveNext Loop End With End Sub Private Sub Form_Load() Me.Left = Screen.Width / 2 - Me.Width / 2 Me.Top = Screen.Height / 2 - Me.Height / 2 Call connect Combo1.Clear Combo1.Text = "Select" With members If .RecordCount > 0 Then .MoveFirst End If Do Until .EOF Combo1.AddItem .Fields(0) .MoveNext Loop End With
  • 217. 213 | P a g e Label7.Caption = "" Label8.Caption = "" Label10.Caption = "" Label11.Caption = "" Label12.Caption = "" End Sub Private Sub Form_Unload(Cancel As Integer) Unload Me menu.Show End Sub Private Sub Label9_Click() Set DataReport1.DataSource = members DataReport1.Sections(2).Controls("label9").Caption = Label7.Caption DataReport1.Sections(2).Controls("label10").Caption = Label8.Caption DataReport1.Sections(2).Controls("label11").Caption = Label10.Caption DataReport1.Sections(2).Controls("label12").Caption = Label11.Caption DataReport1.Sections(2).Controls("label13").Caption = Label12.Caption Set DataReport1.Sections(2).Controls("Image1").Picture = LoadPicture(path) DataReport1.Show Do Until dailyrs.EOF If dailyrs.Fields(0) = Date Then dailyrs.Fields(25) = dailyrs.Fields(25) + 1 dailyrs.Update End If dailyrs.MoveNext Loop Unload Me End Sub  Application Form
  • 218. 214 | P a g e
  • 219. 215 | P a g e Chapter – 6 System Requirements of PC Processor Core 2 Dual / 4.3 more RAM 1, 2 GB or more HDD 500 GB / 1 TB or more OS Window 7 or Later Database MS Access 2003
  • 220. 216 | P a g e Chapter – 7 Conclusion After we have completed the project we are sure the problems in the existing system world overcome. The “Library Management System” process made computerized to reduce human errors & to increase the efficiency. The main focus of this project is to less human efforts. The maintenance of the records is made efficient, as all the records are stored in the Access Database, through which data can be retrieved easily. The navigation control is provided in all the forms to navigate through the large amount of records. If the numbers of records are very large than user has to just type in the search string & user gets the results immediately. The editing is also made simples. The user has to just type in the required field & process the update button to update the desired field. The books & students are given a particular unique id no. so that they can be access correctly & without errors. Our main aim of the project is to get the correct information about a particular member & books available in the Library.
  • 221. 217 | P a g e Bibliography  www.google.com  www.youtube.com  www.stackoverflow.com  VB Black Book (Author: Steven Holzner)  MS Visual Basic 2010 step by step (Author: Michael Halverson)  The Complete Reference Visual Basic 6 (Author: Noel Jerk)  College Notes
  • 222. 218 | P a g e Thank You… YASH AGARWAL Bachelor of Computer Application Dezyne E’cole College 106/10, CIVIL LINES AJMER RAJASTHAN - 305001 (INDIA) (FEBRUARY, 2017) www.dezyneecole.com