Just Trying Simple in Access 2007 (Windows 7)
Hello, I am just trying to do a simple Access database to see a productivity boost at work hopefully. I cannot get this code here to work as I get an error message that says:
Run-Time error '3134'
Sytax Error in INSERT INTO statement
using this code...
Private Sub btnAdd_Click()
Dim stra As String
Dim strSQL1 As String
stra = [txtTest].Value
strSQL1 = " (INSERT INTO tblTest VALUES (' " & stra & " ') "
DoCmd.RunSQL strSQL1
End Sub
I'm just trying to save a string into a table.
The exact same code worked prior to windows 7 conversion. I cannot get an INSERT statement to work so I set up a test table with a single text insert. I get integers and booleans to work.
And I'm sorry if this is a super basic question.
Last edited by wonesor; January 15th, 2011 at 01:20 AM..
|