G
G Lam
I got syntax error for the following codes in the Click_Ok event:
DoCmd.RunSQL "INSERT INTO tblEdPartHis (EdHisOrdNbr , EdHisOldPnbr,
EdHisNewPnbr)" & _
"values( Ordnbr, " & Vvold & ", PartNbr ) "
The error msg: Syntax error (missing operator in query expression 'UC-1034
Old' )
I think it refer to the Vvold variable.
Ordnbr and PartNbr are two fields in the current form, while the Vvold is a
variable that has old PartNbr value. When I place the cursor on each of them
in the debug window, all of them shown the right value. But I got this
error.
I tried to assign all three values in variables, but got the same error.
Any idea?
Thank you
Gary
DoCmd.RunSQL "INSERT INTO tblEdPartHis (EdHisOrdNbr , EdHisOldPnbr,
EdHisNewPnbr)" & _
"values( Ordnbr, " & Vvold & ", PartNbr ) "
The error msg: Syntax error (missing operator in query expression 'UC-1034
Old' )
I think it refer to the Vvold variable.
Ordnbr and PartNbr are two fields in the current form, while the Vvold is a
variable that has old PartNbr value. When I place the cursor on each of them
in the debug window, all of them shown the right value. But I got this
error.
I tried to assign all three values in variables, but got the same error.
Any idea?
Thank you
Gary