Sie sind auf Seite 1von 53

A Project Report On

Banking
System
Submitted by :-

PREFACE
This project is in partial fulfillment of BCA. It used
Visual Basic 6.0 and Microsoft Access. Both these are very
popular development tools in the market. We have develop
the Banking Management System that it can be integrated
easily with any of it’s larger software by making none or
minor changes or, if required, it can be implemented as a
stand alone software. Our current project is contributing to
these requirements.

The software records details pertaining to the


Customer who stayed in Bank, total available balance ,
which is withdrawl by the customer and the deposit by the
customer.

This Document also contains a brief profile of the


description of the project, data flow diagram and data
dictionary. Finally, some screen layouts and report layouts
that provide an idea of the GUI of the system are also
included.
Index
ACKNOWLEDGEMENT

Our Software, which you are using, is the result of


many people’s dedication. It is the cumulative efforts of
many minds working together day and night that gave us
the contentment of developing the software.

Special thanks to, the Co-coordinator of , for his


great support. We express our gratitude to for guidance
and who kept the things on track and also to all other
faculty members who helped us directly or indirectly.

Last but not least our acknowledgement goes to all


the well wishers of our project for their excellent
support in all aspects.
Sr. Description Page
No. No.
1 Project Profile

2 About The Project

3 Development Tools

 Visual Basic

 M.S. Access

 M.S. Word

 M.S. Data Report


4 Data Dictionary

5 Data Flow Diagram

6 Forms & Codings


PROJEC
T
PROFIL
E
Project Profile
Project Title: Banking Management System.
Hardware used: Pentium IV 1.9 GHz, 128 MB RAM,
Hard disk. 40 GB
Operating System: Windows XP. OR Windows 98
Front End: Visual Basic 6.0
Back End: Microsoft Access
Document tool: M.S.Word
Report Designer: Data Report (VB 6.0)
Submitted By:
Submitted To:

ABOUT
THE
PROJECT
About the
Project
In an existing system, user should go to the BANK
and ask for the open new account and withdrawn of the
money and the deposit of money and get at the same
time facality. So customer should spend time for the
bank transaction. It is main drawback of the existing
system.

All the entry fills up by the operator of the Bank.so


user can not see all details of the transaction. Customer
can not see the other other transaction and the money
details.

The Banking management system is a multi-user


system. It has been developed in a way to allow the user
to perform the functions smoothly and with proper
veracity
The System is developed in Microsoft Visual Basic
6.0 and Microsoft Access.

The system maintain the data of the customer and it’s


transaction detail with date with timing.

DEVELOPMEN
T
TOOLS
About the Visual
Basic:
 Visual Basic is a superset of the visual basic for applications
programming language, which is included with most of the
office products.

 Includes a GUI development environment for developing


windows applications.

 Provides the ability to develop and test applications using an


interpretive run function.
 Allows for creation of P_Code and native code EXE files.
P_Code can be stored more efficiently and executed faster
than your source code.

 Object based development is possible using class modules.

 Rapid application development.

 Allows for the Creation of COM components such as Active


X Controls, DLL’s and EXE’s.

 Has many excellent integrated help facility and books online.

 Includes good debugging facilities.

 Have many wizards that help automate repetitive tasks.

 Uses many database access methods to get at different types


of data.

 It is an example of IDE(Integrated Development


Environment) where we can perform Designing, Coding,
Debugging, and executing.

About The M.S. Access

Ms Access is one of the leading data base


management systems (DBMS) Software for the Pc Ms
Access helps you to design database files as per the
requirements and as per the specified format. Once the
database is ready, you can retrieve selected information
from it. The best part is that data stored in the database is
flexible i.e. one can change/modify the contents as well
as the structure of a database any number of times.

M.S.Word

 Microsoft Word is used to create documentation


used for describing various data used in the project.

 Through Word we can also add pictures as well as


other attractive objects to documents so as to give
the document effective look.
DATA

DICTIONAR
Y
Cust_master

Cust_id number
Acc_no Text
Name Text
Address Text
City Text
Pincode Text
State Text
Bdate Text
Cno Text
Acc_type Text
Open_date Date/Time
open_amount Text
Current_amount Text
Remark Text

Table Use:

This table is used to store the data about the Customer information.
Withdrawn
Fields Type
Transaction_Id Text
Account_No Text
Narration Text
Withdrawn_Amt. Text
Date Date/Time
Remaining_Amt. Text

Table

Table Use:

This table is used to store the data about the withdrawn transaction detail
of the customer.
Deposit

Fields Type
Transaction_Id Text
Account_No. Text
Narration Text
Deposite_Amount Text
Mode Text
Bankname Text
Cheque_no. Text
Date Date/Time
Remaining_Amout Text
Table Use:
This table is used to store the data about the deposit transaction detail of
the costumer.

Bank Profile

Fields Type
bank_name text
branch_no text
Address Text
City Text
Pincode Text
co_no Text
State Text
Country Text
min_balance Text

Table Use:

This table is used to store the data about the Bank profile.
userprofile

Fields Type
Uname text
Pwd text
Fullname Text
Address Text
Contact Text
Email Text
Brithdate Date/time

Table Use:

This table is used to store the data about the User information.
DATA
FLOW

DIAGRAM
E-R Diagram

Customer

NEW A/c.
WITHDRAWL

CHECK OUT TABLE

BILL
FORMS
&
CODING

Login form
Option Explicit
Dim rs As New ADODB.Recordset

Private Sub cmdcancel_Click()


Unload Me
End Sub

Private Sub cmdlogin_Click()


Dim qr As String
Dim LOGIN As String
qr = "Select uname,pwd from userprofile where uname='" & txtuname & "' and
pwd='" & txtpwd & "'"
rs.Open qr, con, adOpenKeyset, adLockOptimistic
If txtuname.Text = "admin" Or txtuname.Text = "ADMIN" Then
MDIForm1.mnuadministrator.Visible = True
MDIForm1.mnubankprofile.Visible = True
MDIForm1.mnuviewprofile.Visible = True
End If
If rs.RecordCount > 0 Then
frmprocess.Show
auser = txtuname.Text
MDIForm1.mnusignin.Enabled = False
Else
MsgBox "Enter correct username or password"
txtpwd.SetFocus
End If
rs.Close
txtpwd.Text = Empty
End Sub

