198
PROJECT REPORT ON BLOOD DONATION SYSTEM SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE AWARD OF THE DEGREE OF BACHELOR OF COMPUTER APPLICATION SUBMITTED BY: YASHVEER SINGH ENROLMENT NO:836086 ROLL NO: 802271 SUBMITTED TO MR. PRABHAT RANJAN SHARMA (H.O.D.) Department of computer science UNDER THE SUPERVISION OF MR. MOHIT KUMAR VARSHNEY (Lecturer) 1

Project Report on Blood Donation System

Embed Size (px)

Citation preview

Page 1: Project Report on Blood Donation System

PROJECT REPORT ON

BLOOD DONATION SYSTEM

SUBMITTED IN PARTIAL FULFILLMENT OF THE

REQUIREMENTS

FOR THE AWARD OF THE DEGREE OF

BACHELOR OF COMPUTER APPLICATION

SUBMITTED BY:YASHVEER SINGH

ENROLMENT NO:836086ROLL NO: 802271

SUBMITTED TOMR. PRABHAT RANJAN SHARMA

(H.O.D.)Department of computer science

UNDER THE SUPERVISION OF MR. MOHIT KUMAR VARSHNEY (Lecturer)

INSTITUTE OF INFORMATIONMANAGMENT & TECHNOLOGY

RAMGHAT ROAD, ALIGARH 202001

(AFFILIATED TO DR. B. R. AMBEDKAR UNIVERSITY, AGRA)

1

Page 2: Project Report on Blood Donation System

2008-2011

INSTITUTE OF INFORMATION MANAGEMENT

AND TECHNOLOGY ALIGARH

ACKNOWLEDGEMENT

We have great pleasure in acknowledgement the help from al those

who favored me in having shape to the present project. We take the

responsibility to express our sincere and deep sense of gratitude to

our head of department Mr. Prabhat Ranjan Sharma director of

our college Mr. D.S. Mahalwar and Dean S.K.N. Singh. Our

facility members and all our friends. We pay our thanks to Mr.

Mohit Kumar Varshney for providing a great support to us. They

guided our project team efficient and good working.

We like to pay our wish and love to our all supporting friends who

made their best efforts to help us. Words defeat us in expressing

2

Page 3: Project Report on Blood Donation System

thanks to our family members for providing moral support and

encouragement during the tenure of the project.

We hope and wish to be blessed with the blessing and

encouragement from all of the above in our future to accomplish all

our endeavors.

YASHVEER SINGH

(B.C. A. VI Sem)

DECLARATION

I Yashveer Singh Roll No. 802271 student of BCA 6th semester in

institute of Information Management and technology (IIMT), Aligarh

3

Page 4: Project Report on Blood Donation System

here by declare that the project report titled “BLOOD

DONATION SYSTEM” is not submitted for the award of any

other diploma or degree.

Place: Name

Date: Yashveer Singh

Document information:

Project code B.C.A.

Project Name BLOOD DONATION

SYSTEM

4

Page 5: Project Report on Blood Donation System

Location IIMT

Submitted to Mr. PRABHAT RANJAN

SHARMA

Under the supervision of Mr. MOHIT KUMAR

VARSHNEY

Technical Member YASHVEER SINGH

Table of contents:

5

Page 6: Project Report on Blood Donation System

1. INTRODUCTION

2. SYSTEM DEVELOPMENT

2.1) Initial investigation

2.2) Opportunities of the system:

3.) SYSTEM ANALYSIS

3.1) what is the problem?

3.2) Feasibility Study

3.2.1) Technical feasibility

3.2.2) Economical feasibility

3.2.3) Operational feasibility

3.3) System Interface

3.3.1) User Interface

3.3.2) Hardware Interface

3.3.3) Software Interface

3.3.4) Communication Interface

6

Page 7: Project Report on Blood Donation System

3.3.5) Memory Constraints

3.4) Problem Statement

3.5) Object Modeling

3.5.1) Object Modeling

3.6) Dynamic Model

4.) DATABASE TABLE

5.) FORM DESIGNING

6.) CODING

7.) CONCLUSION

8.) FUTURE SCOPE

7

Page 8: Project Report on Blood Donation System

9.) BIBLIOGRAPHY

HISTORY OF VISUAL BASIC

8

Page 9: Project Report on Blood Donation System

HISTORY OF VISUAL BASIC

VB 1.0 was introduced in 1991. The drag and drop design for

creating the user interface is derived from a prototype form

generator developed by Alan 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.

Tripod did not include a programming language at all. Microsoft

decided to combine Ruby with the Basic language to create Visual

Basic.

The Ruby interface generator provided the "visual" part of Visual

Basic and this was combined with the "EB" Embedded BASIC

engine designed for Microsoft's abandoned "Omega" database

system. Ruby also provided the ability to load dynamic link

9

Page 10: Project Report on Blood Donation System

libraries containing additional controls (then called "gizmos"),

which later became the VBX interface

Visual Basic (VB) is the third-generation event-driven

programming language and integrated development environment

(IDE) from Microsoft for its COM programming model. Visual

Basic is relatively easy to learn and use.

Visual Basic was derived from BASIC and enables the

rapid application development (RAD) of graphical user interface

(GUI) applications, access to databases using Data Access Objects,

Remote Data Objects, or ActiveX Data Objects, and creation of

ActiveX controls and objects.

Scripting languages such as VBA and VBScript are syntactically

similar to Visual Basic, but perform differently.

A programmer can put together an application using the

components provided with Visual Basic itself. Programs written in

Visual Basic can also use the Windows API, but doing so requires

external function declarations.

Visual Basic is a "visual programming" environment for developing

Windows (also Web now) applications. Visual Basic makes it

possible to develop complicated applications very quickly. The

10

Page 11: Project Report on Blood Donation System

programmer designs windows graphically, drags program elements

from the Visual Basic Toolbox and writes basic code for each

element. Visual Basic is "event-driven" which means that procedures

