hi all
i'm trying to update a table with the values from another table. In SQL it works as in my example but it doen't like this in access.
it has to be in vba as the source table is dynamically created.
am i doing it wrong??
Thanks
i'm trying to update a table with the values from another table. In SQL it works as in my example but it doen't like this in access.
it has to be in vba as the source table is dynamically created.
Code:
sql = "update a " & _
"set a.Jan_FVol = b.Jan_FC, " & _
"a.Feb_FVol = b.Fec_FC, " & _
"a.Mar_FVol = b.Mar_FC, " & _
"a.Apr_FVol = b.Apr_FC, " & _
"a.May_FVol = b.May_FC, " & _
"a.Jun_FVol = b.Jun_FC, " & _
"a.Jul_FVol = b.Jul_FC, " & _
"a.Aug_FVol = b.Aug_FC, " & _
"a.Sep_FVol = b.Sep_FC, " & _
"a.Oct_FVol = b.Oct_FC, " & _
"a.Nov_FVol = b.Nov_FC, " & _
"a.Dec_FVol = b.Dec_FC " & _
"from CBF_master a " & _
"inner join " & tmpTbl & " b " & _
"on a.Year = b.dt_year " & _
"and a.Customer = b.Customer " & _
"and a.StockCode = b.StockCode"
am i doing it wrong??
Thanks