You are on page 1of 72

Bank Management System

PROJECT REPORT
ON

BANK MANAGEMENT SYSTEM

Submitted in the partial fulfillments of the Requirements For the award of

Submitted By:--

Bank Management System

Acknowledgement
I am thankful to Mr. .. (Final student of MCA from SMU) who helps me to develop this project. My hard work and sincerity help me to overcome the problem that came on the way. Finally I am very grateful to Mr. .. who gives knowledge about the data flow of the project. It is my pleasant duty to thank all the staff member of the computer center who never hesitated me from time during the project. Finally, I gratefully acknowledge the support, encouragement & patience of my family, And as always, nothing in my life would be possible without God, Thank You!

..

Bank Management System

CERTIFICATE
This is to certify that the project titled ___________ ________________ _______________ ___________ is a bonafied work carried out by Mr./ Ms. _____________ _________________ ________________ in partial execution of the from requirement for the award of the degree of ____________ ____________ __________ _______________ ______________ University under the guidance and direction.

Internal guide: H.O.D. Seal

Bank Management System

INDEX S.No. Report Page No.

1. 2. 3 4. 5. 6. 7. 8. 9. 10. 11. 12.

Acknowledgement Certificate Introduction Objective Project Category Tool/ Environment Analysis and Design Program Structure Coding Documentation Future Application References

2 3 5 6 7 15 16 17 21 53 54 55

INTRODUCTION
4

Bank Management System

During the past several decades personnel function has been transformed from a relatively obscure record keeping staff to central and top level management function. There are many factors that have influenced this transformation like technological advances, professionalism, and general recognition of human beings as most important resources. A computer based management system is designed to handle all the primary information required to calculate monthly statements of customer account which include monthly statement of any month. Separate database is maintained to handle all the details required for the correct statement calculation and generation. This project intends to introduce more user friendliness in the various activities such as record updation, maintenance, and searching. The searching of record has been made quite simple as all the details of the customer can be obtained by simply keying in the identification or account number of that customer. Similarly, record maintenance and updation can also be accomplished by using the account number with all the details being automatically generated. These details are also being promptly automatically updated in the master file thus keeping the record absolutely up-to-date. The entire information has maintained in the database or Files and whoever wants to retrieve cant retrieve, only authorization user can retrieve the necessary information which can be easily be accessible from the file.

Bank Management System

Objective of the Project

A computer based management system is designed to handle all the primary information required to calculate monthly statements of customer account which include monthly statement of any month. Separate database is maintained to handle all the details required for the correct statement calculation and generation. This project intends to introduce more user friendliness in the various activities such as record updation, maintenance, and searching. The searching of record has been made quite simple as all the details of the customer can be obtained by simply keying in the identification or account number of that customer. Similarly, record maintenance and updation can also be accomplished by using the account number with all the details being automatically generated. These details are also being promptly automatically updated in the master file thus keeping the record absolutely up-to-date. The main objective of our project is providing the different typed of customers facility, the main objective of this system is to find out the actual customer service. Etc. It should fulfill almost all the process requirements of any Bank. It should be user friendly. It should increase the productivity of bank by utilizing the working hours more and more, with minimum manpower. This project includes the entire upgraded feature required for the computerization banking system. This system is very easy to use, so that any user can use without getting pre-knowledge about this. Its very much user friendly and meet almost all daily working process requirements. This system is completely GUI based and can be use by mouse and as well as keyboard. This system is melded in such a way that has got all features to upgrade without making much change in existing components. The entire information has maintained in the database or Files and whoever wants to retrieve cant retrieve, only authorization user can retrieve the necessary information which can be easily be accessible from the file.

Bank Management System

PROJECT CATEGORY

Inconsistent as it is, try to mimic Visual Basic's own error handling scheme as much as possible. When you call a Visual Basic routine that can fail, what is the standard way that the routine signals the failure to you? It probably won't be via a return value. If it were, procedures, for one, would have trouble signaling failure. Most (but not all) routines raise an error (an exception) when they want to signal failure. (This applies to procedures, functions, and methods.) For example, Create Object raises an exception if it cannot create an objectfor whatever reason; Open does the same if it cannot open a file for you. (Not all routines raise such exceptions. For example, the Choose function returns Null [thus, it requires a Variant to hold its return value just in case it ever fails] if you index into it incorrectly.) In other words, if a routine works correctly, this fact is signaled to the caller by the absence of any error condition. Routines such as Open work like this primarily so that they can be used more flexibly. For example, by not handling the error internally, perhaps by prompting the user in some way, the caller is free to handle errors in the most suitable way.

What Is OLE DB?


OLE DB is a set of COM interfaces that provide applications with uniform access to data stored in diverse information sources, regardless of location or type. In general, OLE DB attempts to make it easy for applications to access data stored in diverse database management systems (DBMS) and other information sources. DBMS sources can include:

Mainframe databases such as IMS and DB2 Server databases such as Oracle and SQL Server Desktop databases such as Access, Paradox, and FoxPro 7

Bank Management System

Other sources can include:


Information stored in file systems for Windows NT or UNIX Indexed-sequential files E-mail systems such as Exchange Spreadsheets, project management tools, and many other sources

Components of OLE DB

Data Consumers
Data consumers are applications that use the data exposed by data providers. ADO is the programmatic interface for using OLE DB data. Examples of consumers include high-level data access models such as ADO, business applications written in development tools such as Visual Basic, C++, or Java, and development tools themselves. Any application that uses ADO is an OLE DB data consumer.

Service Components
Service components are elements that process and transport data and extend the functionality of data providers. For example, a cursor engine is a service component that can consume data from a sequential, forward-only data source to produce scrollable data. Service components are designed to integrate efficiently to help OLE DB component vendors develop high-quality OLE DB components.

Data Providers
Data providers are applications, such as Microsoft SQL Server or Exchange. This includes operating system components, such as a file system, indexed-sequential files, spreadsheets, document stores, and mail files that have data that other applications may need to access. These data providers expose OLE DB interfaces that service components or data consumers can access directly. There is also an OLE DB provider for ODBC. This provider makes any ODBC data available to OLE DB data consumers. However, OLE DB is not dependent on ODBC.