Private Sub Form_Load()


txtuname.MaxLength = 15
txtpwd.MaxLength = 15
End Sub

Private Sub txtpwd_GotFocus()


SendKeys "{home}+{end}"
End Sub

Private Sub txtpwd_KeyPress(KeyAscii As Integer)


If KeyAscii = 8 Then
KeyAscii = 8
ElseIf KeyAscii = 32 Then
KeyAscii = 0
End If

KeyAscii = validate_alphanumeric(KeyAscii)
End Sub

Private Sub txtuname_GotFocus()


SendKeys "{home}+{end}"
End Sub
Private Sub txtuname_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub

Splash
Form
Dim i As Integer
Dim rs As New ADODB.Recordset

Private Sub Form_Load()


Image1.Picture = LoadPicture(App.Path & "\img\process.bmp")
i=0
End Sub

Private Sub Timer1_Timer()


Image1.Width = Image1.Width + 44
If Image1.Width >= 6855 Then
Timer1.Enabled = False
End If

End Sub

Private Sub Timer2_Timer()


Label1.Caption = i & "%"
i=i+1
If i = 101 Then
Timer2.Enabled = False
MDIForm1.Show
frmlogin.Hide
Unload Me
End If
End Sub

MDI Form
Private Sub MDIForm_Load()
MDIForm1.mnuadministrator.Visible = False
MDIForm1.mnubankprofile.Visible = False
End Sub

Private Sub mnuadmin_Click()


frmchangeup.Show
End Sub

Private Sub mnuaboutbank_Click()


frmAbout.Show
End Sub

Private Sub mnuadministrator_Click()


frmchangeup.Show
End Sub
Private Sub mnucalculator_Click()
Shell "calc.exe"
End Sub

Private Sub mnucutdetail_Click()


Dim rs As New ADODB.Recordset
rs.Open "select * from cust_master order by acc_no", con, adOpenStatic,
adLockReadOnly
Open App.Path & "\report\cust.txt" For Output As #1
'MsgBox App.Path
Print #1, " ----------------------------------------------------------------------"
Print #1, " All CUSTOMER DETAILS"
Print #1, " ----------------------------------------------------------------------"
Print #1, " AccountNO" & Space(3) & "Name" & Space(15) & "City" & Space(8)
& "CONTACT NO" & Space(5) & "LAST BALANCE"
Print #1, " ----------------------------------------------------------------------"
Do While Not rs.EOF
Print #1, " " & rs!acc_no & Space(10 - Len(rs!acc_no)) & rs!Name & Space(20
- Len(rs!Name)) & rs!city & Space(15 - Len(rs!city)) & rs!cno & Space(10 - Len(rs!
current_amount)) & rs!current_amount
Print #1, ""
rs.MoveNext
Loop
Print #1, ""
Print #1, " ----------------------------------------------------------------------"
Print #1, ""
Print #1, " " & Me.Caption & Space(4) & Date & Space(4) & Time
Close #1
Shell App.Path & "\utilitys\wordpad.exe " & App.Path & "\report\cust.txt",
vbMaximizedFocus
rs.Close
End Sub

Private Sub mnudeposit_Click()


frmdeposit.Show
End Sub

Private Sub mnudepositreport_Click()


Dim rs As New ADODB.Recordset
rs.Open "select * from deposit order by date", con, adOpenStatic,
adLockReadOnly
Open App.Path & "\report\alldeposit.txt" For Output As #1
'MsgBox App.Path
Print #1, "------------------------------------------------------------------------"
Print #1, " All DEPOSIT TRANSACTION DETAILS"
Print #1, "------------------------------------------------------------------------"
Print #1, "Transaction ID" & Space(2) & "Account NO" & Space(3) & "Date" &
Space(10) & "Deposited_Amt" & Space(3) & "Available Bal"
Print #1, "------------------------------------------------------------------------"
Do While Not rs.EOF

Print #1, ""


Print #1, rs!transactionid & Space(15 - Len(rs!acc_no)) & rs!acc_no & Space(15
- Len(rs!Date)) & rs!Date & Space(15 - Len(rs!depositamount)) & Format(rs!
depositamount, "0.00") & Space(15 - Len(rs!remaing_amt)) & Format(rs!
remaing_amt, "0.00")
Print #1, ""
rs.MoveNext
Loop
Print #1, ""
Print #1, "------------------------------------------------------------------------"
Print #1, ""
Print #1, Me.Caption & Space(4) & Date & Space(4) & Time
Close #1
Shell App.Path & "\utilitys\wordpad.exe " & App.Path & "\report\alldeposit.txt",
vbMaximizedFocus
rs.Close
End Sub

Private Sub mnuexit_Click()


End
End Sub

Private Sub mnunewcustomer_Click()


frmcust_master.Show
End Sub
Private Sub mnunewtransaction_Click()
frmwithdrawn.Show
End Sub

Private Sub mnunotepad_Click()


Shell "notepad.exe", vbMaximizedFocus
End Sub
Private Sub mnusingout_Click()
Unload Me
frmlogin.Show
End Sub

Private Sub mnuviewbankprofile_Click()


frmbankprofile.Show
End Sub

Private Sub mnuviewprofile_Click()


frmuser_info.Show
End Sub

Private Sub mnuviewtransaction_Click()


frmtransaction.Show
End Sub

Private Sub mnuwithdraw_Click()


frmwithdrawn.Show
End Sub

Private Sub mnuwithdrawlreport_Click()


Dim rs As New ADODB.Recordset

rs.Open "select * from withdrawn order by date", con, adOpenStatic,