are called automatically when the end user chooses menu items,

clicks the mouse, moves objects on the screen, etc.

CHARACTERSTICS OF VISUAL BASIC

11

Page 12: Project Report on Blood Donation System

CHARACTERSTICS OF VISUAL BASIC

VISUAL BASIC is a high level programming language which 

evolved from the earlier DOS version called BASIC. BASIC means

Beginners' All-purpose Symbolic Instruction Code. It is a very  easy

programming language to learn. The code look a lot  like English

Language. Different software companies produced different versions

of BASIC, such as Microsoft QBASIC, QUICKBASIC,

GWBASIC ,IBM BASICA and so on. However, people prefer to use

12

Page 13: Project Report on Blood Donation System

Microsoft Visual Basic today, as it is a well developed programming

language and supporting resources are available everywhere. Now,

there are many versions of VB exist in the market, the most popular

one and still widely used by many VB programmers is none other

than Visual Basic 6. We also have VB.net, VB2005, VB2008 and the

latest VB2010. Both Vb2008 and VB2010 are fully object oriented

programming (OOP) language.

VISUAL BASIC is a VISUAL and  events driven Programming

Language. These are the main divergence from the old BASIC. In

BASIC, programming is done in a text-only environment and the

program is executed sequentially. In VB, programming is done in a

graphical environment. In the old BASIC, you have to write

program code for each graphical object you wish to display it on

screen, including its position and its color. However, In VB , you

just need to drag and drop any graphical object anywhere on the

form, and you can change its color any time using the properties

windows.

On the other hand, because  the user may click on a certain object

randomly, so each object has to be programmed independently to

be able to response to those actions (events). Therefore, a VB

Program is made up of many subprograms, each has its own

13

Page 14: Project Report on Blood Donation System

program code, and each can be executed independently and at the

same time each can be linked together in one way or another.

Like the BASIC programming language, Visual Basic was designed

to be easily learned and used by beginner programmers. The

language not only allows programmers to create simple GUI

applications, but can also develop complex applications.

Programming in VB is a combination of visually arranging

components or controls on a form, specifying attributes and actions

of those components, and writing additional lines of code for more

functionality. Since default attributes and actions are defined for the

components, a simple program can be created without the

programmer having to write many lines of code. Performance

problems were experienced by earlier versions, but with faster

computers and native code compilation this has become less of an

issue.

Forms are created using drag-and-drop techniques. A tool is used

to place controls (e.g., text boxes, buttons, etc.) on the form

(window). Controls have attributes and event handlers associated

with them. Default values are provided when the control is created,

14

Page 15: Project Report on Blood Donation System

but may be changed by the programmer. Many attribute values can

be modified during run time based on user actions or changes in

the environment, providing a dynamic application. For example,

code can be inserted into the form resize event handler to

reposition a control so that it remains centered on the form,

expands to fill up the form, etc. By inserting code into the event

handler for a keypress in a text box, the program can automatically

translate the case of the text being entered, or even prevent certain

characters from being inserted.

Visual Basic can create executables (EXE files), ActiveX controls,

or DLL files, but is primarily used to develop Windows

applications and to interface database systems. Dialog boxes with

less functionality can be used to provide pop-up capabilities.

Controls provide the basic functionality of the application, while

programmers can insert additional logic within the appropriate

event handlers. For example, a drop-down combination box will

automatically display its list and allow the user to select any

element. An event handler is called when an item is selected,

which can then execute additional code created by the programmer

to perform some action based on which element was selected, such

as populating a related list.

15

Page 16: Project Report on Blood Donation System

1.) INTRODUCTION

1.2) PURPOSE:

16

Page 17: Project Report on Blood Donation System

1.3) SCOPE:

1.4) INTENDED AUDIENCE:

1.5) USER CHARACTERISTICS:

1.6) CONSTRAINT:

1.7) ASSUMPTIONS AND DEPENDENCIES:

1.8) SPECIFIC REQUIREMENTS:

1.8.1) External Interface Requirements:

1.8.2) Functional Requirement / System features:

1.8.3) Performance / Acceptance Requirements:

1.8.4) Acceptance Criteria:

1.8.5) Design Constraints:

1.9) Software System Attributes:

17

Page 18: Project Report on Blood Donation System

1.9.1) Usability:

1.9.2) Efficiency:

1.9.3) Maintainability:

1.9.4) Security:

1.9.5) Reliability:

1.9.6) Performance:

18

Page 19: Project Report on Blood Donation System

1. INTRODUCTION

1.5) PURPOSE:

The basic purpose of the system is to manage the transaction

that occurs during the operation as well as performing

calculation and updating database as and when necessary. The

system is can also provide the reports about current state of the

student Information.

19

Page 20: Project Report on Blood Donation System

1.6) SCOPE:

The scope of this project is in the various Library that need to

manage their data about their transaction and services

efficiently and effectively.

This project with the slight variations can be enhanced to be

used in the other systems which need to manage the quick data

processing.(more)

1.7) INTENDED AUDIENCE:

1. Management of the college .

2. Faculty members

3. Administrative staff

4. Student of the college

1.5) USER CHARACTERISTICS:

20

Page 21: Project Report on Blood Donation System

The system requires he user to be familiar with the basic

operations of computer.

1.6) CONSTRAINT:

This subsection of the Library Information system should

describe any other books that will limit the developer’s options.

These include:

1) Developers should have Knowledge of Visual Basic to

Develop a system

Like this.

2) Developers should have known about all the main devices and

there

Specification.

1.8) ASSUMPTIONS AND DEPENDENCIES:

1) Project will work for a long time and user will adopt it.

2) Project will work with very less maintenance requirement.

21

Page 22: Project Report on Blood Donation System

3) The database update made by the system will always leave

the system in consistent state.

4) There may be some small problems, which will not affect

the system performance, and these will be removed easily.

1.8) SPECIFIC REQUIREMENTS:

