R
Rafi
I have the following VBA code that is supposed to insert values into a table
based on a select statement and a variable. lngID is a variable that is
being defined earlier in the coe.
What am I doing wrong here? Thanks in advance for your help
stSQL = "INSERT INTO tblProjectData ( Error, SKU, DESC, MVMT, UOM, HEIGHT,
WIDTH," _
& " LENGTH, WEIGHT, AVG_UOH, AVG_UC, LEAD_TIME, ProectID )" _
& " SELECT Temp2.Error, Temp2.sku, Temp2.desc, temp2.mvmt,
Temp2.uom," _
& " Temp2.height, Temp2.width, Temp2.length, Temp2.weight," _
& " Temp2.[avg uoh], Temp2.[avg uc], Temp2.[lead time]," & lngID _
& " FROM Temp2;"
based on a select statement and a variable. lngID is a variable that is
being defined earlier in the coe.
What am I doing wrong here? Thanks in advance for your help
stSQL = "INSERT INTO tblProjectData ( Error, SKU, DESC, MVMT, UOM, HEIGHT,
WIDTH," _
& " LENGTH, WEIGHT, AVG_UOH, AVG_UC, LEAD_TIME, ProectID )" _
& " SELECT Temp2.Error, Temp2.sku, Temp2.desc, temp2.mvmt,
Temp2.uom," _
& " Temp2.height, Temp2.width, Temp2.length, Temp2.weight," _
& " Temp2.[avg uoh], Temp2.[avg uc], Temp2.[lead time]," & lngID _
& " FROM Temp2;"