Professional Documents
Culture Documents
Online Banking
Online Banking
cust :
Form Design :
Welcome :
Main :
New User :
Choice :
Deposit :
Withdraw :
Balance Enquiry :
Account Status :
Change Password :
Money Transfer :
Thank You :
Coding :
Module :
Main :
New User :
Admin :
Choice :
Deposit :
Withdraw :
Private Sub cmdGC_Click()
Dim bal As Double
If (txtWA = "") Then
MsgBox "Enter the amount to be Withdrawn", vbExclamation, "ATM"
GoTo g
End If
rs.MoveFirst
While (rs.EOF = False)
If (rs!AccNo = Main.txtAN) Then
If ((Val(rs!Balance) - Val(txtWA)) > 0) Then
bal = Val(rs!Balance) - Val(txtWA)
rsTemp.Open "Update cust set balance='" & bal & "' where AccNo='" &
rs!AccNo & "'", db, adOpenKeyset, adLockOptimistic
MsgBox "The Amount have been Withdrawn", vbInformation, "ATM"
Me.Hide
Thanks.Show
GoTo g
ElseIf ((Val(rs!Balance) - Val(txtWA)) < 0) Then
MsgBox "The Amount you are trying to withdraw is greater then your
balance", vbInformation, "ATM"
txtWA = ""
txtWA.SetFocus
GoTo g
ElseIf ((Val(rs!Balance) - Val(txtWA)) = 0) Then
bal = Val(rs!Balance) - Val(txtWA)
rsTemp.Open "Update cust set balance='" & bal & "' where AccNo='" &
rs!AccNo & "'", db, adOpenKeyset, adLockOptimistic
MsgBox "You have zero Balance", vbInformation, "ATM"
Me.Hide
Thanks.Show
GoTo g
End If
Else
rs.MoveNext
End If
Wend
g: End Sub
Balance Enquiry :
Account Status :
Change Password :
Money Transfer :
Output :
Welcome :
Login :
Choice :
Deposit :
Withdraw :
Balance :
Administrator :
User Details :
Change Password :
Money Transfer :
Account Type :
Thank You :