1.8.4) External Interface Requirements:

No External Interface Requirement

1.8.5) Functional Requirement / System features:

Preferences

This project is based upon Visual Basic user interfaces. The

user of this project is any computer literate person handling the

Information of the Library. The developer should be needed only

when some problem occurs in the operation of the system.

22

Page 23: Project Report on Blood Donation System

Login Process

This system interface is used to give access to the user for the

system, and mean while maintaining the security of th system.

1.8.6) Performance / Acceptance Requirements:

The project will be accepted if

1. The project works in its proper and specified way

2. No Major problem. This means that there is a problem in

performing a predefined, expecting task.

Any problem reported due to requirements not clear,

suggestions, “good to have”

Features and any enhancements/modification is not part

of the system acceptance.

1.8.4) Acceptance Criteria:

23

Page 24: Project Report on Blood Donation System

The user will use the system if it is giving the functionality it

promises (that is of automatically managing the data about the

daily records)

1.8.5) Design Constraints:

1) Work only in Standard conditions.

1.10) Software System Attributes:

1.9.1) Usability:

The system is fully usable and does not require any pre-

specified constraint to work properly.

1.9.2) Efficiency:

Hardware should me min. Pentium with 196 MB RAM.

(Fully efficient in the environments having less memory available

and a reasonable speed of execution)

1.9.3) Maintainability:

24

Page 25: Project Report on Blood Donation System

In case of any change in policies and rule of the institution

using the system, required changes will be made to the module

written by developer.

1.9.4) Security:

Only the super user can enter the system to use it.

1.9.5) Reliability:

System gives accurate result without any errors.

1.9.6) Performance:

The system itself is quiet fast.

25

Page 26: Project Report on Blood Donation System

2.) SYSTEM DEVELOPMENT

26

Page 27: Project Report on Blood Donation System

2.1) Initial investigation

2.2) Opportunities of the system:

2.) SYSTEM DEVELOPMENT

2.1) Initial investigation:

27

Page 28: Project Report on Blood Donation System

There is a system, which is concerned with the student and

their Information that is service and maintaining the record of the

students.

In this system the data, which is about the student , maintaining

on the paper that is this system is based on paperwork.

We will define a transaction as the occurrence due to which the

current state of the system changes. It means that some updating of

data or the information changes.

The problems in paper –based system were:

1) slow and error prone data entry

2) Difficulties in data retrieval

3) Difficulties to manage a long record

4) Calculations are made by human; therefore there

is less accuracy in data transaction calculations.

28

Page 29: Project Report on Blood Donation System

2.2) Opportunities of the system:

The existing system can be replaced by computer-

based system, which can perform all the related tasks

of business in a better and efficient way. The

alternative computer based system can provide many

facilities over present paper based system in the

following manner.

1) The data entry in a new computer based system will be fast

2) Easy and fast data retrieval

3) Long records can be managed easily

4) Computer does calculations, which improve accuracy.

29

Page 30: Project Report on Blood Donation System

3.) SYSTEM ANALYSIS

3.1) what is the problem?

3.2) Feasibility Study

3.2.4) Technical feasibility

3.2.5) Economical feasibility

3.2.6) Operational feasibility

3.3) System Interface

3.3.1) User Interface

3.3.2) Hardware Interface

3.3.3) Software Interface

3.3.4) Communication Interface

3.3.5) Memory Constraints

3.4) Problem Statement

30

Page 31: Project Report on Blood Donation System

3.5) Object Modeling

3.5.1) Object Modeling

3.6) Dynamic Model

3.) SYSTEM ANALYSIS

3.1) What is the problem?

In this way we realize that the new system is required

and will certainly improve the performance of the

exiting system over the exiting paper based system.

1. Design the system to develop the alternative

computer based system

2. To understand the user characteristics

31

Page 32: Project Report on Blood Donation System

3. Design a system for a particular types of

user

3.1.2) Information about student:

There is the following information required to store for

student

3.2) Feasibility Study:

Feasibility study is the most important work of an analyst

in which the opportunities of problem solving are considered and

it is mainly considered that the problem is solved for the

organization or not. Following feasibility analysis of our system

are given below

32

Page 33: Project Report on Blood Donation System

3.2.1) Technical Feasibility:

The key question of the technical feasibility is “can the

work for the project be done with current equipment, exiting

software technology, and available personnel? If new technology

is required, what is the likelihood that it can be developed?

Our system requirement in the direction of technical

feasibility is feasible as per following:

1) Our system in run for a single user and it require no

more knowledge about computer system and it can

be run by the user with having small knowledge of

computer.

2) Our front end of the computer system is visual Basic

which is free of cost and sufficient to provide the

user friendly environment.

33

Page 34: Project Report on Blood Donation System

3) For the back end of computer system as database

Microsoft access is chosen that is not free of cost but

it is fit in the expenditure of the origination and it can

sufficiently manage the database in very efficiently

and fast way.

3.2.2) Economical Feasibility:

The key question of the economical feasibility is ”Are

there sufficient benefits In creating the system to make the costs

acceptable? Are the cost of not creating the system so that the

project must be undertaken?”

Our system requirements in the direction of economical

feasibility are feasible as per following:

34

Page 35: Project Report on Blood Donation System

2) Our system is developed in the Visual Basic

which is a free source and available for

everyone.

3) The back end used in our system is Microsoft

Access that is not free of cost but it is fit in the

expenditure of the organization.

3.2.3) Operational Feasibility:

The key question of the operational feasibility

is “Will the system be used if it is developed and

implemented? Will there be resistance from users

that will undermine the possible application

benefits?”

Our system requirements in the direction of

operational feasibility are feasible as per following:

35

Page 36: Project Report on Blood Donation System

1) The present system is paper based which have a

lot of problems which can be overcome by

replacing it by our new system and work with it

2) There may be some problems in the system

faced by the user can communicate with the

origination to inform the difficulties which will

be solved immediately.

3.3) System Interfaces:

