T
Tony
I am receiving the following error:
Syntax error in query expression
reports_in_progress_current_xl[GLOBALDCCDATA].[GLOBAL_DCC_CODE]
when I am executing the following code:
For Each varItem In lst.ItemsSelected
'All information is present; write a record to the link table
lngID = lst.Column(0, varItem)
servID = Forms![ServiceOrderRegister]![ServiceOrderNumber]
MsgBox servID
strSQL = "INSERT INTO TblOrderSubSysLnk (ServiceNumLnk,SubsystemLnk)" _
& "SELECT [Service Order Register].ServiceOrderNumber, SubSystemID
FROM [Service Order Register], Subsystems WHERE [Service Order
Register].ServiceOrderNumber = " & servID & " AND SubSystemID = " & lngID &
";"
DoCmd.RunSQL strSQL
Next varItem
But the query itself is executed properly. What is wrong, how I can fix it
to stop this error from appearing.
Thanks for help.
Syntax error in query expression
reports_in_progress_current_xl[GLOBALDCCDATA].[GLOBAL_DCC_CODE]
when I am executing the following code:
For Each varItem In lst.ItemsSelected
'All information is present; write a record to the link table
lngID = lst.Column(0, varItem)
servID = Forms![ServiceOrderRegister]![ServiceOrderNumber]
MsgBox servID
strSQL = "INSERT INTO TblOrderSubSysLnk (ServiceNumLnk,SubsystemLnk)" _
& "SELECT [Service Order Register].ServiceOrderNumber, SubSystemID
FROM [Service Order Register], Subsystems WHERE [Service Order
Register].ServiceOrderNumber = " & servID & " AND SubSystemID = " & lngID &
";"
DoCmd.RunSQL strSQL
Next varItem
But the query itself is executed properly. What is wrong, how I can fix it
to stop this error from appearing.
Thanks for help.