adLockReadOnly
Open App.Path & "\report\allwithdrawl.txt" For Output As #1
'MsgBox App.Path
Print #1, "-------------------------------------------------------------------"
Print #1, " All WITHDRAWL TRANSACTION DETAILS"
Print #1, "-------------------------------------------------------------------"
Print #1, "Trans_ID" & Space(3) & "A/c NO" & Space(5) & "Date" & Space(8) &
"Withdrawn_Amt" & Space(5) & "Available Bal"
Print #1, "-------------------------------------------------------------------"
Do While Not rs.EOF

Print #1, ""


Print #1, rs!transactionid & Space(11 - Len(rs!acc_no)) & rs!acc_no & Space(11
- Len(rs!acc_no)) & rs!Date & Space(13 - Len(rs!Date)) & Format(rs!
withdrawn_amt, "0.00") & Space(16 - Len(rs!withdrawn_amt)) & rs!remaing_amt &
Space(22 - Len(rs!remaing_amt))
Print #1, ""
rs.MoveNext
Loop
Print #1, ""
Print #1, "-------------------------------------------------------------------"
Print #1, ""
Print #1, Me.Caption & Space(4) & Date & Space(4) & Time
Close #1
Shell App.Path & "\utilitys\wordpad.exe " & App.Path &
"\report\allwithdrawl.txt", vbMaximizedFocus

rs.Close

End Sub
User profile

Option Explicit

Dim rs As New ADODB.Recordset

Private Sub calendardob_Click()


txtdob.Text = calendardob.Value

calendardob.Visible = False
End Sub
Private Sub Calendar1_Click()

End Sub

Private Sub chkshowpwd_Click()


If chkshowpwd.Value = vbChecked Then
txtpassword.PasswordChar = ""
Else
txtpassword.PasswordChar = Chr(219)
End If
End Sub

Private Sub cmdclose_Click()


Unload Me
End Sub

Private Sub cmdreset_Click()