3.3.1) User Interface:

The Library is the system developed for the students

to Providing the information’s. It is a multi user system these

are the owner and other workers. The user interface to the

36

Page 37: Project Report on Blood Donation System

system is very easy, as it will be implemented by easy software,

which can be used effectively, and efficiently.

3.3.2 Hardware Interface:

Min. (64) MB RAM

Key Board

Mouse

3.3.3 Software Interface:

Visual Basic 6.0

Microsoft Access used as back –end to store the

database.

3.3.4 Communication Interface:

Verbal communication takes place between the

system user (student) and student of the Library. The

communication of user to the computer system will be

very easy and user will get correct information. Student

37

Page 38: Project Report on Blood Donation System

will not directly communicate with the computer system

but he/she will feel the effect of the computer

System over existing paper-based system, as it

will provide fast processing and accurate calculations.

3.3.5 Memory Constraints:

Min. (64) MB RAM

Min. 70 KB free hard disk

3.4 Problem Statement:

This the very first phase of project development in this

phase the user provides his requirements in the form of a

problem statement specifying the features of required system.

Problem statement of our project is as follows:

Design a system that will automate the transaction

processing. This system will be used by single user of the

38

Page 39: Project Report on Blood Donation System

Library information and this should provide for the entries of

new student as well as keeping track of what service has been

given to student and which of them are available. This system

should provide measures for maintaining the security and should

be easy to use. The sole user of the system will also enter records

for the students and their information.

3.5) Object Modeling:

Object modeling is done by to handle the real life

problems in which object and classes are mainly

emphasized. We insist upon what is being affected rather

than what is being done.

There are three phases of object modeling:

1) Object Modeling

2) Dynamic modeling

3) Functional Modeling

39

Page 40: Project Report on Blood Donation System

3.5.1) Object Modeling:

Object modeling is done to find all the objects and

relation among them like (association, generalization

etc.)

A) OBJECTS OF THE SYSTEM

There are several objects of our system, which are

given below after refining them and removing all

other unnecessary objects. Library, Owner, Students,

Service, traction etc are our main objects of the

system.

B) FINDING THE ASSOCIATIONS:

Following associations are found in this system.

Student goes to Library

40

Page 41: Project Report on Blood Donation System

Library floor has an owner ( they may be only one)

Student requests for the service to the owner

Owner asks information from the Student.

Owner issues the service.

Library contains the record of the services provided to the

Student.

Transaction updates the record.

Owner initiates the transaction.

Student returns the issues the books.

Owner clears the record.

3.6) Dynamic Model:

Dynamic model show the time dependent behavior of

the system and the objects in it. We begin dynamic analysis

41

Page 42: Project Report on Blood Donation System

by looking for events external stimuli and responses. The

dynamic model is important for interactive systems.

Steps taken in dynamic modeling are:

Prepare scenarios of typical interaction sequences

Identify events between objects

Prepare an events trace for each scenario

Build a state diagram match events between objects to verify

consistency

A state is an abstraction of the attribute value and links of an

object. A state specifies the response of the object to input events. A

state corresponds to the interval between two events received by an

object. Events represents interval of time. A state has duration; it

occupies an interval of time. A state is often associated with a

continuous activity.

42

Page 43: Project Report on Blood Donation System

A state diagram is graph whose nodes are states and whose

directed arcs are transitions leveled by event names. A state is draw

as a round box containing an optional name. a transaction is draw as

an arrow from the receiving state to the target state.

5.) FORM DESIGNING

43

Page 44: Project Report on Blood Donation System

44

Page 45: Project Report on Blood Donation System

45

Page 46: Project Report on Blood Donation System

46

Page 47: Project Report on Blood Donation System

47

Page 48: Project Report on Blood Donation System

48

Page 49: Project Report on Blood Donation System

49

Page 50: Project Report on Blood Donation System

50

Page 51: Project Report on Blood Donation System

51

Page 52: Project Report on Blood Donation System

52

Page 53: Project Report on Blood Donation System

53

Page 54: Project Report on Blood Donation System

6.) Coding:

54

Page 55: Project Report on Blood Donation System

Coding:

FOR FORM-1

FOR PASSWORD:-Private Sub command1_Click()

If txtpassword = "" Then

Form2.Show

Form1.Hide

Else

MsgBox "Sorry!!Invalid Password,Try Again"

txtpassword = ""

txtpassword.SetFocus

End If

End Sub

FOR FORM-2C:\Documents and Settings\GARIMA\My

Documents\Session 3 Ex-2_files

55

Page 56: Project Report on Blood Donation System

TO SHOW FORM’S:-

Private Sub mnubgwise_Click()

Form2.Hide

Form6.Show

End Sub

Private Sub mnudd_Click()

Form2.Hide

Form5.Show

End Sub

Private Sub mnudeleted_Click()

Form2.Hide

frmDeleteDeptt.Show

End Sub

Private Sub mnudu_Click()

Form2.Hide

Form4.Show

End Sub

Private Sub mnuexit_Click()

End

End Sub

Private Sub mnunr_Click()

Form2.Hide

Form3.Show

End Sub

FOR FORM-3

FOR SAVE RECORD:-

56

Page 57: Project Report on Blood Donation System

Private Sub command1_Click()

On Error GoTo myerror:

If text1 = "" Or text2 = "" Or Text3 = "" Or Text4 = "" Or Text5 = ""

Or Text6 = "" Or Combo1 = "" Or Combo2 = "" Or Combo3 = "" Or

Combo4 = "" Or Combo5 = "" Then

MsgBox "Fill up all fields"

Exit Sub

End If

Dim strsql As String

strsql = "Select * from registration"

Set rs = New ADODB.Recordset

rs.Open strsql, con, adOpenForwardOnly, adLockOptimistic

If MsgBox(" Are you sure(Y/N)???", 4) = 7 Then Exit Sub

rs.AddNew

If Not rs.EOF Then

