Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

it works in accessing the pin but in the form3 there is an error occurred when i press the button in selecting

the balance inquiry saying that Data type mismatch in criteria expression. that falls in the cmd.ExecuteNonQuery() . do i need to remove that cmd.ExecuteNonQue ry()? Imports System.Data.OleDb Public Class Form3 Dim conn As OleDbConnection Dim cmd As OleDbCommand Dim StrSQL As String Dim dr As OleDbDataReader Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load conn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source= DataDi rectory \Database1.mdb") conn.Open() Button15.Enabled = False Button16.Enabled = False Button14.Enabled = False End Sub Private Sub enter_Click(ByVal sender As System.Object, ByVal e As System.EventAr gs) Handles accept3.Click Form4.Visible = True Me.Visible = False End Sub Private Sub balancebtn_Click(ByVal sender As System.Object, ByVal e As System.Ev entArgs) Handles balancebtn.Click StrSQL = "UPDATE ATM SET Balance_Inquiry ='" & Form4.balance.Text & "'" cmd = New OleDbCommand(StrSQL, conn) cmd.ExecuteNonQuery() Me.Hide() Form4.Show() End Sub Private Sub cancel_Click(ByVal sender As System.Object, ByVal e As System.EventA rgs) Handles cancel3.Click Me.Hide() Form1.Show() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Event Args) Handles Button1.Click Me.Hide() Form5.Show() End Sub End Class

You might also like