Dim ans As String
ans = MsgBox("Are You Sure to Reset the Form ?", vbYesNo, "USER
INFORMATION")
If ans = vbYes Then

txtpassword.Text = ""
txtfullname.Text = ""
txtaddress.Text = ""
txtcontact.Text = ""
txtemail.Text = ""

End If

End Sub

Private Sub cmdsave_Click()

If LTrim(txtfullname.Text) = "" Or LTrim(txtaddress.Text) = "" Or


LTrim(txtcontact.Text) = "" Or LTrim(txtemail.Text) = "" Then
MsgBox "Please Fill All Information..."
Else
If vbYes = MsgBox("Are You Sure To Save This Changes ?", vbYesNo,
"USER INFORMATION") Then
Dim upd As String
upd = "update userprofile set [pwd]='" & txtpassword & "',
[fullname]='" & txtfullname & "',[address]='" & txtaddress & "',[contact]='"
& txtcontact & "',[email]='" & txtemail & "',[birthdate]='" & txtdob & "'
where [uname]='" & txtusername & "'"
con.Execute upd
MsgBox "Record Updated Successfully..."
End If
End If
End Sub

Private Sub Form_Load()


Dim qr As String
Me.Left = (MDIForm1.Width / 2) - (Me.Width / 2)
Me.Top = (MDIForm1.Height / 2) - (Me.Height / 2)
qr = "select * from userprofile where uname='" & auser & "'"
rs.Open qr, con, adOpenDynamic, adLockOptimistic
Call view
txtpassword.PasswordChar = Chr(219)
rs.Close
Me.Left = 2000
Me.Top = 50

calendardob.Visible = False
End Sub

Private Sub txtaddress_KeyPress(KeyAscii As Integer)


Call validate_alpha(KeyAscii)
End Sub

Private Sub txtcontact_KeyPress(KeyAscii As Integer)


Call validate_number(KeyAscii)
End Sub

Private Sub txtdob_GotFocus()


calendardob.Visible = True
calendardob.ZOrder 0
If txtdob = "" Then
calendardob.Value = rs.Fields(6)
Else
calendardob.Value = txtdob
End If
End Sub

Private Sub txtdob_LostFocus()


calendardob.Visible = False
End Sub

Private Sub view()


txtusername.Text = rs.Fields(0)
txtpassword.Text = rs.Fields(1)
txtfullname.Text = rs.Fields(2)
txtaddress.Text = rs.Fields(3)
txtcontact.Text = rs.Fields(4)
txtemail.Text = rs.Fields(5)
txtdob.Text = rs.Fields(6)
End Sub

Private Sub txtemail_KeyPress(KeyAscii As Integer)


Call validate_alpha(KeyAscii)
End Sub

Private Sub txtfullname_KeyPress(KeyAscii As Integer)


Call validate_alpha(KeyAscii)
End Sub
Private Sub txtpassword_KeyPress(KeyAscii As Integer)

If KeyAscii = 8 Then
KeyAscii = 8
ElseIf KeyAscii = 32 Then
KeyAscii = 0
End If

KeyAscii = validate_alphanumeric(KeyAscii)
End Sub

Private Sub txtusername_KeyPress(KeyAscii As Integer)


Call validate_alpha(KeyAscii)
End Sub
Open New
Account

Dim rs_disp As New ADODB.Recordset


Dim rsu As New ADODB.Recordset
Dim rw As Integer, col As Integer
Dim mode As String
Dim flg As Boolean

Private Sub cmdadd_Click()

mode = "a"
Call txt_empty
Call tabindex
cmdsave.Enabled = True
cmddel.Enabled = False
cmdupdate.Enabled = False
cmdreset.Enabled = True
txtname.SetFocus
cmdadd.Enabled = True
unlock_form_control Me
generate_new_accountno
generate_new_transaction
cmdadd.Enabled = False
txtopen_dt.Text = Date
state_combo.ListIndex = 0
sex_combo.ListIndex = 0
acc_type_combo.ListIndex = 0
txtcust_id.Enabled = False
txtacc_no.Enabled = False
Call tabindex
cmdsave.tabindex = 13
cmdreset.tabindex = 14
cmdcancel.tabindex = 15
End Sub

Private Sub cmdcancel_Click()


Unload Me
End Sub

Private Sub cmddel_Click()


Dim strdel As String
MsgBox "ARE YOU SURE DELETE RECORD....?", vbYesNo
If vbNo = True Then
Exit Sub
Else
strdel = "delete from cust_master where acc_no='" & txtacc_no & "'"
strde2 = "delete from withdrawn where acc_no='" & txtacc_no & "'"
strde3 = "delete from deposit where acc_no='" & txtacc_no & "'"
con.Execute strdel
con.Execute strde2
con.Execute strde3
Call disp_rec
Call txt_empty
cmdsave.Enabled = False
cmdupdate.Enabled = False
cmddel.Enabled = False
End If
End Sub

Private Sub cmdreset_Click()


txtcust_id = ""
txtacc_no.Text = ""
txtname.Text = ""
txtaddress.Text = ""
txtcity.Text = ""
txtpincode.Text = ""
state_combo.Text = ""
sex_combo.Text = ""
txtbdt.Text = ""
txtcontactno.Text = ""
acc_type_combo.Text = ""
txtopen_dt.Text = ""
txtopenamount.Text = ""

txtremark.Text = ""
cmdreset.Enabled = False
cmdupdate.Enabled = False
cmddel.Enabled = False
cmdadd.Enabled = True
cmdsave.Enabled = False
lock_form_control Me
End Sub

Private Sub cmdsave_Click()


Dim str1 As String

If mode = "a" Then

rs_disp.Open "select * from cust_master where acc_no='" & txtacc_no.Text &


"'", Module1.con, adOpenKeyset
If rs_disp.RecordCount = 0 Then
str1 = "insert into cust_master values(" & txtcust_id.Text & ",'" &
txtacc_no.Text & "','" & txtname.Text & "','" & txtaddress.Text & "','" & txtcity.Text
& "','" & txtpincode.Text & "','" & state_combo.Text & "','" & txtbdt.Text & "','" &
sex_combo.Text & "','" & txtcontactno.Text & "','" & acc_type_combo.Text & "','" &
txtopen_dt & "','" & txtopenamount.Text & "','" & txtopenamount.Text & " ','" &
txtremark.Text & "')"
Module1.con.Execute str1
rs_disp.Close
Call disp_rec
Call txt_empty
lock_form_control Me
cmdsave.Enabled = False
cmdupdate.Enabled = False
cmddel.Enabled = False
cmdadd.Enabled = True
Else
MsgBox "Account no already exists - plz enter unique account_no"
cmdadd.Enabled = False
cmdsave.Enabled = True
cmdsave.Enabled = False
cmdadd.Enabled = True
End If
End If
If mode = "u" Then
rsu.Open "select * from cust_master where acc_no='" & txtacc_no & "'",
Module1.con, adOpenKeyset
str1 = "update cust_master set [acc_no]='" & txtacc_no.Text & "',[name]='"
& txtname.Text & "',[address]='" & txtaddress.Text & "',[city]='" & txtcity.Text & "',
[pincode]='" & txtpincode.Text & "',[state]='" & state_combo.Text & "',[bdate]='" &
txtbdt.Text & "',[sex]='" & sex_combo.Text & "',[cno]='" & txtcontactno.Text & "',
[acc_type]='" & acc_type_combo.Text & "',[open_date]='" & txtopen_dt & "',
[open_amount]='" & txtopenamount.Text & "',[current_amount]='" &
txtopenamount.Text & "',[remark]='" & txtremark.Text & "'where acc_no='" &
txtacc_no & "'"
con.Execute str1
txt_empty
Call disp_rec
rsu.Close
cmdsave.Enabled = False
cmdadd.Enabled = True
cmdreset.Enabled = False
End If

End Sub

Private Sub cmdsearch_Click()


Dim Search_accno As Double
Search_accno = InputBox("Enter Account number")
If rs_disp.State = 1 Then
rs_disp.Close
End If
rs_disp.Open "select * from cust_master where acc_no='" & txtacc_no & "'",
Module1.con, adOpenKeyset
MsgBox rs_disp.Fields(0)
rs_disp.Close

End Sub

Private Sub cmdupdate_Click()


mode = "u"
unlock_form_control Me
cmdupdate.Enabled = False
cmddel.Enabled = False
cmdadd.Enabled = False
cmdsave.Enabled = True
txtcust_id.Enabled = False
txtacc_no.Enabled = False
txtname.SetFocus
End Sub

Private Sub Form_Load()

msflg1.TextMatrix(0, 0) = "Customer_id"
msflg1.TextMatrix(0, 1) = "Account_no"
msflg1.TextMatrix(0, 2) = "Name"
msflg1.TextMatrix(0, 3) = "Address"
msflg1.TextMatrix(0, 4) = "City"
msflg1.TextMatrix(0, 5) = "Pin Code"
msflg1.TextMatrix(0, 6) = "State"
msflg1.TextMatrix(0, 7) = "Birth_Date"
msflg1.TextMatrix(0, 8) = "Sex"
msflg1.TextMatrix(0, 9) = "Contact_no"
msflg1.TextMatrix(0, 10) = "Account_type"
msflg1.TextMatrix(0, 11) = "Open_Date"
msflg1.TextMatrix(0, 12) = "Open_amount"
msflg1.TextMatrix(0, 13) = "Current_Amt"
msflg1.TextMatrix(0, 14) = "Remark"
cmdupdate.Enabled = False
cmdsave.Enabled = False
cmddel.Enabled = False
cmdreset.Enabled = False
cmdadd.tabindex = 0
cmdcancel.tabindex = 1
lock_form_control Me
Call disp_rec

Me.Left = (MDIForm1.Width / 2) - (Me.Width / 2)


Me.Top = (MDIForm1.Height / 2) - (Me.Height / 2)
End Sub
'***************FILL FLEXGRID***********************88
Private Sub msflg1_Click()
txtcust_id.Text = msflg1.TextMatrix(msflg1.row, 0)
txtacc_no.Text = msflg1.TextMatrix(msflg1.row, 1)
txtname.Text = msflg1.TextMatrix(msflg1.row, 2)
txtaddress.Text = msflg1.TextMatrix(msflg1.row, 3)
txtcity.Text = msflg1.TextMatrix(msflg1.row, 4)
txtpincode.Text = msflg1.TextMatrix(msflg1.row, 5)
state_combo.Text = msflg1.TextMatrix(msflg1.row, 6)
sex_combo.Text = msflg1.TextMatrix(msflg1.row, 8)
txtbdt.Text = msflg1.TextMatrix(msflg1.row, 7)
txtcontactno.Text = msflg1.TextMatrix(msflg1.row, 9)
acc_type_combo.Text = msflg1.TextMatrix(msflg1.row, 10)
txtopen_dt.Text = msflg1.TextMatrix(msflg1.row, 11)
txtopenamount.Text = FormatNumber(msflg1.TextMatrix(msflg1.row, 12), 2)
txtremark.Text = msflg1.TextMatrix(msflg1.row, 14)
lock_form_control Me
cmdsave.Enabled = False
cmdupdate.Enabled = True
cmddel.Enabled = True
cmdadd.Enabled = True
cmdreset.Enabled = True

End Sub

Private Sub txtaddress_KeyPress(KeyAscii As Integer)


KeyAscii = validate_alpha_special(KeyAscii)
End Sub

Private Sub disp_rec()


If rs_disp.State = 1 Then
rs_disp.Close
End If
rs_disp.Open "select * from cust_master", Module1.con, adOpenKeyset
msflg1.Rows = rs_disp.RecordCount + 1
rw = 1
col = 0
While rs_disp.EOF = False
msflg1.TextMatrix(rw, col) = rs_disp!cust_id
msflg1.TextMatrix(rw, col + 1) = rs_disp!acc_no
msflg1.TextMatrix(rw, col + 2) = rs_disp!Name
msflg1.TextMatrix(rw, col + 3) = rs_disp!address
msflg1.TextMatrix(rw, col + 4) = rs_disp!city
msflg1.TextMatrix(rw, col + 5) = rs_disp!pincode
msflg1.TextMatrix(rw, col + 6) = rs_disp!State
msflg1.TextMatrix(rw, col + 7) = rs_disp!bdate
msflg1.TextMatrix(rw, col + 8) = rs_disp!sex
msflg1.TextMatrix(rw, col + 9) = rs_disp!cno
msflg1.TextMatrix(rw, col + 10) = rs_disp!acc_type
msflg1.TextMatrix(rw, col + 11) = rs_disp!open_date
msflg1.TextMatrix(rw, col + 12) = rs_disp!open_amount
msflg1.TextMatrix(rw, col + 13) = rs_disp!current_amount
msflg1.TextMatrix(rw, col + 14) = rs_disp!remark

rw = rw + 1
rs_disp.MoveNext
Wend
rs_disp.Close

End Sub
'*************** GENERATE NEW TRANSACTION
ID**********************************
Public Sub generate_new_transaction()
Dim lastnumber As Long, newnumber As Long
rs_disp.Open "Select * from cust_master", Module1.con, adOpenKeyset
If rs_disp.RecordCount <= 0 Then
newnumber = 20000
rs_disp.Close
Else
rs_disp.Close
rs_disp.Open "Select max(cust_id) from cust_master", Module1.con,
adOpenStatic
newnumber = rs_disp.Fields(0) + 1
rs_disp.Close

End If
txtcust_id.Text = newnumber
End Sub
'*****************GENERATE NEW ACCOUNT
NO**************************************
Public Sub generate_new_accountno()
Dim lastnumber1 As Long, newnumber1 As Long

rs_disp.Open "Select acc_no from cust_master", Module1.con, adOpenStatic

If rs_disp.RecordCount <= 0 Then


newnumber1 = 10000
rs_disp.Close
Else
rs_disp.Close
rs_disp.Open "Select max(acc_no) from cust_master", Module1.con,
adOpenStatic
newnumber1 = rs_disp.Fields(0) + 1
rs_disp.Close
End If
txtacc_no.Text = newnumber1

End Sub
'****************EMPTY ALL FROM CONTROL*******************
Public Sub txt_empty()
txtcust_id = ""
txtacc_no.Text = ""
txtname.Text = ""
txtaddress.Text = ""
txtcity.Text = ""
txtpincode.Text = ""
state_combo.Text = ""
sex_combo.Text = ""
txtbdt.Text = ""
txtcontactno.Text = ""
acc_type_combo.Text = ""
txtopen_dt.Text = ""
txtopenamount.Text = ""
txtremark.Text = ""
End Sub

Private Sub txtcity_KeyPress(KeyAscii As Integer)


KeyAscii = validate_alpha(KeyAscii)
End Sub

Private Sub txtcontactno_KeyPress(KeyAscii As Integer)


KeyAscii = validate_number(KeyAscii)
End Sub

Private Sub txtname_KeyPress(KeyAscii As Integer)


KeyAscii = validate_alpha(KeyAscii)
End Sub

Private Sub txtopenamount_KeyPress(KeyAscii As Integer)


KeyAscii = validate_number_point(KeyAscii)

End Sub

Private Sub txtpincode_KeyPress(KeyAscii As Integer)


KeyAscii = validate_number(KeyAscii)
End Sub

Private Sub txtremark_KeyPress(KeyAscii As Integer)


KeyAscii = validate_alpha(KeyAscii)
End Sub

Private Sub tabindex()

'txtacc_no.tabindex = 0
txtname.tabindex = 1
txtaddress.tabindex = 2
txtcity.tabindex = 3
txtpincode.tabindex = 4
state_combo.tabindex = 5
state_combo.ListIndex = 0
sex_combo.tabindex = 6
sex_combo.ListIndex = 0
txtbdt.tabindex = 7
txtcontactno.tabindex = 8
acc_type_combo.tabindex = 9
acc_type_combo.ListIndex = 0
txtopen_dt.tabindex = 10
txtopenamount.tabindex = 11
txtremark.tabindex = 12
End Sub
Withdrawl
form

Option Explicit
Dim tid As String
Dim txt As String
Dim rsw As New ADODB.Recordset
Dim rschk As New ADODB.Recordset
Dim rs_disp As New ADODB.Recordset
Private Sub cbocustomerno_KeyPress(KeyAscii As Integer)
KeyAscii = validate_number(KeyAscii)
End Sub

Private Sub cmdcancel_Click()


Unload Me
End Sub

Private Sub cmdsubmit_Click()


Dim insert, up As String
Dim tot, minb As Double
Dim ramt As String
If txtaccountno.Text = Empty Then
MsgBox "ENTER ACCOUNT NUMBER", vbCritical
txtaccountno.SetFocus
ElseIf txtwithdrawanamount.Text = Empty Then
MsgBox "ENTER WITHDRAWL AMOUNT..", vbCritical
txtwithdrawanamount.SetFocus
Else
If vbNo = MsgBox("ARE YOU SUARE COMPLETE TRANSACTION....?",
vbYesNo) Then
Exit Sub
Else
rsw.Open "select * from bankprofile", con, adOpenKeyset
minb = rsw.Fields(8)
rsw.Close

tot = Val(lblbalance.Caption) - Val(txtwithdrawanamount.Text)


If tot < minb Then
MsgBox "BALANCE IS NOT SUFFICIENT FOR WITHDRAWL.....",
vbCritical
txtaccountno.Text = Empty
txtnarration.Text = Empty
txtwithdrawanamount.Text = Empty
lbltype.Caption = Empty
lblbalance.Caption = Empty
txtaccountno.SetFocus
Exit Sub
End If
up = "update cust_master set current_amount='" & tot & "' where
acc_no='" & txtaccountno & "'"
'MsgBox up
con.Execute up
rsw.Open "select * from cust_master where acc_no='" & txtaccountno &
"'", con, adOpenKeyset
ramt = rsw.Fields(13)
txt = rsw.Fields(2)
rsw.Close
insert = "insert into withdrawn values('" & txttransactionid & "','" &
txtaccountno.Text & "','" & txtnarration.Text & "','" & txtwithdrawanamount.Text &
"','" & lbldate.Caption & "','" & ramt & "')"
con.Execute insert
MsgBox "TRANSACTION IS COMPLETED.........", vbInformation
Dim a As Integer
a = chk1.Value
tid = txttransactionid.Text
Unload frmwithdrawn
frmwithdrawn.Show
If a = 1 Then
report_fill1
End If
End If

End If

End Sub

Private Sub Command1_Click()


Unload Me
End Sub
Private Sub Form_Load()

lbldate = Date
Call generate_new_transaction

msf1.TextMatrix(0, 0) = "Transaction ID"


msf1.TextMatrix(0, 1) = "Account NO"
msf1.TextMatrix(0, 2) = "Narration"
msf1.TextMatrix(0, 3) = "Amount withdrawn"
msf1.TextMatrix(0, 4) = "Date"
msf1.TextMatrix(0, 5) = "REMAING AMOUNT"
Me.Left = (MDIForm1.Width / 2) - (Me.Width / 2)
Me.Top = (MDIForm1.Height / 2) - (Me.Height / 2)

Call disp_rec
txttransactionid.Enabled = False
txtaccountno.tabindex = 0
cmdsubmit.Enabled = False

End Sub
'****************GENERATE NEW TRANSACTION
ID**********************
Public Sub generate_new_transaction()
Dim lastnumber As Long, newnumber As Long
rsw.Open "Select * from withdrawn", con, adOpenDynamic, adLockOptimistic
If rsw.BOF = True And rsw.EOF = True Then
lastnumber = 15000
Else
rsw.MoveLast
lastnumber = rsw.Fields(0)
End If
newnumber = lastnumber + 1
txttransactionid.Text = newnumber

rsw.Close
End Sub
'*******************DISPLAY RECORD**************************
Private Sub disp_rec()
Dim row, col As Integer
Dim S As String
rs_disp.CursorLocation = adUseClient
rs_disp.Open "select * from withdrawn", Module1.con, adOpenKeyset
msf1.Rows = rs_disp.RecordCount + 1
row = 1
col = 0
While rs_disp.EOF = False
msf1.TextMatrix(row, col) = rs_disp!transactionid
msf1.TextMatrix(row, col + 1) = rs_disp!acc_no
msf1.TextMatrix(row, col + 2) = rs_disp!narration
msf1.TextMatrix(row, col + 3) = rs_disp!withdrawn_amt
msf1.TextMatrix(row, col + 4) = rs_disp!Date
msf1.TextMatrix(row, col + 5) = rs_disp!remaing_amt
row = row + 1
rs_disp.MoveNext
Wend
rs_disp.Close
End Sub

Private Sub txtaccountno_Change()


If txtaccountno.Text = Empty Then
Else
rschk.Open "select * from cust_master where acc_no='" & txtaccountno & "'",
Module1.con, adOpenKeyset
If rschk.RecordCount = 0 Then
lblbalance.Caption = Empty
lbltype.Caption = Empty
cmdsubmit.Enabled = False
Else
txtaccountno.Text = rschk.Fields(1)
lblbalance.Caption = Format(rschk.Fields(13), "0.00")
lbltype.Caption = rschk.Fields(10)
cmdsubmit.Enabled = True

End If
rschk.Close
End If
End Sub

Private Sub txtaccountno_KeyPress(KeyAscii As Integer)


KeyAscii = validate_number(KeyAscii)
End Sub

Private Sub txtnarration_KeyPress(KeyAscii As Integer)


KeyAscii = validate_alphanumeric(KeyAscii)
End Sub

Private Sub txtwithdrawanamount_KeyPress(KeyAscii As Integer)


KeyAscii = validate_number_point(KeyAscii)
End Sub
'**********GENERATE REPORT FOR WITHDRAWN**********************
Private Sub report_fill1()
Dim rs As New ADODB.Recordset
Dim srs As New ADODB.Recordset
Dim qrs As New ADODB.Recordset
rs.Open "select * from bankprofile order by bank_name", con, adOpenStatic,
adLockReadOnly
qrs.Open "select * from withdrawn where transactionid='" & tid & "'", con,
adOpenStatic, adLockReadOnly
Open App.Path & "\report\withdrawn.txt" For Output As #1
Print #1, "------------------------------------------------------------------------"
Print #1, " WITHDRAWN SLIP"
Print #1, "------------------------------------------------------------------------"

Do While Not rs.EOF


Print #1, Space(50) & "Branch Name:" & rs!bank_name
Print #1, Space(50) & "Branch No:" & rs!barnch_no
Print #1, Space(50) & "Address:" & rs!address
Print #1, Space(50) & "City:" & rs!city
Print #1, Space(50) & "Pincode: " & rs!pincode
Print #1, Space(50) & "Contact No:" & rs!co_no
Print #1, Space(50) & "Stste:" & rs!State
Print #1, Space(50) & "Country:" & rs!country
Print #1, "------------------------------------------------------------------------"
Print #1, Space(0) & "Transaction Id:" & qrs!transactionid
Print #1, ""
Print #1, Space(0) & "Account No:" & qrs!acc_no
Print #1, ""
Print #1, Space(0) & "NAME:" & txt
Print #1, ""
Print #1, Space(0) & "Withdrawn Amount:" & Format(qrs!withdrawn_amt,
"0.00")
Print #1, ""
Print #1, Space(0) & "Narration:" & qrs!narration
Print #1, ""
Print #1, Space(0) & "Date:" & qrs!Date
Print #1, ""
Print #1, Space(0) & "Balance After Transaction:" & Format(qrs!remaing_amt,
"0.00")
Print #1, ""
Print #1, "------------------------------------------------------------------------"
Print #1, ""
Print #1, ""
Print #1, "Recived By:........................." & " " & "SIG:......................"
rs.MoveNext
Loop
Close #1

