So here is what I got going on. I have recently revamped some code I had wrote previously for my company's computer inventory system. I have gotten adventurous and used Access 2007 because it seems to play nicer than 2003. Anyway, I have run into this issue with the Insert command saying that something about my syntax is not correct. Here is a snippet of what the code looks like.
CODE
Dim conn As New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Documents and Settings\mike.mcgillivry\My Documents\mine1.accdb")
conn.Open()
'####################################################################
Dim addUser As String = "INSERT INTO Computer (ComputerS/N, Brand, User) VALUES (" + txtName2.Text + "','" + txtName5.Text + "','" + txtName1.Text + "')"
Dim cmd As OleDbCommand = New OleDbCommand(addUser, conn)
cmd.ExecuteNonQuery()
MsgBox("User added successfully")
'####################################################################
conn.Close()
Do note that I have many more fields that I "could" enter into this type of a command but I am starting small to avoid any other oddities. Other general notes would be that "Computer" is the name of the table (there are many more included in the database used) and txtName5.txt and Name1.text are just plain text boxes that users can enter data in.
I realize that these ODBC commands can be a real bear to deal with all the " 's so any help would be greatly appreciated and more code can be presented if necessary.