I have 15 fields setup with .mdb... the one that's giving me trouble is the "Notes" field. There are no extra characters and no spaces in the field names.
I'm having trouble adding the records. Here is the code:
I've got a jpg with the error. I would appreciate any help. Thanks!
I'm having trouble adding the records. Here is the code:
VB.NET:
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
Try
Dim com As New OleDbCommand
com.Connection = con
txtAccountNumber.Focus()
com.CommandText = "INSERT INTO Customers VALUES(" & txtAccountNumber.Text & _
",'" & txtMember.Text & "','" & txtSSN.Text & "','" & txtFirstName.Text & _
"','" & txtMI.Text & "','" & txtLastName.Text & "','" & txtAddress1.Text & _
"','" & txtAddress2.Text & "','" & txtCity.Text & "','" & cboState.Text & _
"','" & txtZip.Text & "','" & txtPhone.Text & "','" & txtCell.Text & _
"','" & txtFax.Text & "','" & txtEmail.Text & "'," & txtNotes.Text & ")"
com.ExecuteNonQuery()
MsgBox("Record Inserted!")
KS_FillComboBox1()
KS_Connect()
KS_ClearAll()
Catch exp As Exception
MsgBox(exp.ToString())
End Try
End Sub
I've got a jpg with the error. I would appreciate any help. Thanks!