Bank Management System

How OLE DB Relates To ADO


ADO provides consistent, high-performance access to data and supports a variety of development needs, including the creation of front-end database clients and middle-tier business objects that use applications, tools, languages, or Internet browsers. ADO is designed to be the one data interface needed for single and multi-tier client/server development, as well as Web-based data-driven solution development. The primary benefits of ADO are ease of use, high speed, low memory overhead, and a small disk footprint. ADO provides an easy-to-use interface to OLE DB, which provides the underlying access to data. ADO is implemented with minimal network traffic in key scenarios, and a minimal number of layers between the front end and data sourceall to provide a lightweight, high-performance interface. ADO is easy to use because it uses a familiar metaphorthe COM automation interface, available from all leading Rapid Application Development (RAD) tools, database tools, and languages, including Visual Basic, Java, VBScript, Script, and C/C++.

Component Object Model


Microsoft has defined an open, extensible standard for software interoperability. The Component Object Model (COM) makes it possible for software components that you create to work with other software components, including software you buy offthe-shelf. COM allows software components, derived from any combination of preexisting components you have developed and components from different software vendors, to connect to and communicate with each other. Because COM enables interoperability among applications written in different languages, a word processor application written by one vendor can connect to a spreadsheet object written by another vendor. The word processor application could then be used to import data from the spreadsheet object. Additionally, the spreadsheet object could receive data through a COM object residing on a mainframe. The word processor, spreadsheet, and mainframe database do not have to know anything about each other's implementation. The word processor only needs to know how to connect to

Bank Management System

the spreadsheet; the spreadsheet only needs to know how to expose its services for other software components to connect.

Component Development and Object-Oriented Programming


Component-based software development reduces programming time by allowing developers to assemble applications from tested, standardized components. Visual Basic gives you the tools to rapidly create, debug, and deploy software components. It is the easiest way to create ActiveX components such as ActiveX controls, ActiveX documents, and code components (ActiveX DLLs and ActiveX EXEs). ActiveX is technology based on COM. An ActiveX component is a unit of executable code, such as an .exe, .dll, or .ocx file that follows the ActiveX specification for creating reusable objects. ActiveX technology allows programmers to assemble these reusable software components into objects that provide services to clients. Component software development using ActiveX technology should not be confused with object-oriented programming (OOP). OOP is a way to build object-based software components. ActiveX is a technology that allows you to combine object-based components created by different development tools or across different applications. To put it another way, an OOP language allows you to create reusable objects for a single development environment, while ActiveX and COM make objects work together in multiple environments.

How Component Development Promotes Reusability


You can use an OOP tool such as Microsoft Visual C++ to construct a set of objects. Other Visual C++ developers can use and further extend these objects. However, if you package your objects in an COM component, they can be used and further extended with any programming tool that supports COM technology, such as Visual Basic. A client application or component object does not care what language a COM object was written in, only that it can communicate with the object. This allows

10

Bank Management System

application and component objects to communicate with each other regardless of the language or development tool in which they were created.

COM and Visual Basic


As you define the functionality required by your application, look for places where you can use pre-existing COM components instead of having to write the code to implement a given functionality yourself. For example, you could create a function procedure that logs a user into a server. In your corporation, you may be required to include this procedure in every application you create. Instead of adding this code to every program, you can implement this logon procedure in a COM component that can be easily reused from project to project. There are many reasons to use COM components in an application, including:

Reusability Once you create a COM component, other developers can use it. This enables easy access to your component's features in other applications without requiring developers to write extensive code.

Reduced complexity You can create a COM component to hide programming complexity from other programmers. Other programmers need only know what information to provide to your component, and what information to retrieve.

Easier updating Components make it easier for you to revise and update your applications. For example, you can create a COM component that encapsulates business rules. If the business rules change, you update just the component, not all the applications that use the component. When you use COM components in a Visual Basic project, you do not have to

understand all of the mechanics involved in making these components work together. It is more important to know how to use the component that adds the functionality you

11

Bank Management System

need to your application. You can find detailed information about COM at http://www.microsoft.com/com/default.asp.

Class Modules
Class modules (.cls files) are the foundation of object-oriented programming in Visual Basic. They are analogous to a blueprint for a house. Just as a house is built from a blueprint, new objects are created from class modules. These new objects include your own customized properties and methods. A class module is similar to a standard code module (.bas file) because both contain functionality that can be used by other modules within the application. The difference is that a class module provides functionality in the form of an object:

Data in a standard module has program scope, which means that it exists for the life of your program. Class module data exists for each object that is created from the class. Each object's data exists only for the lifetime of the object; it is created when the object is created, and destroyed when the object is destroyed.

Variables declared as public in a standard module are visible from anywhere in your project. Variables declared as public in a class module can only be accessed by referencing a particular instance of a class or object. Most commonly, class modules exist in code components. A code component

can be thought of as a container for multiple classes. For example, you could create a "vehicles" code component that contains multiple classes; these classes can be used to create objects such as cars, trucks, and vans. A client application uses a code component by creating an object from one of the classes the component provides, and invoking the object's properties, methods, and events.

Creating COM Components With Visual Basic


The greatest benefit of COM is the ability to create COM components that can be easily implemented in many applications. A COM component is a unit of executable code, such as an .exe, .dll, or .ocx file that follows the COM specification for creating

12

Bank Management System

objects. These are created from class modules in Visual Basic. A COM component exposes objects that can be used by other applications. Visual Basic handles much of the complexity of creating COM .exe and .dll files. You can create three types of COM components with Visual Basic:

ActiveX Controls ActiveX controls (formerly known as OLE controls) are standard user-interface elements that allow you to rapidly assemble reusable forms and dialog boxes.

Active Documents Active documents are COM components that must be hosted and activated within a document container. Active document technology is an extension to OLE documents. It enables generic shell applications, such as Microsoft Internet Explorer, to host different types of documents.