rs.Fields("Donor ID") = text1.Text

rs.Fields("Name") = UCase$(text2.Text)

rs.Fields("Phone no") = (Text3.Text)

rs.Fields("E-mail ID") = (Text4.Text)

rs.Fields("Address") = UCase$(Text6.Text)

rs.Fields("Occupation") = UCase$(Combo1.Text)

rs.Fields("Blood Group") = UCase$(Combo2.Text)

rs.Fields("Department") = UCase$(Combo3.Text)

rs.Fields("Faculty") = UCase$(Combo4.Text)

rs.Fields("Hall") = UCase$(Combo5.Text)

rs.Fields("Enrollment no/Employee ID") = Text5.Text

rs.Update

End If

57

Page 58: Project Report on Blood Donation System

rs.Close

myerror:

Call error

End Sub

FOR CANCEL:-

Private Sub command2_Click()

text2.Text = Clear

Text3.Text = Clear

Text4.Text = Clear

Text5.Text = Clear

Text6.Text = Clear

Combo1.Text = Clear

Combo2.Text = Clear

Combo3.Text = Clear

Combo4.Text = Clear

Combo5.Text = Clear

text2.SetFocus

End Sub

FOR BACK:-

Private Sub Command3_Click()

text2.Text = Clear

Text3.Text = Clear

Text4.Text = Clear

Text5.Text = Clear

Text6.Text = Clear

Combo1.Text = Clear

58

Page 59: Project Report on Blood Donation System

Combo2.Text = Clear

Combo3.Text = Clear

Combo4.Text = Clear

Combo5.Text = Clear

text2.SetFocus

Form3.Hide

Form2.Show

End Sub

FOR DATA LINK:-

Private Sub Form_Load()

On Error GoTo myerror:

Set con = CreateObject("Adodb.connection")

con.Provider = "Microsoft.jet.oledb.4.0"

con.Open App.Path & "\db1.mdb"

Dim strsql As String

strsql = "Select distinct Faculty from registration"

Set rs = New ADODB.Recordset

rs.Open strsql, con, adOpenForwardOnly, adLockOptimistic

Combo1.AddItem "Student"

Combo1.AddItem "Employee"

Combo1.AddItem "Others"

While Not rs.EOF

Combo3.AddItem rs.Fields("Faculty")

rs.MoveNext

Wend

rs.Close

Dim strsql1 As String

59

Page 60: Project Report on Blood Donation System

strsql1 = "Select distinct Department from registration"

Set rs1 = New ADODB.Recordset

rs1.Open strsql1, con, adOpenForwardOnly, adLockOptimistic

While Not rs1.EOF

Combo4.AddItem rs1.Fields("Department")

rs1.MoveNext

Wend

rs1.Close

Dim strsql2 As String

strsql2 = "Select distinct Hall from registration"

Set rs2 = New ADODB.Recordset

rs2.Open strsql2, con, adOpenForwardOnly, adLockOptimistic

While Not rs2.EOF

Combo5.AddItem rs2.Fields("Hall")

rs2.MoveNext

Wend

rs2.Close

text1.Enabled = False

'Blood Group setting

Combo2.AddItem "A+"

Combo2.AddItem "A-"

Combo2.AddItem "B+"

Combo2.AddItem "B-"

Combo2.AddItem "O+"

Combo2.AddItem "O-"

Combo2.AddItem "AB+"

Combo2.AddItem "AB-"

myerror:

60

Page 61: Project Report on Blood Donation System

Call error

End Sub

Private Sub Form_Unload(Cancel As Integer)

con.Close

End Sub

Private Sub Text2_GotFocus()

On Error GoTo myerror:

Set rs3 = New ADODB.Recordset

rs3.Open "registration", con, adOpenForwardOnly,

adLockOptimistic

If rs3.EOF = True Then

text1.Text = "D" & 1

GoTo ext:

End If

rs3.MoveLast

Dim strcode As String

strcode = rs3.Fields("Donor ID")

text1.Text = "D" & Val(Mid$(strcode, 2, Len(strcode) - 1)) + 1

ext:

rs3.Close

myerror:

Call error

End Sub

Private Sub error()

If Err.Number <> 0 Then

MsgBox ("Error: " & Err.Description)

Exit Sub

End If

61

Page 62: Project Report on Blood Donation System

End Sub

FOR FORM-4

GENERAL DECLARATION:-

Dim con As ADODB.Connection

FOR UPDATION:-

Private Sub command1_Click()

On Error GoTo myerror:

If text1 = "" Or text2 = "" Or Text3 = "" Or Text4 = "" Or Text5 = ""

Or Text6 = "" Or Combo1 = "" Or Combo2 = "" Or Combo3 = "" Or

Combo4 = "" Or Combo5 = "" Then

MsgBox "Fill up all fields"

Exit Sub

End If

Dim strsql As String

strsql = "Select * from registration where [Donor ID]='" & text1.Text

& "'"

Set rs = New ADODB.Recordset

rs.Open strsql, con, adOpenForwardOnly, adLockOptimistic

If MsgBox(" Are you sure(Y/N)???", 4) = 7 Then Exit Sub

rs.Update("Name") = text2.Text

rs.Update("Phone no") = Text3.Text

rs.Update("E-mail ID") = Text4.Text

rs.Update("Address") = Text5.Text

rs.Update("Occupation") = Combo1.Text

rs.Update("Blood Group") = Combo2.Text

rs.Close

62

Page 63: Project Report on Blood Donation System

MsgBox "Your change has been saved!!"

myerror:

Call error

End Sub

FOR CANCEL:-

Private Sub command2_Click()

text1.Text = Clear

text2.Text = Clear

Text3.Text = Clear

Text4.Text = Clear

Text5.Text = Clear

Combo1.Text = Clear

Combo2.Text = Clear

text1.SetFocus

Form4.Hide

Form2.Show

End Sub

FOR BACK:-

Private Sub Command3_Click()