Shell App.Path & "\utilitys\wordpad.exe " & App.Path & "\report\withdrawn.txt",


vbMaximizedFocus
qrs.Close
rs.Close
End Sub
Deposit form

Option Explicit
Dim tid As String
Dim txt As String
Dim rsw As New ADODB.Recordset
Dim rschk As New ADODB.Recordset
Dim rs_disp As New ADODB.Recordset

Private Sub cbocustomerno_KeyPress(KeyAscii As Integer)


KeyAscii = validate_number(KeyAscii)
End Sub

Private Sub chkcash_Click()


txtchequeno.Visible = False
txtbankname.Visible = False
Label9.Visible = False
Label4.Visible = False
End Sub

Private Sub chkcheque_Click()


txtchequeno.Visible = True
txtbankname.Visible = True
Label9.Visible = True
Label4.Visible = True
End Sub

Private Sub cmdcancel_Click()


Unload Me
End Sub

Private Sub cmdsubmit_Click()


Dim insert As String
Dim tot As Double
Dim ramt As String
Dim mode1 As String
If txtaccountno.Text = Empty Then
MsgBox "ENTER ACCOUNT NUMBER", vbCritical
txtaccountno.SetFocus
ElseIf txtdepositamount.Text = Empty Then
MsgBox "ENTER DEPOSIT AMOUNT..", vbCritical
txtdepositamount.SetFocus
Else

