A
AkAlan via AccessMonster.com
I am getting a syntax error "Line 1 incorrect syntax near ' = ' " when I
run the following:
strSQL = "APPEND tblEarByStatus SET RedHours = " & sngRedTime _
& ", Status = " & intCurEc _
& ", ParcTag = '" & strCurEquip & "'"
With cmd
.ActiveConnection = CurrentProject.Connection
.CommandText = strSQL
.CommandType = adCmdText
.Execute
End With
Here is what is in strSql :
"APPEND tblEarByStatus SET RedHours = 126.5, Status = 10, ParcTag = '00176'"
This looks like it should work but it doesn't. The variable types are as
follows :
sngRedTime is single
intCurEc is integer
strCurEquip is string.
Is it obvious what I'm doing wrong?
I'm new to project and SQl Server and I get my ass kicked by syntax errors
every time I try something different. Does anyone know where I can find a
good reference for how to correctly write SQL statements.
Thanks for any help.
run the following:
strSQL = "APPEND tblEarByStatus SET RedHours = " & sngRedTime _
& ", Status = " & intCurEc _
& ", ParcTag = '" & strCurEquip & "'"
With cmd
.ActiveConnection = CurrentProject.Connection
.CommandText = strSQL
.CommandType = adCmdText
.Execute
End With
Here is what is in strSql :
"APPEND tblEarByStatus SET RedHours = 126.5, Status = 10, ParcTag = '00176'"
This looks like it should work but it doesn't. The variable types are as
follows :
sngRedTime is single
intCurEc is integer
strCurEquip is string.
Is it obvious what I'm doing wrong?
I'm new to project and SQl Server and I get my ass kicked by syntax errors
every time I try something different. Does anyone know where I can find a
good reference for how to correctly write SQL statements.
Thanks for any help.