text1.Text = Clear

text2.Text = Clear

Text3.Text = Clear

Text4.Text = Clear

Text5.Text = Clear

Combo1.Text = Clear

Combo2.Text = Clear

63

Page 64: Project Report on Blood Donation System

End Sub

FOR FORM:-

Private Sub Form_Load()

On Error GoTo myerror:

Set con = CreateObject("Adodb.connection")

con.Provider = "Microsoft.jet.oledb.4.0"

con.Open App.Path & "\db1.mdb"

Dim strsql As String

strsql = "Select distinct Faculty from registration"

Set rs = New ADODB.Recordset

rs.Open strsql, con, adOpenForwardOnly, adLockOptimistic

Combo1.AddItem "Student"

Combo1.AddItem "Employee"

Combo1.AddItem "Others"

While Not rs.EOF

Combo3.AddItem rs.Fields("Faculty")

rs.MoveNext

Wend

rs.Close

Dim strsql1 As String

strsql1 = "Select distinct Department from registration"

Set rs1 = New ADODB.Recordset

rs1.Open strsql1, con, adOpenForwardOnly, adLockOptimistic

While Not rs1.EOF

Combo4.AddItem rs1.Fields("Department")

rs1.MoveNext

Wend

64

Page 65: Project Report on Blood Donation System

rs1.Close

Dim strsql2 As String

strsql2 = "Select distinct Hall from registration"

Set rs2 = New ADODB.Recordset

rs2.Open strsql2, con, adOpenForwardOnly, adLockOptimistic

While Not rs2.EOF

Combo5.AddItem rs2.Fields("Hall")

rs2.MoveNext

Wend

rs2.Close

'Blood Group setting

Combo2.AddItem "A+"

Combo2.AddItem "A-"

Combo2.AddItem "B+"

Combo2.AddItem "B-"

Combo2.AddItem "O+"

Combo2.AddItem "O-"

Combo2.AddItem "AB+"

Combo2.AddItem "AB-"

myerror:

Call error

End Sub

Private Sub error()

If Err.Number <> 0 Then

MsgBox ("Error: " & Err.Description)

Exit Sub

End If

End Sub

65

Page 66: Project Report on Blood Donation System

Private Sub Form_Unload(Cancel As Integer)

con.Close

End Sub

Private Sub Text1_Change()

text2.Enabled = True

Text3.Enabled = True

Text4.Enabled = True

Text5.Enabled = True

Combo1.Enabled = True

Combo2.Enabled = True

command1.Enabled = True

Label4.Enabled = True

Label5.Enabled = True

Label6.Enabled = True

Label7.Enabled = True

Label8.Enabled = True

Label9.Enabled = True

Label10.Enabled = True

Label11.Enabled = True

Label12.Enabled = True

Dim strsql10 As String

strsql10 = "Select * from registration where [Donor ID]='" &

text1.Text & "'"

Set rs10 = New ADODB.Recordset

rs10.Open strsql10, con, adOpenForwardOnly, adLockOptimistic

If Not rs10.EOF Then

text2.Text = rs10.Fields("Name")

66

Page 67: Project Report on Blood Donation System

Text3.Text = rs10.Fields("Phone no")

Text4.Text = rs10.Fields("E-mail ID")

Text5.Text = rs10.Fields("Address")

Combo1.Text = rs10.Fields("Occupation")

Combo2.Text = rs10.Fields("Blood Group")

End†f

rs10.Close

End Sub

Private Sub Text6_Change()

text1.Enabled = True

text2.Enabled = True

Text3.Enabled = True

Text4.Enabled = True

Combo1.Enabled = True

Combo2.Enabled = True

command1.Enabled = True

Label4.Enabled = True

Label5.Enabled = True

Label6.Enabled = True

Label7.Enabled = True

label3.Enabled = True

Label10.Enabled = True

Label11.Enabled = True

Label12.Enabled = True

Dim strsql11 As String

strsql11 = "Select * from registration where [Enrollment

no/Employee ID]='" & Text6.Text & "'"

Set rs11 = New ADODB.Recordset

67

Page 68: Project Report on Blood Donation System

rs11.Open strsql11, con, adOpenForwardOnly, adLockOptimistic

If Not rs11.EOF Then

text1.Text = rs11.Fields("Donor ID")

text2.Text = rs11.Fields("Name")

Text3.Text = rs11.Fields("Phone no")

Text4.Text = rs11.Fields("E-mail ID")

Combo1.Text = rs11.Fields("Occupation")

Combo2.Text = rs11.Fields("Blood Group")

End If

rs11.Close

End Sub

FOR FORM-5

GENERAL DECLARATION:-

Dim con As ADODB.Connection

FOR DELETION:-

Private Sub command1_Click()

On Error GoTo myerror:

Dim strsql As String

strsql = "Select * from registration where [Donor ID]='" & text1.Text

& "'"

Set rs = New ADODB.Recordset

rs.CursorLocation = adUseClient

rs.Open strsql, con, adOpenForwardOnly, adLockOptimistic

If MsgBox(" Are you sure(Y/N)???", 4) = 7 Then Exit Sub

rs.Delete

68

Page 69: Project Report on Blood Donation System

rs.Close

MsgBox "Record Deleted!!"

Form2.Show

Form5.Hide

myerror:

End Sub

FOR BACK:-

Private Sub Command3_Click()

text1.Text = Clear

text2.Text = Clear

Text3.Text = Clear

Text4.Text = Clear

Text6.Text = Clear

Combo1.Text = Clear

Combo2.Text = Clear

text1.SetFocus

Form4.Hide

Form2.Show

End Sub

FOR CANCEL:-

Private Sub command2_Click()

text1.Text = Clear

text2.Text = Clear

Text3.Text = Clear

Text4.Text = Clear

Text5.Text = Clear

Combo1.Text = Clear

69

Page 70: Project Report on Blood Donation System

Combo2.Text = Clear

End Sub

