*help me with this code i cant withdraw.
*the balance inquiry didnt appear in the form4
*in my database, do i need to put the withdraw field?
<form 6>
Imports System.Data.OleDb
Public Class Form6
Dim conn As OleDbConnection
Dim cmd As OleDbCommand
Dim strSQL As String
Dim dr As OleDbDataReader
Private Sub Form6_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
conn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\Database1.mdb")
conn.Open()
End Sub
Private Sub enter6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles accept6.Click
strSQL = "UPDATE ATM SET Balance_Inquiry = '" & Val(TextBox1.Text) - Val(Form4.balance.Text) & "' WHERE Balance_Inquiry = '" & Form4.balance.Text & "'"
If TextBox1.Text > Form4.balance.Text Then
MsgBox("Your Balance is insufficient to withdraw")
TextBox1.Text = ""
TextBox1.Focus()
ElseIf TextBox1.Text < Form4.balance.Text Then
Form4.balance.Text = Form4.balance.Text - TextBox1.Text
Me.Hide()
Form8.Timer1.Enabled = True
Form7.Show()
End If
cmd = New OleDbCommand(strSQL, conn)
End Sub
Private Sub cancel6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cancel6.Click
Me.Hide()
Form10.Show()
Form1.pinenter.Text = ""
End Sub
Private Sub clear6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles clear6.Click
TextBox1.Text = ""
TextBox1.Focus()
End Sub