The Banking Transaction create in visual basic with coding and Form design
The write a program and Create a banking Transaction in V . B
The Banking Transaction procedure : -
- Step 1 : Start
- Step 2 : Go to the Sql and create a table.
- Step 3 : Then open the Visual Basic range.
- Step 4 : Create label ,Textbox and Command button etc.
- Step 5 : Write a coding required for Banking Transaction.
- Step 6 : Click on Project -> Component -> Microsoft ADB DATA control.
- Step 7 : Click on project -> Reference -> Microsoft of Library.
- Step 8 : Go to control panel -> Administrator tools -> ODBC .
- Step 9 : Table Connected .
- Step 10 : Output will display .
- Step 11 : End .
The Saving Bank Transaction coding :-
Bank Transaction MDIFORM FORM DESIGN : -
MDIFORM CODE
Private Sub mdino _ Click ()
MDIForm1 . Show
End Sub
Private Sub mdiReport _ Click ()
DataReport1 . Show
End Sub
Private Sub mdiTransaction _ Click ()
Form1 . Show
End Sub
Private Sub mdiyes _ Click ()
End
End Sub
Bank Transaction MDI FORM DESIGN : -
FORM 1 CODE : -
GENERAL
Dim con As New ADODB . Connection
Dim con As New ADODB . Recordset
FOR INSERT COMMAND BUTTON : -
Private Sub Command1 _ Click ()
rs .AddNew
rs !accountno = Val(Text1 . Text)
rs !customername = Trim(Text2 . Text)
rs !transdate = Cdate(Text3 . Text)
rs !transamount = Val(Text4 . Text)
IfOption1 . Value = True Then
rs !transtype = “ deposit ”
End If
IfOption2 . Value = True Then
rs !transtype = “ Withdraw ”
End If
rs !initiabalance = Val(Text5 . Text)
rs !actualbalance = Val(Text6 . Text)
rs . Update
MsgBox “ one record inserted ”
End Sub
FOR SEARCH COMMAND BUTTON : -
Private Sub Command2 _ Click ()
Dim rssearch As New ADODB . Recordset
Dim qry As String
Dim I As Integer
I=InputBox(“ Enter the accountno to search ”)
Qry=”select*From bank8015Where accountno=”&i
Rssearch.Open qry,con , adOpenStaic , adLockOptimistic
If rssarch.EOF then
MsgBox ” no such account number ”
Else
Text1 . Text = rssearch !accountno
Text1 . Text = rssearch ! customername
Text1 . Text = rssearch !transdate
Text1 . Text = rssearch !transamount
Text1 . Text = rssearch !initialbalance
Text1 . Text = rssearch !actualbalance
End IF
End Sub
FOR CLEAR COMMAND : -
Private sub Command3 _ Click()
Text1.Text = “ “
Text2.Text = “ “
Text3.Text = “ “
Text4.Text = “ “
Text5.Text = “ “
Text6.Text = “ “
Text1 .SetFocus
End Sub
FOR EXIT COMMAND : -
Private Sub Command4 _ Click()
MDIForm1 . Show
End Sub
FORM LOAD : -
Private Sub From _ Load()
Text3 . Text = Date
Text5 . Text = 500
Form1 . WindowState = 2
Con . open “dsn=shameer8015; uid=day; pwd=day1”
Rs.open“select*frombank8015”,con,adOpenDynamic,adLockOptimistic
MsgBox “ database connected ”
End Sub
FOR OPTION 1 BUTTON : -
Private Sub Option1 _ Click ()
IFOptional . Value = True Then
Text6 . Text = Val(Text4 . Text) + Val(Text5 . Text)
Text5 . Text = Val(Text6 . Text)
End IF
End Sub
FOR OPTION 2 BUTTON : -
Private Sub Option2 _ Click ()
IFOptiona2 . Value = True Then
Text6 . Text = Val(Text5 . Text) + Val(Text4 . Text)
Text5 . Text = Val(Text6 . Text)
End IF
End Sub
Bank Transaction FORM DESIGN : -
The Banking Transaction DATABASE CREATION : -
Create table bank8015 ( accountno numeric primarykey , customername varchar (20)
, transdate date , Transamount numeric , transtype varchar (20) , initialbalance numeric , actualbalance numeric )
The Banking Transaction REPORT : -
Account no : |
8015 |
Customer Name : |
Rahman |
Trans date : |
2020/02/10 |
Trans Amount : |
5000 |
Trans Type : |
deposit |
Initial balance : |
5500 |
Actual Balance : |
5500 |
No comments:
Post a Comment