ActiveX Code components AcitveX Code components (COM executable programs and DLLs) are groups, called libraries, of classes. Client applications use COM objects by creating instances of classes provided by the COM .exe or .dll file. Client applications call the properties, methods, and events provided by each COM object. In Visual Basic, the project templates you use to create a COM components are referred to as ActiveX EXEs and ActiveX DLLs.

An Understanding over MS-Access Environment as Back End

13

Bank Management System

MS-Access:-I have used MS.ACCESS for database. It is a RDBMS Package developed by Microsoft. It is a relational database management system That efficiently stores, retrieves and manages large amounts of data.

Data Access Models


Microsoft Access 2000 supports two data access models: the traditional Data Access Objects (DAO) and ActiveX Data Objects (ADO). DAO targets the Jet database engine to enable quick and easy database programming. Access 2000 is the first version of Access to also support ADO for manipulating Jet databases. Instead of being based on a single database engine, ADO uses a common programming model to deliver access to universal data. It relies on OLE DB providers for low-level links to data sources. OLE DB technologies will eventually make their ODBC predecessors obsolete, much as ADO will replace DAO. Therefore, if you invest in learning ADO now, you will get on the fast track to adopting future improvements in data access with upcoming versions of Access and you'll be able to use more and different kinds of data sources. This chapter reviews the DAO and ADO data access models, with the primary emphasis on ADO as a programming model. The brief DAO coverage introduces core development concepts and provides a historical perspective on data access within Access. Since DAO will not play a critical role in any subsequent chapters, this chapter will cover using Jet and remote databases. For information on DAO code, see the Access online documentation and Microsoft's Support Online (support.microsoft.com/support/), a site that documents typical problems and their associated workarounds. Many of the articles include code samples. This chapter will focus primarily on the ADO object models for Jet in Access and the ADODB and ADOX libraries. Extensive programming examples will show you how to accomplish typical database tasks. Other chapters in this book will build on the information in this chapter and will cover additional ADO topics, such as database replication, remote database access, and multi-user security.

14

Bank Management System

TOOLS & ENVIRONMENT


The platform is the hardware and software combination that the Client/Server runs on. While hardware systems vary widely in features and capabilities, certain common features are needed for the operating system software.

Hardware Specifications
15

Bank Management System

Hardware is a set of physical components, which performs the functions of applying appropriate, predefined instructions. In other words, one can say that electronic and mechanical parts of computer constitute hardware. This package is designed on a powerful programming language Visual Basic. It is a powerful Graphical User Interface. The backend is ACCESS, which is used to maintain database. It can run on almost all the popular microcomputers. The following are the minimum hardware specifications to run this package: -

Hardware requirement:
Personal Computer: It minimum contains P-III processor with 128 MB RAM.

Software Requirements:
The software is a set of procedures of coded information or a program which when fed into the computer hardware, enables the computer to perform the various tasks. Software is like a current inside the wire, which cannot be seen but its effect can be felt. 1. Operating System:- Windows NT / 2000 / XP 2. Application Software:- Application software uses front end visual basic and database access etc. Editor:- Visual basic.

Analysis & Design


A complete structure of the program Analysis

16

Bank Management System

To develop software which maintains all the record of day to day -Open Account, Close or Edit Account, Monthly Statement, Bank summary and Transaction detail etc. All the record and information is going to be store in Microsoft Access Database Draw the following conclusion:The project consists of four parts mainly

1. Open Account: It consists of new bank account form. A consist new enquiry information who come to the bank for enquiry about new account (saving, current). Then he or she fill up the new account form according to their account number generated automatically and also generate cheui no automatically.

2. Close or Edit Account:It consists or provides editing and closing account form and also such particular account information.

3. Monthly Statement: It consists of two sided form monthly statement of bank employee and monthly statement of saving and current account employee.

4. Bank Summary: It consists of all information detail of bank employee account transaction detail summary, recode of all branches and also record of draft and chewy.

17

Bank Management System

Program Structure
The detail structure and description of table are as follows: Table Structure and Description:

1.

Account: Account Fieldname Actno Name Address Phone Act type City Date Chequebook Field Type Number Text Text Number Text Text Date/time Yes/no Field size Long int 50 50 Double 20 50 Medium date Constraint Primary

18

Bank Management System

This table is used to maintain open account details. Where employee come from new account. Which keep all information about employee. Here act no define primary key.

19

Bank Management System

ii. Account Type: Account type Field type Text Text Number

Fieldname Type code Type name Int rate

Field size 50 50 Default

Constraint

This table is used for which type of account opens a employee, type of account saving or current account and also give a account type code. iii. Balance table: -

Field name Actno Balance

Balance table Field type Number Number

Field size Default Long int

Constraint

This table the balance of all type of account, saving or current account.

20

Bank Management System

iv. Cheque Table: Cheque table Field type Number Number Number

Field name Actno No _from No _to

Field size Default Default Default

Constraint

This table content all account detail and if you open new account and chose cheque option so give cheque no of your account. v. Pass table: -

Field name Name Pswd

Pass table Field type Text Text

Field size 50 50

Constraint

vi. Tamp Table: -

Field name Actno Temp type Ckequeno Amount Date

Tamp table Field type Number Text Number Number Date/time

Field size Long int 50 Long int Long int

Constraint

This table show the tamp let of all account information and transaction of per day of bank.

21

Bank Management System

Vii. Transaction.1 table: Transaction table Field name Actno Tran type Amount act Type Chequeno Date Time Field type Number Text Number Text Number Date/time Date/time Field size Long int 50 Long int 50 Long int Default Default Constraint Primary

This table contains all per day transaction of bank and also summarized all money transaction updating and editing.

22

Bank Management System

Data structure
Diagram (Design) :- Designing if system demonstrates the exact flow of I-P-O cycle of the system. I-P-O cycle is Input-Process-Output cycle of the system, where we need to define what are input we need to take to produced the output, which is our requirements. According to this input and output we design the processing phase. There are lot of category define to design the system few of them are begin discus here.

23

Bank Management System

Data Flow Diagram: -

New customer

Fills enquiry Form

Enquiry New Account

Request for New Account

Control Management

Provide Account Type

Send New Account Request.

24

Bank Management System

Provide Account Number / Cheque Number


Account

Proces s