MsgBox "ARE YOU SUARE COMPLET TRANSACTION....?", vbYesNo


If vbNo = True Then
Exit Sub
Else
tot = Val(lblbalance.Caption) + Val(txtdepositamount.Text)
con.Execute "update cust_master set current_amount='" & tot & "' where
acc_no='" & txtaccountno & "'"
rsw.Open "select * from cust_master where acc_no='" & txtaccountno &
"'", con, adOpenKeyset
ramt = rsw.Fields(13)
txt = rsw.Fields(2)
rsw.Close
If chkcash.Value = True Then
mode1 = "cash"
End If
If chkcheque.Value = True Then
mode1 = "chque"
If txtbankname.Text = Empty Then
MsgBox "ENTER BANK NAME...............", vbCritical
Exit Sub
txtbankname.SetFocus
End If
If txtchequeno.Text = Empty Then
MsgBox "ENTER BANK CHEQUE NO..........", vbCritical
Exit Sub
txtchequeno.SetFocus
End If
End If
insert = "insert into deposit values('" & txttransactionid & "','" &
txtaccountno.Text & "','" & txtnarration.Text & "','" & txtdepositamount.Text & "','"
& mode1 & "','" & txtbankname & "','" & txtchequeno & "','" & lbldate.Caption &
"','" & ramt & "')"
con.Execute insert
MsgBox "TRANSACTION IS COMPLETED.........", vbInformation
Dim a As Integer
a = chk1.Value
tid = txttransactionid.Text
Unload frmdeposit
frmdeposit.Show
If a = 1 Then
report_fill1
End If
End If
End If
End Sub