Private Sub Form_Load()

On Error GoTo myerror:

Set con = CreateObject("Adodb.connection")

con.Provider = "Microsoft.jet.oledb.4.0"

con.Open App.Path & "\db1.mdb"

myerror:

Call error

End Sub

Private Sub error()

If Err.Number <> 0 Then

MsgBox ("Error: " & Err.Description)

Exit Sub

End If

End Sub

Private Sub Form_Unload(Cancel As Integer)

con.Close

End Sub

Private Sub Image2_Click()

End Sub

Private Sub Text1_Change()

text2.Enabled = True

Text3.Enabled = True

Text4.Enabled = True

Text5.Enabled = True

Combo1.Enabled = True

Combo2.Enabled = True

70

Page 71: Project Report on Blood Donation System

command1.Enabled = True

Label4.Enabled = True

Label5.Enabled = True

Label6.Enabled = True

Label7.Enabled = True

Label8.Enabled = True

Label9.Enabled = True

Label10.Enabled = True

Label11.Enabled = True

Label12.Enabled = True

Dim strsql10 As String

strsql10 = "Select * from registration where [Donor ID]='" &

text1.Text & "'"

Set rs10 = New ADODB.Recordset

rs10.Open strsql10, con, adOpenForwardOnly, adLockOptimistic

If Not rs10.EOF Then

text2.Text = rs10.Fields("Name")

Text3.Text = rs10.Fields("Phone no")

Text4.Text = rs10.Fields("E-mail ID")

Text5.Text = rs10.Fields("Address")

Combo1.Text = rs10.Fields("Occupation")

Combo2.Text = rs10.Fields("Blood Group")

End If

rs10.Close

End Sub

Private Sub Text6_Change()

71

Page 72: Project Report on Blood Donation System

text1.Enabled = True

text2.Enabled = True

Text3.Enabled = True

Text4.Enabled = True

Text5.Enabled = True

Combo1.Enabled = True

Combo2.Enabled = True

command1.Enabled = True

Label4.Enabled = True

Label5.Enabled = True

Label6.Enabled = True

Label7.Enabled = True

Label8.Enabled = True

label3.Enabled = True

Label10.Enabled = True

Label11.Enabled = True

Label12.Enabled = True

Dim strsql11 As String

strsql11 = "Select * from registration where [Enrollment

no/Employee ID]='" & Text6.Text & "'"

Set rs11 = New ADODB.Recordset

rs11.Open strsql11, con, adOpenForwardOnly, adLockOptimistic

If Not rs11.EOF Then

text1.Text = rs11.Fields("Donor ID")

text2.Text = rs11.Fields("Name")

Text3.Text = rs11.Fields("Phone no")

Text4.Text = rs11.Fields("E-mail ID")

Text5.Text = rs11.Fields("Address")

72

Page 73: Project Report on Blood Donation System

Combo1.Text = rs11.Fields("Occupation")

Combo2.Text = rs11.Fields("Blood Group")

End If

rs11.Close

End Sub

FOR FORM-6

Dim con As ADODB.Connection

Dim selec As Integer

FOR SEARCH:-

Private Sub command1_Click()

On Error GoTo myerror:

Dim strsql As String

If Not Combo1.Text = "" Then

strsql = "SELECT registration.[Donor ID], registration.Name,

registration.[Phone no],registration.[E-mail

ID],registration.Address,registration.Occupation,registration.[Blood

Group] FROM registration WHERE [Blood Group]='" &

Combo1.Text & "'"

End If

Set rs = New ADODB.Recordset

rs.CursorLocation = adUseClient

rs.Open strsql, con, adOpenForwardOnly, adLockOptimistic

Set DataGrid1.DataSource = rs

DataGrid1.Columns(0).Caption = "D.ID"

DataGrid1.Columns(0).Width = 500

DataGrid1.Columns(1).Width = 700

73

Page 74: Project Report on Blood Donation System

DataGrid1.Columns(2).Width = 1500

DataGrid1.Columns(3).Width = 2500

DataGrid1.Columns(4).Width = 2500

DataGrid1.Columns(5).Width = 500

DataGrid1.Columns(6).Width = 900

DataGrid1.Columns(7).Width = 2200

DataGrid1.Columns(8).Width = 2200

DataGrid1.Columns(9).Width = 1500

DataGrid1.Columns(10).Width = 900

DataGrid1.Refresh

'rs.Close

myerror:

Call error

End Sub

FOR DONOR DETAILS:-

Private Sub command2_Click()

Form6.Hide

Form2.Show

End Sub

FOR BACK:-

Private Sub Command3_Click()

Form8.Show

End Sub

Private Sub DataGrid1_DblClick()

Form4.Show

Call datashow

74

Page 75: Project Report on Blood Donation System

End Sub

Private Sub Form_Load()

Call datashow

End Sub

Private Sub error()

If Err.Number <> 0 Then

MsgBox ("Error: " & Err.Description)

Exit Sub

End If

End Sub

Sub datashow()

On Error GoTo myerror:

Set con = CreateObject("Adodb.connection")

con.Provider = "Microsoft.jet.oledb.4.0"

con.Open App.Path & "\db1.mdb"

'Blood Group setting

Combo1.AddItem "A+"

Combo1.AddItem "A-"

Combo1.AddItem "B+"

Combo1.AddItem "B-"

Combo1.AddItem "O+"

Combo1.AddItem "O-"

Combo1.AddItem "AB+"

Combo1.AddItem "AB-"

Dim strsql As String

strsql = "SELECT registration.[Donor ID], registration.Name,

registration.[Phone no],registration.[E-mail

ID],registration.Address,registration.Occupation,registration.[Blood

75

Page 76: Project Report on Blood Donation System

Group],registration.[Enrollment no/Employee

ID],registration.Department,registration.Faculty,registration.Hall

FROM registration "

Set rs = New ADODB.Recordset

rs.CursorLocation = adUseClient