Account Details

CODING

25

Bank Management System

_____________________________________________________________________

26

Bank Management System

Component: Flash form Form Name: Frmflase.frm Code: --___________________________________________________________________________________ ___

Private Sub Form_Click() Unload Me LoginForm.Show 1 'Form6.Show End Sub Private Sub Form_Load() Timer1.Interval = 3000 End Sub Private Sub Timer1_Timer() Unload Me LoginForm.Show 1 'Form6.Show End Sub
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~

Login Form:--

27

Bank Management System

____________________________________________________________________________________

Component : Login form Form Name :FrmLogin Code :--

Dim rs As New ADODB.Recordset Private Sub CancelButton_Click() Unload Me End Sub Private Sub Form_Load() rs.ActiveConnection = cn If rs.State = 1 Then rs.Close 28

Bank Management System

rs.CursorLocation = adUseClient rs.CursorType = adOpenKeyset rs.LockType = adLockOptimistic rs.Open "select * from Pass" rs.MoveFirst While Not rs.EOF = True Combo1.AddItem rs(0) rs.MoveNext Wend Combo1.ListIndex = 0 End Sub Private Sub Frame1_DragDrop(Source As Control, X As Single, Y As Single) End Sub

Private Sub OkButton_Click() If rs.State = 1 Then rs.Close rs.Open "select pswd from pass where name = '" & Combo1.Text & "'" If rs!pswd = Text1.Text Then Me.Caption = "Password Success" GoTo 1 Else Me.Caption = "Invalid Password" Text1.Text = " " Text1.SetFocus Exit Sub End If 1: Call ShowForm End Sub

29

Bank Management System

Private Sub ShowForm() If Combo1.Text = "Employee" Then Unload Me Form1.Show Form1.BnkButton.Enabled = False ElseIf Combo1.Text = "Guest" Then Unload Me

Form1.Show Form1.AcButton.Enabled = False Form1.BnkButton.Enabled = False Form1.TrButton.Enabled = False Form1.AcClButton.Enabled = False ElseIf Combo1.Text = "Manager" Then Unload Me Permission = 1 'For Account Permission Clos account Form1.Show End If End Sub

30

Bank Management System

Main Form:--

___________________________________________________________________________________ _

Component : Main form Form Name frmMain Coding :--31

Bank Management System ___________________________________________________________________________________ ___

Private Sub AcButton_Click() 'Unload Me Form2.Top = 3000 Form2.Left = 4000 Form2.Show End Sub Private Sub AcClButton_Click() 'Unload Me Form3.Top = 3000 Form3.Left = 4000 Form3.Show End Sub Private Sub BackButton_Click() 'Unload Me LoginForm.Top = 3000 LoginForm.Left = 4000 LoginForm.Show End Sub Private Sub BnkButton_Click() 'Unload Me Form5.Top = 3000 Form5.Left = 4000 Form5.Show End Sub Private Sub ExButton_Click()

32

Bank Management System

Unload Me End Sub Private Sub Picture1_Click() End Sub Private Sub StmtButton_Click() 'Unload Me Form6.Top = 3000 Form6.Left = 4000 Form6.Show End Sub Private Sub TrButton_Click() 'Unload Me Form4.Top = 3000 Form4.Left = 4000 Form4.Show End Sub ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~

Open Account Form:--

33

Bank Management System

___________________________________________________________________________________ ___

Component : Open Account Form Form name Frmopen Coding :____________________________________________________________________________________ __

Dim rs As New ADODB.Recordset Dim MaxNo As Long

34

Bank Management System

Dim a As Integer Private Sub Check1_Click() End Sub Private Sub Command1_Click() Dim sstr, s As String Dim rst As New ADODB.Recordset rst.Open "Select max(actno) from Account", cn, adOpenKeyset, adLockOptimistic, cmdtext a = rst(0) + 1 If CheckField = True Then s = Text1.Text If Check1.Value = 1 Then sstr = "insert into account " sstr = sstr + "values(" & a & ",'" & Text1.Text & "', '" & Text3.Text & "', " sstr = sstr + " " & Text2.Text & " ,'" & Combo1.Text & "' ,'" & Text6.Text & "','" & Date & "',YES)" cn.Execute sstr MsgBox "Account Created " & "Account Number = " & a, vbInformation, a Call UpdateCheque MsgBox "Ur Cheque No is from " & MaxNo & " To " & MaxNo + 10, vbInformation StatusBar1.Panels(2).Text = "Cheque No " & MaxNo & " - " & MaxNo + 10 ElseIf Check1.Value = 0 Then sstr = "insert into account " sstr = sstr + "values(" & a & ",'" & Text1.Text & "', '" & Text3.Text & "', " sstr = sstr + " " & Text2.Text & " ,'" & Combo1.Text & "' ,'" & Text6.Text & "','" & Date & "',NO)" cn.Execute sstr MsgBox "Account Created " & "Account Number = " & a, vbInformation, a StatusBar1.Panels(2).Text = "Cheque Book Not Issued" 35

Bank Management System

End If Call AddDeposite StatusBar1.Panels(1).Text = "Hello " & s & " " & a Call ClearField End If rst.Close End Sub Private Sub AddDeposite() Dim s As String s = "insert into BalanceTable values " s = s + "(" & a & "," & Text5.Text & ")" cn.Execute s End Sub Private Function CheckField() As Boolean If Text1.Text = "" Then MsgBox " Enter Name Please " Text1.SetFocus CheckField = False ElseIf Text3.Text = "" Then MsgBox " Enter Address please " Text3.SetFocus CheckField = False ElseIf Text5.Text = "" Then MsgBox "Balance Should deposite" Text5.SetFocus CheckField = False ElseIf Check1.Value = 1 Then If Not Val(Text5.Text) >= 1500 Then MsgBox "Minimum Balance Should be 1500" CheckField = False Else 36

Bank Management System

