Crime File System 1
PROJECT TITLE :-
POLICE
STATION
MANAGEMENT
SYSTEM
Crime File System 2
KONKAN GYANPEETH COLLEGE OF ENGINEERING
CERTIFICATE
This is to certify that the project titled POLICE STATION MANAGEMENT has been
successfully & satisfactorily completed and submitted by:
PARESH PATIL
SWAPNIL JAWALE
ABHIJIT SATPUTE
During the academic year 2011-2012 as per the syllabus of
“UNIVERSITY OF MUMBAI”
Project Guide Sign Principal Sign
Mr. Yogesh salve Dr.M.B.Lele
Crime File System 3
FRONT END-VB
BACKEND-SQL
Description of the project :
This project is based on the police station management.
main form is about police staion database fot criminal record and
compliant status.
in this form user can enter or view compliant,charge sheet history and
various records.
in this database information about criminals,most wanted and registered FIR is
available.user can also register an FIR in this database.
Crime File System 4
CONTENTS
1. INTRODUCTION 4
2. SYSTEM ANALYSIS 7
2.1 Introduction
2.2 Existing System
2.3 Data Flow Diagram
3. SYSTEM DESIGN 15
3.1 Input design
Crime File System 5
3.2 Output design
3.3 Form design
3.4 Database design
4. SYSTEM IMPLEMENTATION 32
4.1 About Language
4.2 System Configuration
5. APPENDIX 44
5.1 Source Code
6. CONCLUSION 49
7. BIBLIOGRAPHY 50
1. INTRODUCTION
Crime File System is a system used to report crimes. This project will be
done using VB 6.0 as front end, and MS Access as back end. It can used to report
crime. This project is mainly useful for police stations. This system will help to
manage all the activities in a police station using computers. Currently all the
works are done manually, by computerizing all the activities inside a police station
can be managed easily and effectively.
Crime File System 6
The modules involved in this project are:
Login for user and admin
Complaint registration
View complaint status
Criminal register management
FIR Management
Case History Details management
Managing Postmortem details
Prisoners register management
Manage list about most wanted criminals
1. LOGIN
This includes Administrator and User login. There will be a username and
password to login into the system to use all the facilities.
2. COMPLAINT REGISTRATION
This module helps to register the details about the crime. This is done by
entering some details, such as incident details, Victim details, crime details etc
3. VIEW COMPLAINT STATUS
Crime File System 7
This module allows us to view the status of the complaint that you have
registered earlier.
4. CRIMINAL REGISTER MANAGEMENT
Here we can have the facility to view the details of the criminals. The
administrator can add new criminal’s details and save it in a database. This can be
done by entering details such as criminal number, age, occupation, type of crime
etc.
5. FIR MANGEMENT
This module allows viewing the First Information Report of all the crimes
that took place at recent years. The administrator can enter FIR information and
save it in a database.
6. CASE HISTORY DETAILS MANAGEMENT
Here we can view the details of the case, date of occurrence, the type of
crime and place of occurrence etc…
7. MANAGING POSTMORTEM DETAILS
This module helps to view the postmortem details of a person. The details
such as date of death cause of death, name of the doctor etc.
Crime File System 8
8. PRISONER REGISTER MANGEMENT
This module helps the administrator as well as the user to store, view and manage
the details of the past and present prisoners.
9. MANAGE THE LIST OF MOST WANTED CRIMINALS
This is an additional feature added to this Software, which helps us to make a
quick search about the most wanted criminals. This helps to always keep track of and
identify a person quickly, who is a most wanted criminal.
2. SYSTEM ANALYSIS
2.1 Introduction to System Analysis
System analysis is a process of gathering and interpreting facts,
diagnosing problems and the information to recommend improvements on
the system. It is a problem solving activity that requires intensive
communication between the system users and system developers. System
analysis or study is an important phase of any system development
process. The system is studied to the minutest detail and analyzed. The
system analyst plays the role of the interrogator and dwells deep into the
Crime File System 9
working of the present system. The system is viewed as a whole and the
input to the system are identified. The outputs from the organizations are
traced to the various processes. System analysis is concerned with
becoming aware of the problem, identifying the relevant and decisional
variables, analyzing and synthesizing the various factors and determining
an optimal or at least a satisfactory solution or program of action.
A detailed study of the process must be made by various techniques
like interviews, questionnaires etc. The data collected by these sources
must be scrutinized to arrive to a conclusion. The conclusion is an
understanding of how the system functions. This system is called the
existing system. Now the existing system is subjected to close study and
problem areas are identified. The designer now functions as a problem
solver and tries to sort out the difficulties that the enterprise faces. The
solutions are given as proposals. The proposal is then weighed with the
existing system analytically and the best one is selected. The proposal is
presented to the user for an endorsement by the user. The proposal is
reviewed on user request and suitable changes are made. This is loop that
ends as soon as the user is satisfied with proposal.
Preliminary study is the process of gathering and interpreting facts,
using the information for further studies on the system. Preliminary study
is problem solving activity that requires intensive communication between
Crime File System 10
the system users and system developers. It does various feasibility studies.
In these studies a rough figure of the system activities can be obtained,
from which the decision about the strategies to be followed for effective
system study and analysis can be taken.
2.2 Existing System
Lack of security of data.
More man power.
Time consuming.
Consumes large volume of pare work.
Needs manual calculations.
No direct role for the higher officials.
Crime File System 11
2.3 Data Flow Diagram
LEVEL 0 DFD
Crime File System 12
LEVEL 1 DFD
Crime File System 13
LEVEL 2 DFD
Crime File System 14
Crime File System 15
LEVEL 3 DFD
LEVEL 4 DFD
Crime File System 16
3. SYSTEM DESIGN
Introduction to System Design
Crime File System 17
Design is the first step into the development phase for any engineered
product or system. Design is a creative process. A good design is the key
to effective system. The term “design” is defined as “the process of
applying various techniques and principles for the purpose of defining a
process or a system in sufficient detail to permit its physical realization”. It
may be defined as a process of applying various techniques and principles
for the purpose of defining a device, a process or a system in sufficient
detail to permit its physical realization. Software design sits at the
technical kernel of the software engineering process and is applied
regardless of the development paradigm that is used. The system design
develops the architectural detail required to build a system or product. As
in the case of any systematic approach, this software too has undergone
the best possible design phase fine tuning all efficiency, performance and
accuracy levels. The design phase is a transition from a user oriented
document to a document to the programmers or database personnel.
System design goes through two phases of development: Logical and
Physical Design.
3.1 Input design
The design of input focuses on controlling the amount of input
required, controlling the errors, avoiding delay, avoiding extra steps and
keeping the process simple. The input is designed in such a way so that it
provides security and ease of use with retaining the privacy. Input Design
considered the following things:
o What data should be given as input?
o How the data should be arranged or coded?
o The dialog to guide the operating personnel in providing input.
o Methods for preparing input validations and steps to follow when error
occur.
Crime File System 18
3.2 Output Design
A quality output is one, which meets the requirements of the end user
and presents the information clearly. In output design it is determined how
the information is to be displaced for immediate need and also the hard
copy output. It is the most important and direct source information to the
user. Efficient and intelligent output design improves the system’s
relationship to help user decision-making.
Designing computer output should proceed in an organized, well
thought out manner; the right output must be developed while ensuring
that each output element is designed so that people will find the system
can use easily and effectively. When analysis design computer output, they
should :
Identify the specific output that is needed to meet the requirements.
Select methods for presenting information.
Create document, report, or other formats that contain information
produced by the system.
3.3 Form design
Progress
Crime File System 19
Crime File System
Crime File System 20
Login
Add New User
Crime File System 21
Admin Complaint Status
Crime File System 22
Criminal Register
Delete User
Charge Sheet
Crime File System 23
FIR
Post mortem
Crime File System 24
Crime File System 25
Post mortem report
Complaint Status
Crime File System 26
Crime Report
Crime File System 27
FIR Report
History Sheet
Crime File System 28
3.4 Database Design
A database is an organized mechanism that has the capability of
storing information through which a user can retrieve stored information
in an effective and efficient manner. The data is the purpose of any
database and must be protected.
The database design is a two level process. In the first step, user
requirements are gathered together and a database is designed which will
meet these requirements as clearly as possible. This step is called
Information Level Design and it is taken independent of any individual
DBMS.
In the second step, this Information level design is transferred into a
design for the specific DBMS that will be used to implement the system in
question. This step is called Physical Level Design, concerned with the
characteristics of the specific DBMS that will be used. A database design
runs parallel with the system design. The organization of the data in the
database is aimed to achieve the following two major objectives.
Data Integrity
Data independence
Normalization is the process of decomposing the attributes in an
application, which results in a set of tables with very simple structure. The
purpose of normalization is to make tables as simple as possible.
Normalization is carried out in this system for the following reasons.
To structure the data so that there is no repetition of data , this helps in
saving.
To permit simple retrieval of data in response to query and report request.
Crime File System 29
Table Design
Table: Admin Login
Table: Charge Sheet
Crime File System 30
Table: Complaint Reg
Table: Complaint
Table: Criminal reg
Crime File System 31
Table: Most Wanted
Table: History
Table: Prisoners Reg
Crime File System 32
Table: Prisoners Temp
Table: Post Mortem
Crime File System 33
Table: FIR
Crime File System 34
4 SYSTEM IMPLEMENTATION
4.1 About Language
The Control Properties
Before writing an event procedure for the control to response to a user's input, you have
to set certain properties for the control to determine its appearance and how it will work
with the event procedure. You can set the properties of the controls in the properties
window or at runtime.
Handling some of the common controls
The Text Box
The text box is the standard control for accepting input from the user as well as to display
the output. It can handle string (text) and numeric data but not images or pictures. String
in a text box can be converted to a numeric data by using the function Val(text). The
following example illustrates a simple program that processes the input from the user.
Example
In this program, two text boxes are inserted into the form together with a few labels. The
two text boxes are used to accept inputs from the user and one of the labels will be used
to display the sum of two numbers that are entered into the two text boxes. Besides, a
command button is also programmed to calculate the sum of the two numbers using the
plus operator. The program use creates a variable sum to accept the summation of values
Crime File System 35
from text box 1 and text box 2.The procedure to calculate and to display the output on the
label is shown below. The output is shown in Figure 3.2
Private Sub Command1_Click ()
‘To add the values in text box 1 and text box 2
Sum = Val (Text1.Text) + Val (Text2.Text)
‘To display the answer on label 1
Label1.Caption = Sum
End Sub
Figure
The Label
The label is a very useful control for Visual Basic, as it is not only used to provide
instructions and guides to the users, it can also be used to display outputs. One of its most
important properties is Caption. Using the syntax label.Caption, it can display text and
Crime File System 36
numeric data . You can change its caption in the properties window and also at runtime.
Please refer to Example 3.1 and Figure 3.1 for the usage of label.
The Command Button
The command button is one of the most important controls as it is used to execute
commands. It displays an illusion that the button is pressed when the user click on it. The
most common event associated with the command button is the Click event, and the
syntax for the procedure is
Private Sub Command1_Click ()
Statements
End Sub
The Picture Box
The Picture Box is one of the controls that is used to handle graphics. You can load a
picture at design phase by clicking on the picture item in the properties window and
select the picture from the selected folder. You can also load the picture at runtime using
the LoadPicture method. For example, the statement will load the picture grape.gif into
the picture box.
Picture1.Picture=LoadPicture ("C:\VB program\Images\grape.gif")
You will learn more about the picture box in future lessons. The image in the picture box
is not resizable.
Crime File System 37
The Image Box
The Image Box is another control that handles images and pictures. It functions almost
identically to the picture box. However, there is one major difference, the image in an
Image Box is stretchable, which means it can be resized. This feature is not available in
the Picture Box. Similar to the Picture Box, it can also use the LoadPicture method to
load the picture. For example, the statement loads the picture grape.gif into the image
box.
Image1.Picture=LoadPicture ("C:\VB program\Images\grape.gif")
The List Box
The function of the List Box is to present a list of items where the user can click and
select the items from the list. In order to add items to the list, we can use the AddItem
method. For example, if you wish to add a number of items to list box 1, you can key in
the following statements
Example
Private Sub Form_Load ( )
List1.AddItem “Lesson1”
List1.AddItem “Lesson2”
List1.AddItem “Lesson3”
List1.AddItem “Lesson4”
End Sub
Crime File System 38
The items in the list box can be identified by the ListIndex property, the value of the
ListIndex for the first item is 0, the second item has a ListIndex 1, and the second item
has a ListIndex 2 and so on
The Combo Box
The function of the Combo Box is also to present a list of items where the user can click
and select the items from the list. However, the user needs to click on the small
arrowhead on the right of the combo box to see the items which are presented in a drop-
down list. In order to add items to the list, you can also use the AddItem method. For
example, if you wish to add a number of items to Combo box 1, you can key in the
following statements
Example
Private Sub Form_Load ( )
Combo1.AddItem “Item1”
Combo1.AddItem “Item2”
Combo1.AddItem “Item3”
Combo1.AddItem “Item4”
End Sub
The Check Box
The Check Box control lets the user selects or unselects an option. When the Check Box
is checked, its value is set to 1 and when it is unchecked, the value is set to 0. You can
Crime File System 39
include the statements Check1.Value=1 to mark the Check Box and Check1.Value=0 to
unmark the Check Box, as well as use them to initiate certain actions. For example, the
program will change the background color of the form to red when the check box is
unchecked and it will change to blue when the check box is checked. You will learn
about the conditional statement If….Then….Elesif in later lesson. VbRed and vbBlue are
color constants and BackColor is the background color property of the form.
The Option Box
The Option Box control also lets the user selects one of the choices. However, two or
more Option Boxes must work together because as one of the Option Boxes is selected,
the other Option Boxes will be unselected. In fact, only one Option Box can be selected
at one time. When an option box is selected, its value is set to “True” and when it is
unselected; its value is set to “False”. In the following example, the shape control is
placed in the form together with six Option Boxes. When the user clicks on different
option boxes, different shapes will appear. The values of the shape control are 0, 1, and
2,3,4,5 which will make it appear as a rectangle, a square, an oval shape, a rounded
rectangle and a rounded square respectively.
Example
Private Sub Option1_Click ( )
Shape1.Shape = 0
End Sub
Private Sub Option2_Click()
Crime File System 40
Shape1.Shape = 1
End Sub
Private Sub Option3_Click()
Shape1.Shape = 2
End Sub
Private Sub Option4_Click()
Shape1.Shape = 3
End Sub
Private Sub Option5_Click()
Shape1.Shape = 4
End Sub
Private Sub Option6_Click()
Shape1.Shape = 5
End Sub
The Drive List Box
The Drive ListBox is for displaying a list of drives available in your computer. When you
place this control into the form and run the program, you will be able to select different
drives from your computer as shown in Figure 3.3
Crime File System 41
The Directory List Box
The Directory List Box is for displaying the list of directories or folders in a selected
drive. When you place this control into the form and run the program, you will be able to
select different directories from a selected drive in your computer as shown in Figure 3.4
The File List Box
The File List Box is for displaying the list of files in a selected directory or folder. When
you place this control into the form and run the program, you will be able to shown the
list of files in a selected directory as shown in Figure
You can coordinate the Drive List Box, the Directory List Box and the File List Box to
search for the files you want. The procedure will be discussed in later lessons.
MS ACCESS 2003
Microsoft Access is a powerful program to create and manage your databases. It has
many built in features to assist you in constructing and viewing your information. Access
is much more involved and is a more genuine database application than other programs
such as Microsoft Works.
The keywords involved in the process are: Database File, Table, Record, Field, Data-
type. Here is the Hierarchy that Microsoft Access uses in breaking down a database.
Crime File System 42
Database File: This is your main file that encompasses the entire database and that is
saved to your hard-drive or floppy disk.
Example: StudentDatabase.mdb
Table:A table is a collection of data about a specific topic. There can be multiple tables in
a database.
Field: Fields are the different categories within a Table. Tables usually contain multiple
fields.
Datatypes: Datatypes are the properties of each field. A field only has 1 datatype.
Crime File System 43
FieldName) Student LastName
Datatype) Text
Starting Microsoft Access
Two Ways
1. Double click on the Microsoft Access icon on the desktop.
Crime File System 44
2. Click on Start --> Programs --> Microsoft Access
Crime File System 45
Creating New, and Opening Existing Databases
The above picture gives you the option to:
Create a New Database from scratch
Use the wizard to create a New Database
Open an existing database
o The white box gives you the most recent databases you have used. If you
do not see the one you had created, choose the More Files option and hit
OK. Otherwise choose the database you had previously used and click
OK.
Crime File System 46
4.2 System Configuration
HARDWARE REQUIREMENTS
Processor : X86 Compatible processor
with 1.7 GHz Clock speed
RAM : 512 MB or more
Hard disk : 20 GB or more
Monitor : VGA/SVGA
Keyboard : 104 Keys
Mouse : 2 buttons/ 3 buttons
SOFTWARE REQUIREMENTS
Operating System : Windows 2000/XP
Front end : Visual Basic 6.0
Back end : MS ACCES
5 APPENDIX
5.1 Source Code
Add Complaint
Private Sub cmdAdd_Click()
If (cmbComplntNo.Text = "" Or txtStatus.Text = "") Then
MsgBox "Missing Fields", vbInformation, "CFS"
Else
con.Execute ("insert into ComplntStatus values(" + cmbComplntNo.Text + ",'" +
txtStatus.Text + "')")
MsgBox "Status Added Successfully", vbInformation, "Crime File System"
Crime File System 47
txtDetails.Text = ""
txtStatus.Text = ""
cmbComplntNo.SetFocus
End If
End Sub
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdDetails_Click()
Set rs = con.Execute("select Details from ComplaintReg where ComplntNo=" +
cmbComplntNo.Text + "")
If (Not rs.EOF) Then
txtDetails.Text = rs(0)
txtStatus.SetFocus
End If
End Sub
Private Sub Form_Load()
connectdb
Set rs = con.Execute("select ComplntNo from ComplaintReg")
While (Not rs.EOF)
cmbComplntNo.AddItem rs(0)
rs.MoveNext
Wend
rs.Close
End Sub
Add user
Private Sub Form_Load()
connectdb
End Sub
Private Sub cmdAdd_Click()
Set rs = con.Execute("select * from UserLogin where Username='" + txtUsername.Text +
"' and Password='" + txtPassword.Text + "'")
If (Not rs.EOF) Then
MsgBox "Sorry!! User already exists. Try another username", vbCritical, "Crime File
System"
txtPassword.Text = ""
txtUsername.Text = ""
txtUsername.SetFocus
Crime File System 48
Else
con.Execute ("insert into UserLogin values('" + txtUsername.Text + "','" +
txtPassword.Text + "')")
MsgBox "User added sucessfully", vbInformation, "Crime File System"
txtPassword.Text = ""
txtUsername.Text = ""
txtUsername.SetFocus
End If
End Sub
Private Sub cmdCancel_Click()
Unload Me
FIR Report
Dim x As Integer
Private Sub cmdShRpt_Click()
x = cmbMno.Text
If (DataEnvironment1.rsCommand4.State = 1) Then
DataEnvironment1.rsCommand4.Close
Else
DataEnvironment1.Command4 (x)
Load DataReportFIR
DataReportFIR.Show
End If
End Sub
Private Sub Form_Load()
connectdb
Set rs = con.Execute("select Firno from FIR")
While (Not rs.EOF)
cmbMno.AddItem rs(0)
rs.MoveNext
Wend
End Sub
Login
Private Sub cmdAdminLog_Click()
Set rs = con.Execute("Select * from AdminLogin where Username='" + txtUname.Text +
"' and Password='" + txtPass.Text + "'")
Crime File System 49
If (Not rs.EOF) Then
MsgBox "Login Success", vbInformation, "Crime File System"
frmMDI.mnuLogoff.Enabled = True
frmMDI.mnuAdminAddU.Enabled = True
frmMDI.mnuAdminDelU.Enabled = True
frmMDI.mnuActiv.Enabled = True
frmMDI.mnuLogin.Enabled = False
frmMDI.mnuAdminAddComSt.Enabled = True
frmMDI.mnuActivReg.Enabled = True
frmMDI.mnuActivComp.Enabled = True
frmMDI.mnuActivRpt.Enabled = True
Unload Me
Else
MsgBox "Failure", vbCritical, "Crime File System"
End If
'rs.Close
Unload Me
End Sub
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdUserLog_Click()
Set rs = con.Execute("Select * from UserLogin where Username='" + txtUname.Text + "'
and Password='" + txtPass.Text + "'")
If (Not rs.EOF) Then
MsgBox "Login Success", vbInformation, "Crime File System"
frmMDI.mnuLogoff.Enabled = True
frmMDI.mnuLogin.Enabled = False
frmMDI.mnuActiv.Enabled = True
frmMDI.mnuActivReg.Enabled = True
frmMDI.mnuActivComp.Enabled = True
frmMDI.mnuActivRpt.Enabled = True
Unload Me
Else
MsgBox "Failure", vbCritical, "Crime File System"
End If
'rs.Close
End Sub
Private Sub Form_Load()
Crime File System 50
connectdb
End Sub
Private Sub Form_Unload(Cancel As Integer)
con.Close
End Sub
Post Mortem Report
Dim x As Integer
Private Sub cmdShRpt_Click()
x = cmbMno.Text
If (DataEnvironment1.rsCommand3.State = 1) Then
DataEnvironment1.rsCommand3.Close
Else
DataEnvironment1.Command3 (x)
Load DataReportmortem
DataReportmortem.Show
End If
End Sub
Private Sub Form_Load()
connectdb
Set rs = con.Execute("select PMortemNo from Postmortem")
While (Not rs.EOF)
cmbMno.AddItem rs(0)
rs.MoveNext
Wend
End Sub
Splash
Dim i As Integer
Dim x As Integer
Option Explicit
Private Sub Form_Load()
File1.FileName = App.Path
x = File1.ListCount
End Sub
Crime File System 51
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As
Single)
Unload Me
End Sub
Private Sub Form_Unload(Cancel As Integer)
Load frmMDI
frmMDI.Show
End Sub
Private Sub Frame1_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As
Single)
Unload Me
End Sub
Private Sub Timer1_Timer()
If (Image1.Left <= 6480) Then
Image1.Left = Image1.Left + 100
Else
Image1.Left = 0
End If
If (i <= x) Then
Label2.Caption = File1.List(i)
i=i+1
Else
Load frmMDI
frmMDI.Show
Unload Me
End If
End Sub
6. CONCLUSION
CRIME FILE MANAGEMENT SYSTEM initiates the objective of
providing the user with customized and powerful complaint registration and
process management system side software. The software is built with all options
such as complaint registration, prisoner’s registration, and postmortem report
Crime File System 52
generation etc…All the requirements specified during the analysis and design
phase are fully met, thus resulting in the formation of good software. The
interface provided is very user friendly and flexible for all times.
7. BIBLIOGRAPHY
Books
A Complete Guide to Programming in Visual Basic .Net
A Complete Visual Basic 6 Training Course: How to Programme:
Package
Advanced Programming Using Visual Basic: Version 6.0
Crime File System 53
Access 2003 Power Programming with VBA
Advanced MS Visual Basic
Site Address
www.associatedcontent.com
www.members.tripod.com