rs.Open strsql, con, adOpenForwardOnly, adLockOptimistic

Set DataGrid1.DataSource = rs

DataGrid1.Columns(0).Caption = "D.ID"

DataGrid1.Columns(0).Width = 500

DataGrid1.Columns(1).Width = 700

DataGrid1.Columns(2).Width = 1500

DataGrid1.Columns(3).Width = 2500

DataGrid1.Columns(4).Width = 2500

DataGrid1.Columns(5).Width = 500

DataGrid1.Columns(6).Width = 900

DataGrid1.Columns(7).Width = 2200

DataGrid1.Columns(8).Width = 2200

DataGrid1.Columns(9).Width = 1500

DataGrid1.Columns(10).Width = 900

DataGrid1.Refresh

'rs.Close

selec = 0

myerror:

Call error

End Sub

Private Sub Form_Unload(Cancel As Integer)

con.Close

End Sub

76

Page 77: Project Report on Blood Donation System

77

Page 78: Project Report on Blood Donation System

7.) CONCLUSION

78

Page 79: Project Report on Blood Donation System

Conclusion:

Overall conclusion is that the efficiency and quality are bet served by

the project. by going proper software development phase step by step

through the each phases. Proper testing of the project, its modularity

& simplicity increases its productivity of the project in many ways.

And its visual environment plays the major role in this.

This project has been developed to enable users to manage their daily

work efficiency.

79

Page 80: Project Report on Blood Donation System

8.) FUTURE SCOPE

80

Page 81: Project Report on Blood Donation System

FUTURE SCOPE:

Suppose in the future activities or the method associated with the

Blood Donation System. System is changed or they want some more

activities to be automated, then is such cases this project can be

easily to handle and anyone can operate it. It will not only reduce the

81

Page 82: Project Report on Blood Donation System

cost of maintenance of records but it will be also. Improve the

efficiency of work.

82

Page 83: Project Report on Blood Donation System

9.) BIBLIOGRAPHY:

83

Page 84: Project Report on Blood Donation System

BIBLIOGRAPHY:

Mastering Visual Basic 6.0 BY Evangelos Petroutsos

Visual Basic 6.0 programming BY Steven Holzner

Microsoft Access BY Harkins, ETAL

Software Engineering BY Pankaj Jalote

Analysis and Design of Information BY E.M Awad

www.bloodbank.com

84

Page 85: Project Report on Blood Donation System

85

Page 86: Project Report on Blood Donation System

86

Page 87: Project Report on Blood Donation System

87

Page 88: Project Report on Blood Donation System

88

Page 89: Project Report on Blood Donation System

89

Page 90: Project Report on Blood Donation System

90

Page 91: Project Report on Blood Donation System

91

Page 92: Project Report on Blood Donation System

92

Page 93: Project Report on Blood Donation System

93

Page 94: Project Report on Blood Donation System

94

Page 95: Project Report on Blood Donation System

95

Page 96: Project Report on Blood Donation System

96

Page 97: Project Report on Blood Donation System

97

Page 98: Project Report on Blood Donation System

98

Page 99: Project Report on Blood Donation System

99

Page 100: Project Report on Blood Donation System

100

Page 101: Project Report on Blood Donation System

101

Page 102: Project Report on Blood Donation System

102

Page 103: Project Report on Blood Donation System

103

Page 104: Project Report on Blood Donation System

104

Page 105: Project Report on Blood Donation System

105

Page 106: Project Report on Blood Donation System

106

Page 107: Project Report on Blood Donation System

107

Page 108: Project Report on Blood Donation System

108

Page 109: Project Report on Blood Donation System

109

Page 110: Project Report on Blood Donation System

110

Page 111: Project Report on Blood Donation System

111

Page 112: Project Report on Blood Donation System

112

Page 113: Project Report on Blood Donation System

113

Page 114: Project Report on Blood Donation System

114

Page 115: Project Report on Blood Donation System

115

Page 116: Project Report on Blood Donation System

116

Page 117: Project Report on Blood Donation System

117

Page 118: Project Report on Blood Donation System

118

Page 119: Project Report on Blood Donation System

119

Page 120: Project Report on Blood Donation System

120

Page 121: Project Report on Blood Donation System

121

Page 122: Project Report on Blood Donation System

122

Page 123: Project Report on Blood Donation System

123

Page 124: Project Report on Blood Donation System

124

Page 125: Project Report on Blood Donation System

125

Page 126: Project Report on Blood Donation System

126

Page 127: Project Report on Blood Donation System

127

Page 128: Project Report on Blood Donation System

128

Page 129: Project Report on Blood Donation System

129

Page 130: Project Report on Blood Donation System

130

Page 131: Project Report on Blood Donation System

131

Page 132: Project Report on Blood Donation System

132

Page 133: Project Report on Blood Donation System

133

Page 134: Project Report on Blood Donation System

134

Page 135: Project Report on Blood Donation System

135

Page 136: Project Report on Blood Donation System

136

Page 137: Project Report on Blood Donation System

137

Page 138: Project Report on Blood Donation System

138

Page 139: Project Report on Blood Donation System

139

Page 140: Project Report on Blood Donation System

140

Page 141: Project Report on Blood Donation System

141

Page 142: Project Report on Blood Donation System

142

Page 143: Project Report on Blood Donation System

143

Page 144: Project Report on Blood Donation System

144

Page 145: Project Report on Blood Donation System

145

Page 146: Project Report on Blood Donation System

146

Page 147: Project Report on Blood Donation System

147

Page 148: Project Report on Blood Donation System

148

Page 149: Project Report on Blood Donation System

149

Page 150: Project Report on Blood Donation System

150

Page 151: Project Report on Blood Donation System

151

Page 152: Project Report on Blood Donation System

152

Page 153: Project Report on Blood Donation System

153

Page 154: Project Report on Blood Donation System

154

Page 155: Project Report on Blood Donation System

155

Page 156: Project Report on Blood Donation System

156