CheckField = True End If ElseIf Check1.Value = 0 Then If Not Val(Text5.Text) >= 500 Then MsgBox "Minimum Balance Should be 500" CheckField = False Else CheckField = True End If Else CheckField = True End If End Function Private Sub Command2_Click() Call ClearField End Sub Sub ClearField() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text5.Text = "" Me.Text6.Text = "" Check1.Value = 0 End Sub Private Sub Command3_Click() Unload Me 'Form1.Show 1 End Sub Private Sub Command4_Click() Unload Me End Sub 37

Bank Management System

Private Sub UpdateCheque() Dim rst As New ADODB.Recordset rst.CursorLocation = adUseClient rst.Open "select max(NoTo) from cheque", cn, adOpenKeyset, adLockOptimistic If rst.RecordCount > 0 Then If Not rst.EOF Then MaxNo = Val(rst.Fields(0)) + 1 Else MaxNo = 1234 End If Else MaxNo = 1234 End If cn.Execute "insert into cheque(Actno,NoForm,NoTo)values(" & a & "," & MaxNo & "," & MaxNo + 10 & ")" rst.Close End Sub Private Sub Form_Load() Text4.Caption = Date$ Label6.Caption = Time() If rs.State = 1 Then rs.Close rs.Open "select * from AccountType", cn, adOpenKeyset, adLockOptimistic, cmdtext rs.MoveFirst While Not rs.EOF Combo1.AddItem rs(1) rs.MoveNext Wend Combo1.ListIndex = 0 End Sub Private Sub Text2_KeyPress(KeyAscii As Integer) If Chr(KeyAscii) Like "[0-9]" Or KeyAscii = 8 Then 38

Bank Management System

Else KeyAscii = 0 End If End Sub Private Sub Text5_KeyPress(KeyAscii As Integer) If Chr(KeyAscii) Like "[0-9]" Or KeyAscii = 8 Then Else KeyAscii = 0 End If End Sub Private Sub Timer1_Timer() Label6.Caption = Time() End Sub ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~

Edit Or Delete Account Form:--

39

Bank Management System

___________________________________________________________________________________ __

Component : Edit and close Account Form Form Name : frmEditAct Coding :___________________________________________________________________________________ ___

Dim rs As New ADODB.Recordset '---------------------------------------'Close account form to close account 40

Bank Management System

'Permission variable is to check the permission to delete the 'Record that manager can delete the record '---------------------------------------Private Sub CmdCloseAct_Click() Dim rst As New ADODB.Recordset rst.ActiveConnection = cn If Permission = 1 Then Dim stmt, ms As String Dim s As Long ms = MsgBox("Do U really want to Close Account", vbYesNo, "Delete Record ") If ms = vbYes Then If rst.State = 1 Then rst.Close s = Combo1.Text rst.Open "select ChequeBook from account where actno = " & s & "" If rst!ChequeBook = True Then stmt = "delete from cheque where actno = " & s & "" cn.Execute stmt End If rst.Close stmt = "delete from account where actno = " stmt = stmt + " " & s & "" cn.Execute stmt 'Get the balance back before close account If rst.State = 1 Then rs.Close rst.Open "select balance from BalanceTable where actno = " & s & " " StatusBar1.Panels(1).Text = "Ur balance was " & rst(0) & " Get the money" MsgBox "Ur balance was " & rst(0) & " Get the money" rst.Close stmt = "delete from BalanceTable where actno = " & s & " " cn.Execute stmt stmt = "delete from Transaction1 where actno = " & s & " " cn.Execute stmt 41

Bank Management System

MsgBox "Account Close " rs.Requery End If Else MsgBox "U dont have Permission to Close Account ", vbInformation, "Close Account" End If End Sub Private Sub CmdFirst_Click() If rs.RecordCount > 0 Then rs.MoveFirst End If If rs.BOF Then MsgBox "You Are Onto The First Record" Else Call FillRecord(rs) End If End Sub Private Sub CmdLast_Click() If rs.RecordCount > 0 Then rs.MoveLast End If If rs.EOF = True Then MsgBox "You Are Onto The Last Record" Else rs.MoveLast Call FillRecord(rs) Exit Sub End If End Sub

42

Bank Management System

Private Sub CmdMain_Click() Unload Me Form1.Show End Sub Private Sub CmdNext_Click() If rs.RecordCount > 0 Then rs.MoveNext End If If rs.EOF Then MsgBox "You Are Onto The Last Record" If rs.RecordCount > 0 Then rs.MoveLast End If Else Call FillRecord(rs) End If End Sub Private Sub CmdPrev_Click() If rs.RecordCount > 0 Then rs.MovePrevious End If If rs.BOF Then MsgBox "You Are Onto The First Record" If rs.RecordCount > 0 Then rs.MoveFirst End If Else Call FillRecord(rs) End If End Sub

43

Bank Management System

Private Sub CmdUpdate_Click() Dim stmt As String stmt = "update Account set nam = '" & Text1.Text & "' , " stmt = stmt + " address = '" & Text4.Text & "' ," stmt = stmt + " phone = " & Text2.Text & " , " stmt = stmt + " Actype = '" & Text3.Text & "' where " stmt = stmt + "actno = " & Combo1.Text & " " cn.Execute stmt MsgBox "Update Succeed ", vbInformation, "Saving Record" rs.Requery End Sub Private Sub Combo1_Click() ' This is for navigate through combo box Dim rs1 As New ADODB.Recordset If rs1.State = 1 Then rs.Close rs1.Open "select * from Account where actno= " & Combo1.Text & " ", cn, adOpenKeyset, adLockOptimistic, adCmdText If rs1.RecordCount > 0 Then Call FillRecord(rs1) End If rs1.Close End Sub Private Sub Command1_Click() 'Issue Cheque book Dim stmt As String Dim rst As New ADODB.Recordset If Check1.Value = 0 Then If rst.State = 1 Then rst.Close rst.Open "select max(noto) from Cheque", cn, adOpenKeyset, adLockOptimistic, cmdtext Dim MaxNo As Long If rst.RecordCount > 0 Then 44

Bank Management System

