I've been looking for an answer but I can't understand them since I'm noob on visual basic (I haven't been taught how to use it in school, I just search on the net to learn).
Here is my problem: Syntax error (missing operator) in query expression 'pinN='.
Dim con As New OleDbConnection("PROVIDER = Microsoft.ACE.OLEDB.12.0;Data Source = C:\Users\Billy Otsuka\Desktop\VB Fiiles\Prototype-Prototype\Sample.accdb")
Dim cmd As OleDb.OleDbCommand = New OleDbCommand("SELECT * FROM [Table3] WHERE pinN= " & TextBox1.Text & "", con)
con.Open()
Dim sdr As OleDbDataReader = cmd.ExecuteReader()
If (sdr.Read() = True) Then
adminLogin.Show()
Me.Hide()
Else
MsgBox("Invalid pin")
End If
The highlighted word is sdr As OleDbDataReader = cmd.ExecuteReader()
In this code I want to enter a 4 number pin and if its correct I can go to the next form but if its wrong it will not. I'm using an access database.
I really appreciate if anyone can tell me what's wrong since i don't have any idea what the error is.