Update statement

reysy28

New member
Local time
Today, 19:43
Joined
Nov 9, 2014
Messages
9
Hello guys,

What seems to be the syntax error on this command.... It says Syntax error in strSql = ........

Private Sub Command6_Click()

Dim cn As ADODB.Connection

'Purpose: Create a new query using ADO.
Dim strSql As String
Set cn = CurrentProject.Connection

strSql = "Update into EnglishAppAnswers( AppAnswer ) VALUES( CStr(Form_SubForm_exam.Ans1.Value) );"
cn.Execute strSql

DoCmd.GoToRecord , , acNext

End Sub


Thanks.....
 
Hello guys,

What seems to be the syntax error on this command.... It says Syntax error in strSql = ........
It is the "Update into".
You can insert data with "Insert into", but not "Update into"! :D
 

Users who are viewing this thread

Back
Top Bottom