MaxNo = rst(0) MaxNo = MaxNo + 1 stmt = "insert into Cheque values (" stmt = stmt + "" & Combo1.Text & ", " & MaxNo & "," & MaxNo + 10 & ")" cn.Execute stmt ' This is to update in the account master table stmt = "update account set ChequeBook = YES where " stmt = stmt + "actno = " & Combo1.Text & "" cn.Execute stmt MsgBox "Cheque book created form " & MaxNo & " To " & MaxNo + 10 StatusBar1.Panels(1).Text = "Cheque book created form " & MaxNo & " To " & MaxNo + 10 rs.Requery 'This is to move record to the first position If rs.RecordCount > 0 Then rs.MoveFirst End If If rs.BOF Then MsgBox "You Are Onto The First Record" Else Call FillRecord(rs) End If End If Else Dim ch As String ch = MsgBox("Cheque Already Issued if cheque last then click yes", vbYesNo) If ch = vbYes Then stmt = "delete from Cheque where actno = " & Combo1.Text & "" cn.Execute stmt If rst.State = 1 Then rst.Close rst.Open "select max(NoTo) from Cheque", cn, adOpenKeyset, adLockOptimistic, cmdtext If rst.RecordCount > 0 Then 45

Bank Management System

'Dim MaxNo As Long MaxNo = rst(0) MaxNo = MaxNo + 1 stmt = "insert into Cheque values (" stmt = stmt + "" & Combo1.Text & ", " & MaxNo & "," & MaxNo + 10 & ")" cn.Execute stmt 'This is to update in the acccount master table stmt = "update account set ChequeBook = YES where " stmt = stmt + "actno = " & Combo1.Text & "" cn.Execute stmt MsgBox "Cheque book created form " & MaxNo & " To " & MaxNo + 10 StatusBar1.Panels(1).Text = "Cheque book created form " & MaxNo & " To " & MaxNo + 10 rs.Requery 'This is to move record to the first position If rs.RecordCount > 0 Then rs.MoveFirst End If If rs.BOF Then MsgBox "You Are Onto The First Record" Else Call FillRecord(rs) End If End If End If End If End Sub Private Sub Form_Load() rs.ActiveConnection = cn If rs.State = 1 Then rs.Close rs.CursorLocation = adUseClient 46

Bank Management System

rs.CursorType = adOpenKeyset rs.LockType = adLockOptimistic rs.Open "select * from Account order by actno" If Not rs.BOF Then rs.MoveFirst While Not rs.EOF Combo1.AddItem rs!actno rs.MoveNext Wend If Not rs.BOF Then rs.MoveFirst If rs.RecordCount > 0 Then Call FillRecord(rs) End If End Sub '************************************************ 'Fill Record in the Form Controls Private Sub FillRecord(rs As ADODB.Recordset) Dim i As Integer Dim a Dim rsB As New ADODB.Recordset If rs.RecordCount > 0 Then For i = 0 To Combo1.ListCount - 1 If Combo1.List(i) = Trim(rs!actno) Then Combo1.ListIndex = i Exit For End If Next End If a = rs!actno Text1.Text = rs!Nam Text2.Text = rs!phone Text3.Text = rs!actype Text4.Text = rs!address 47

Bank Management System

Text6.Text = rs!Date 'Fill in the check box If rs!ChequeBook = True Then Check1.Value = 1 Else Check1.Value = 0 End If 'To get the balance from Balance Table If rsB.State = 1 Then rsB.Close rsB.Open "select * from BalanceTable where actno = " & a & "", cn, adOpenKeyset, adLockOptimistic, cmdtext Text5.Text = rsB!balance End Sub Private Sub Frame1_DragDrop(Source As Control, X As Single, Y As Single) End Sub

Amount Transaction Form:--

48

Bank Management System

49

Bank Management System

_____________________________________________________________________ __ Component :Amount Transaction form Form Name : frmtran Code :-

Dim rs As New ADODB.Recordset Dim a As Boolean 'To check the balance is greater or less Private Sub Combo2_Click() If Combo2.ListIndex = 0 Then 'withdraw Combo3.Clear Combo3.AddItem "Cheque" Combo3.AddItem "Withdrawl" Combo3.ListIndex = 0 ElseIf Combo2.ListIndex = 1 Then 'Deposit Combo3.Clear Combo3.AddItem "Draft" Combo3.AddItem "Cash" Combo3.AddItem "Cheque" Combo3.ListIndex = 0 End If End Sub Private Sub Combo3_Click() If Combo3.Text = "Cheque" Or Combo3.Text = "Draft" Then Text2.Enabled = True

50

Bank Management System

Else Text2.Enabled = False End If End Sub 'This procedure is to check that the cheque number 'Which is entered is correct or not Private Function CheqTest() As Boolean If Not Combo2.Text = "Deposite" Then Dim rst As New ADODB.Recordset rst.ActiveConnection = cn If rst.State = 1 Then rst.Close rst.CursorLocation = adUseClient rst.CursorType = adOpenKeyset rst.LockType = adLockOptimistic rst.Open "select * from account where actno = " & Combo1.Text & "" If rst!ChequeBook = True Then If Not Text2.Text = "" Then If rst.State = 1 Then rst.Close rst.Open "select * from Cheque where actno = " & Combo1.Text & " " If rst.RecordCount > 0 Then If Text2.Text >= rst(1) And Text2.Text <= rst(2) Then MsgBox "SS" CheqTest = True Else MsgBox "Please enter the valid cheque no", vbInformation CheqTest = False Exit Function End If End If Else MsgBox "U will have to select Cheque and enter cheque number ", vbInformation 51

Bank Management System

CheqTest = False Exit Function End If Else CheqTest = True End If Else CheqTest = True End If End Function 'This is the submit button command button that is 'To submit the transaction in the transaction table 'After checking the appropriate field Private Sub Command1_Click() Dim sstr As String If Not Text1.Text = "" Or Val(Text1.Text) < 100 Then If Text2.Text = "" Then Text2.Text = 0 End If sstr = "Insert into Transaction1 values(" sstr = sstr + " " & Combo1.Text & ",'" & Combo2.Text & "'," sstr = sstr + "" & Text1.Text & ",'" & Combo3.Text & "'" sstr = sstr + "," & Text2.Text & ",'" & Date & "','" & Time & "')" If CheqTest = True Then Call UpdateMoney If a = True Then cn.Execute sstr StatusBar1.Panels(1).Text = "Money " & Combo2.Text & " Success" MsgBox "Money " & Combo2.Text & " Success" End If a = False End If 52