Private Sub Command1_Click()


Unload Me
End Sub
Private Sub Form_Load()
lbldate = Date
Call generate_new_transaction

msf1.TextMatrix(0, 0) = "Transaction ID"


msf1.TextMatrix(0, 1) = "Account NO"
msf1.TextMatrix(0, 2) = "Narration"
msf1.TextMatrix(0, 3) = "Deposite Amount"
msf1.TextMatrix(0, 4) = "mode"
msf1.TextMatrix(0, 5) = "Bank Name"
msf1.TextMatrix(0, 6) = "Cheque No"
msf1.TextMatrix(0, 7) = "Date"
msf1.TextMatrix(0, 8) = "REMAING AMOUNT"

Me.Left = (MDIForm1.Width / 2) - (Me.Width / 2)


Me.Top = (MDIForm1.Height / 2) - (Me.Height / 2)
Call disp_rec
txttransactionid.Enabled = False
cmdsubmit.Enabled = False
txtaccountno.tabindex = 0
txtnarration.tabindex = 1
txtdepositamount.tabindex = 2
chkcash.tabindex = 3

chkcheque.tabindex = 3
txtbankname.tabindex = 5
txtchequeno.tabindex = 6
chk1.tabindex = 7
cmdsubmit.tabindex = 8
cmdcancel.tabindex = 9
txtchequeno.Visible = False
txtbankname.Visible = False
Label9.Visible = False
Label4.Visible = False

