P
plh
Hello Gurus,
Here is my routine:
Private Sub cmdAddPNum_Click()
Dim strSQL As String
Dim strPNum As String
strPNum = Me.ProblemNumber.Value
strSQL = "UPDATE Items SET Items.[Problem Number] = " & "" & strPNum &
"" & _
" WHERE (((Items.[Audit Serial Number])=" &
Me.Audit_Serial_Number.Value & "));"
Debug.Print strSQL
DoCmd.RunSQL (strSQL)
End Sub
In the Immediate window strSQL shows as
UPDATE Items SET Items.[Problem Number] = 774QM-1-2.2 WHERE (((Items.
[Audit Serial Number])=774));
and DoCmd returns error message:
#3075 Syntax error (missing operator) in query expression
'774QM-1-2.2'.
The double quotes between the two ampersands were my latest effort to
get it to put 774QM-1-2.2 into quotation marks so that it would stop
trying to parse it as an expression, but that did not work either.
What to do?
Thank You,
-plh
Here is my routine:
Private Sub cmdAddPNum_Click()
Dim strSQL As String
Dim strPNum As String
strPNum = Me.ProblemNumber.Value
strSQL = "UPDATE Items SET Items.[Problem Number] = " & "" & strPNum &
"" & _
" WHERE (((Items.[Audit Serial Number])=" &
Me.Audit_Serial_Number.Value & "));"
Debug.Print strSQL
DoCmd.RunSQL (strSQL)
End Sub
In the Immediate window strSQL shows as
UPDATE Items SET Items.[Problem Number] = 774QM-1-2.2 WHERE (((Items.
[Audit Serial Number])=774));
and DoCmd returns error message:
#3075 Syntax error (missing operator) in query expression
'774QM-1-2.2'.
The double quotes between the two ampersands were my latest effort to
get it to put 774QM-1-2.2 into quotation marks so that it would stop
trying to parse it as an expression, but that did not work either.
What to do?
Thank You,
-plh