Bank Management System

Call ClearField Else MsgBox "please Enter Lease 100 Transaction Amount ", vbInformation End If End Sub 'This is to Update the balance in database Private Sub UpdateMoney() Dim rst As New ADODB.Recordset Dim stmt As String Dim d As Long If rst.State = 1 Then rst.Close rst.Open "select * from BalanceTable where actno = " & Combo1.Text & "", cn, adOpenKeyset, adLockOptimistic, cmdtext If Combo2.Text = "Deposite" Then d = rst!balance + Val(Text1.Text) stmt = "update BalanceTable set balance = " & d & "" stmt = stmt + " where actno = " & Combo1.Text & "" cn.Execute stmt a = True ElseIf Combo2.Text = "Withdraw" Then If rst!balance > Val(Text1.Text) Then d = rst!balance - Val(Text1.Text) stmt = "update BalanceTable set balance = " & d & "" stmt = stmt + " where actno = " & Combo1.Text & "" cn.Execute stmt a = True Else MsgBox "U dont have money to Transact U have only " & rst!balance a = False End If End If End Sub 53

Bank Management System

Private Sub Command2_Click() Unload Me 'Form1.Show 1 End Sub Private Sub ClearField() Text1.Text = "" Text2.Text = "" Combo1.ListIndex = 0 Combo2.ListIndex = 0 Combo3.ListIndex = 0 End Sub Private Sub Command3_Click() Call ClearField End Sub Private Sub Command4_Click() Unload Me End Sub Private Sub Form_Load() Timer1.Interval = 1000 Label3.Caption = Time Label2.Caption = Date rs.ActiveConnection = cn If rs.State = 1 Then rs.Close rs.CursorLocation = adUseClient rs.CursorType = adOpenKeyset rs.LockType = adLockOptimistic rs.Open "select * from Account order by actno" rs.MoveFirst 'This is to fill the account number combo While Not rs.EOF = True Combo1.AddItem rs!actno 54

Bank Management System

rs.MoveNext Wend rs.Close Combo2.AddItem "Withdraw" Combo2.AddItem "Deposite" Combo2.ListIndex = 0 Combo1.ListIndex = 0 Combo3.Clear Combo3.AddItem "Cheque" Combo3.AddItem "Withdrawl" 'rs.Close End Sub Private Sub Timer1_Timer() Label3.Caption = Time End Sub

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~

Bank Summary Form:--

55

Bank Management System

___________________________________________________________________________________ ___

Component : Summary form Form Name : FrmSumary Code :-

Private Sub Command1_Click() Unload Me End Sub Private Sub Command2_Click()

56

Bank Management System

Unload Me Form1.Show 1 End Sub Private Sub Command3_Click() SummaryRept.Refresh DataEnvironment1.rsCommand2.Requery SummaryRept.Show End Sub Private Sub DataGrid1_Click() End Sub Private Sub Form_Load() Adodc1.Refresh End Sub

Bank Summary Report :--

57

Bank Management System

____________________________________________________________________________________ _

Component : Summary report form Form Name FrmSummary Code :-

Dim rs As New ADODB.Recordset Private Sub DataReport_Activate() 58

Bank Management System

'rs.Open "select Balance from BalanceTable where actno = " & txtActno & "", cn, adOpenKeyset, adLockOptimistic, cmdtext 'Text1 = rs(0) 'rs.Close End Sub Private Sub DataReport_Error(ByVal JobType As MSDataReportLib.AsyncTypeConstants, ByVal Cookie As Long, ByVal ErrObj As MSDataReportLib.RptError, ShowError As Boolean) On Error Resume Next End Sub

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~

59

Bank Management System

Bank Account Statement Form:--

___________________________________________________________________________________ __

Component : Account statement form Form Name : frmStatement Code :-

Dim stmt As String Dim rs As New ADODB.Recordset Private Sub Combo1_Click() Call DeleteRecord Call FillDBgrid Call FillBalance

60

Bank Management System

Adodc1.Refresh DataGrid1.Refresh End Sub Private Sub Command1_Click() Unload Me 'Form1.Show 1 End Sub Private Sub Command2_Click() Unload Me End Sub Private Sub Command3_Click() If DataEnvironment1.rsCommand1.State = 1 Then DataEnvironment1.rsCommand1.Close DataEnvironment1.rsCommand1.Open "select * from Temptable", cn, adOpenKeyset, adLockOptimistic, cmdtext DataEnvironment1.rsCommand1.Requery StatmentRept.Refresh StatmentRept.Show End Sub Private Sub DataGrid1_Click() End Sub Private Sub Form_Load() rs.ActiveConnection = cn If rs.State = 1 Then rs.Close rs.CursorLocation = adUseClient rs.CursorType = adOpenKeyset rs.LockType = adLockOptimistic rs.Open "select actno from account order by actno" If rs.RecordCount > 0 Then rs.MoveFirst 61

Bank Management System

While Not rs.EOF = True Combo1.AddItem rs(0) rs.MoveNext Wend End If Combo1.ListIndex = 0 Call DeleteRecord Call FillDBgrid Call FillBalance Adodc1.Refresh DataGrid1.Refresh End Sub Private Sub DeleteRecord() stmt = "delete from TempTable " cn.Execute stmt End Sub Private Sub FillDBgrid() Dim rst As New ADODB.Recordset If rst.State = 1 Then rst.Close If Not Combo1.Text = "" Then rst.Open "select ActNo,TranType,amount,Cheqno,date1 from transaction1 where actno = " & Combo1.Text & "", cn, adOpenKeyset, adLockOptimistic, cmdtext If rst.RecordCount > 0 Then If Not rst.BOF Then rst.MoveFirst While Not rst.EOF = True stmt = "insert into TempTable values ( " & rst(0) & ",'" & rst(1) & "'," & rst(2) & "," & rst(3) & "," & rst(4) & ")" cn.Execute stmt Adodc1.Refresh DoEvents DataGrid1.Refresh rst.MoveNext 62

