J
Jason M Canady
Hi, I am recieving the following error with the sql that I am trying to use
to add records to a datatable.
Run-Time Error '3134'
Syntax Error in INSERT INTO Statement
The code as it is written right now is:
sSQL = "INSERT INTO WOEquipment(WorkOrderID,EquipmentID) " & "SELECT " &
UniqueID & " As NewWorkOrderID, WOEquipment.EquipmentID, " & "FROM
WorkOrders INNER JOIN WOEquipment ON WorkOrders.KeyField =
WOEquipment.WorkOrderID" & "WHERE (((WOEquipment.WorkOrderID) = " &
Me.KeyField & "));"
I have tried various other tweaks, the only other major chage was:
sSQL = "INSERT INTO WOEquipment(WorkOrderID,EquipmentID) " & "SELECT " &
UniqueID & " As NewWorkOrderID, WOEquipment.EquipmentID, " & "FROM
WOEquipment " & "WHERE (((WOEquipment.WorkOrderID) = " & Me.KeyField &
"));"
(Note, no INNER JOIN statement...) I am not real sure where to go from
here, any assistance would be very helpful. Thanks in advance
Jason
to add records to a datatable.
Run-Time Error '3134'
Syntax Error in INSERT INTO Statement
The code as it is written right now is:
sSQL = "INSERT INTO WOEquipment(WorkOrderID,EquipmentID) " & "SELECT " &
UniqueID & " As NewWorkOrderID, WOEquipment.EquipmentID, " & "FROM
WorkOrders INNER JOIN WOEquipment ON WorkOrders.KeyField =
WOEquipment.WorkOrderID" & "WHERE (((WOEquipment.WorkOrderID) = " &
Me.KeyField & "));"
I have tried various other tweaks, the only other major chage was:
sSQL = "INSERT INTO WOEquipment(WorkOrderID,EquipmentID) " & "SELECT " &
UniqueID & " As NewWorkOrderID, WOEquipment.EquipmentID, " & "FROM
WOEquipment " & "WHERE (((WOEquipment.WorkOrderID) = " & Me.KeyField &
"));"
(Note, no INNER JOIN statement...) I am not real sure where to go from
here, any assistance would be very helpful. Thanks in advance
Jason