End Sub
'*************GENERATE NEW
TRANSACTION*******************************
Public Sub generate_new_transaction()
Dim lastnumber As Long, newnumber As Long
rsw.Open "Select * from deposit", con, adOpenDynamic, adLockOptimistic
If rsw.BOF = True And rsw.EOF = True Then
lastnumber = 1200000
Else
rsw.MoveLast
lastnumber = rsw.Fields(0)
End If
newnumber = lastnumber + 1
txttransactionid.Text = newnumber

rsw.Close
End Sub
'***********************DISPLAY
FUNCTION****************************
Private Sub disp_rec()
Dim row, col As Integer
Dim S As String
rs_disp.CursorLocation = adUseClient
rs_disp.Open "select * from deposit", Module1.con, adOpenKeyset
msf1.Rows = rs_disp.RecordCount + 1
row = 1
col = 0
While rs_disp.EOF = False
msf1.TextMatrix(row, col) = rs_disp!transactionid
msf1.TextMatrix(row, col + 1) = rs_disp!acc_no
msf1.TextMatrix(row, col + 2) = rs_disp!narration
msf1.TextMatrix(row, col + 3) = Format(rs_disp!depositamount, "0.00")
msf1.TextMatrix(row, col + 4) = rs_disp!mode
msf1.TextMatrix(row, col + 5) = rs_disp!bankname
msf1.TextMatrix(row, col + 6) = rs_disp!chequeno
msf1.TextMatrix(row, col + 7) = rs_disp!Date
msf1.TextMatrix(row, col + 8) = Format(rs_disp!remaing_amt, "0.00")
row = row + 1
rs_disp.MoveNext
Wend
rs_disp.Close
End Sub

'************CHECK FOR ACCOUNT NUMBER******************


Private Sub txtaccountno_Change()
If txtaccountno.Text = Empty Then
cmdsubmit.Enabled = False
Else
rschk.Open "select * from cust_master where acc_no='" & txtaccountno & "'",
Module1.con, adOpenKeyset
If rschk.RecordCount = 0 Then
cmdsubmit.Enabled = False
lblbalance.Caption = ""
lbltype.Caption = ""
Else
txtaccountno.Text = rschk.Fields(1)
lblbalance.Caption = Format(rschk.Fields(13), "0.00")
lbltype.Caption = rschk.Fields(10)
cmdsubmit.Enabled = True
End If
rschk.Close
End If
End Sub

Private Sub txtaccountno_KeyPress(KeyAscii As Integer)


KeyAscii = validate_number(KeyAscii)
End Sub

Private Sub txtwithdrawanamount_KeyPress(KeyAscii As Integer)


KeyAscii = validate_number_point(KeyAscii)
End Sub
Private Sub txtbankname_KeyPress(KeyAscii As Integer)
KeyAscii = validate_alpha(KeyAscii)
End Sub
Private Sub txtdepositamount_KeyPress(KeyAscii As Integer)
KeyAscii = validate_number_point(KeyAscii)
End Sub

Private Sub txtnarration_KeyPress(KeyAscii As Integer)


KeyAscii = validate_alphanumeric(KeyAscii)
End Sub
'************GENERATE REPORT FOR
DEPOSIT*******************************
Private Sub report_fill1()
Dim rs As New ADODB.Recordset
Dim srs As New ADODB.Recordset
Dim qrs As New ADODB.Recordset
rs.Open "select * from bankprofile order by bank_name", con, adOpenStatic,
adLockReadOnly
qrs.Open "select * from deposit where transactionid='" & tid & "'", con,
adOpenStatic, adLockReadOnly
Open App.Path & "\report\deposit.txt" For Output As #1
Print #1, "------------------------------------------------------------------------"
Print #1, " DEPOSIT SLIP"
Print #1, "------------------------------------------------------------------------"
Do While Not rs.EOF
Print #1, Space(50) & "Branch Name:" & rs!bank_name
Print #1, Space(50) & "Branch No:" & rs!barnch_no
Print #1, Space(50) & "Address:" & rs!address
Print #1, Space(50) & "City:" & rs!city
Print #1, Space(50) & "Pincode: " & rs!pincode
Print #1, Space(50) & "Contact No:" & rs!co_no
Print #1, Space(50) & "Stste:" & rs!State
Print #1, Space(50) & "Country:" & rs!country
Print #1, "-----------------------------------------------------------------------"
Print #1, Space(0) & "Transaction Id:" & qrs!transactionid
Print #1, ""
Print #1, Space(0) & "Account No:" & qrs!acc_no
Print #1, ""
Print #1, Space(0) & "NAME:" & txt 'srs!Name
Print #1, ""
Print #1, Space(0) & "Deposit Amount:" & Format(qrs!depositamount, "0.00")
Print #1, ""
Print #1, Space(0) & "Narration:" & qrs!narration
Print #1, ""
Print #1, Space(0) & "Mode:" & qrs!mode
Print #1, ""
Print #1, Space(0) & "Bank Name:" & qrs!bankname
Print #1, ""
Print #1, Space(0) & "Cheque No:" & qrs!chequeno
Print #1, ""
Print #1, Space(0) & "Date:" & qrs!Date
Print #1, ""
Print #1, Space(0) & "Balance After Transaction:" & Format(qrs!remaing_amt,
"0.00")
Print #1, ""
Print #1, "-----------------------------------------------------------------------"
Print #1, ""
Print #1, ""
Print #1, "Recived By:........................." & " " & "SIG:......................"
rs.MoveNext
Loop
Close #1
Shell App.Path & "\utilitys\wordpad.exe " & App.Path & "\report\deposit.txt",
vbMaximizedFocus
qrs.Close
rs.Close
End Sub

Das könnte Ihnen auch gefallen