Bank Management System

Wend End If Else StatusBar1.Panels(0).Text = "Not Any Transaction Made" End If Call FillBalance End Sub Private Sub FillBalance() Dim rsq As New ADODB.Recordset If rsq.State = 1 Then rsq.Close rsq.Open "select Balance from BalanceTable where actno = " & Combo1.Text & " ", cn, adOpenKeyset, adLockOptimistic, cmdtext Text1.Text = rsq(0) End Sub ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~

63

Bank Management System

Bank Account Statement Report:--

_____________________________________________________________________ _ Component : Statement report form Form Name : FrmStetement Code:-

64

Bank Management System

Private Sub DataReport_Error(ByVal JobType As MSDataReportLib.AsyncTypeConstants, ByVal Cookie As Long, ByVal ErrObj As MSDataReportLib.RptError, ShowError As Boolean) On Error Resume Next If DataEnvironment1.rsCommand1.State = 1 Then DataEnvironment1.rsCommand1.Close 'DataEnvironment1.rsCommand1.Open "select * from Temptable", cn, adOpenKeyset, adLockOptimistic, cmdtext DataEnvironment1.rsCommand1.Requery StatmentRept.Refresh End Sub Private Sub DataReport_Initialize() On Error Resume Next If DataEnvironment1.rsCommand1.State = 1 Then DataEnvironment1.rsCommand1.Close DataEnvironment1.rsCommand1.Open "select * from Temptable", cn, adOpenKeyset, adLockOptimistic, cmdtext DataEnvironment1.rsCommand1.Requery StatmentRept.Refresh End Sub

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~

______________________________________________________________________ __

65

Bank Management System

Module Code:______________________________________________________________________ __

Dim stmt As String Dim rs As New ADODB.Recordset Private Sub Combo1_Click() Call DeleteRecord Call FillDBgrid Call FillBalance Adodc1.Refresh DataGrid1.Refresh End Sub Private Sub Command1_Click() Unload Me 'Form1.Show 1 End Sub Private Sub Command2_Click() Unload Me End Sub Private Sub Command3_Click() If DataEnvironment1.rsCommand1.State = 1 Then DataEnvironment1.rsCommand1.Close DataEnvironment1.rsCommand1.Open "select * from Temptable", cn, adOpenKeyset, adLockOptimistic, cmdtext DataEnvironment1.rsCommand1.Requery StatmentRept.Refresh

66

Bank Management System

StatmentRept.Show End Sub

Private Sub DataGrid1_Click() End Sub Private Sub Form_Load() rs.ActiveConnection = cn If rs.State = 1 Then rs.Close rs.CursorLocation = adUseClient rs.CursorType = adOpenKeyset rs.LockType = adLockOptimistic rs.Open "select actno from account order by actno" If rs.RecordCount > 0 Then rs.MoveFirst While Not rs.EOF = True Combo1.AddItem rs(0) rs.MoveNext Wend End If Combo1.ListIndex = 0 Call DeleteRecord Call FillDBgrid Call FillBalance Adodc1.Refresh DataGrid1.Refresh End Sub Private Sub DeleteRecord() stmt = "delete from TempTable " cn.Execute stmt End Sub 67

Bank Management System

Private Sub FillDBgrid() Dim rst As New ADODB.Recordset If rst.State = 1 Then rst.Close If Not Combo1.Text = "" Then rst.Open "select ActNo,TranType,amount,Cheqno,date1 from transaction1 where actno = " & Combo1.Text & "", cn, adOpenKeyset, adLockOptimistic, cmdtext If rst.RecordCount > 0 Then If Not rst.BOF Then rst.MoveFirst While Not rst.EOF = True stmt = "insert into TempTable values ( " & rst(0) & ",'" & rst(1) & "'," & rst(2) & "," & rst(3) & "," & rst(4) & ")" cn.Execute stmt Adodc1.Refresh DoEvents DataGrid1.Refresh rst.MoveNext Wend End If Else StatusBar1.Panels(0).Text = "Not Any Transaction Made" End If Call FillBalance End Sub

Private Sub FillBalance() Dim rsq As New ADODB.Recordset If rsq.State = 1 Then rsq.Close rsq.Open "select Balance from BalanceTable where actno = " & Combo1.Text & " ", cn, adOpenKeyset, adLockOptimistic, cmdtext Text1.Text = rsq(0)

68

Bank Management System

End Sub

***** END OF THE PROGRAM *****

69

Bank Management System

Documentation
This website project www.indiaonline.com is developed by .. This is a application software like any application working on bank, hospital project, etc. where staff can store database in computer and easily analyse the data and get information. To install this application software in your system do the following:1). Save exefiles and database files and folder under "banksys" folder in ..C: drive.. 2). Double click the application software. 3). For exit click on exit..

User Manual
Account Statement: User can take the account statement by displaying all the customers records. List of all account holders: User can view the consolidated list of all the account holders. Transactions: User can deposit or withdraw amount in customers account by selecting transaction form of the project. Opening new account: User can open new customer account by adding new record from customer form.

70

Bank Management System

Future Scope of the Project


This project can be used in the bank after adding some more useful modules in the project for which banks are providing services, like opening saving or current account, giving loans, providing credit or debit card services, ATM services, services like payment of electricity bills, telephone bills. Utmost care and back-up procedures must be established to ensure 100% successful implementation of the computerized banking system. In case of system failure, the organization should be in a position to process the transaction with another organization or if the worst comes to the worst, it should be in a position to complete it manually

Conclusion

This project is designed to meet the requirements of a Banking System. It has been developed in Visual Basic, keeping in mind the specifications of the system. For designing the system we have used simple data flow diagrams. Overall the project teaches us the essential skills like: Using system analysis and design techniques like data flow diagram in designing the system.

Understanding the database handling

71

Bank Management System

Reference: ---1. Visual Basic (BT -12, Manipal) 2. Advance Microsoft Visual Basic -6.0 2nd Editions 3. Programming Microsoft Visual Basic -6 4. Mastering Visual Basic-6

72

You might also like