DoCmd.RunSQL "INSERT INTO DB" & "(VT, xH, xN, Si, LT, Ont, Ser, Case, Comp, Survey_Date )" & _
"SELECT VT, xH, xN, Si, LT, SUM(Ont), Ser, Case, Comp, Date() " & _
"FROM raw_data" & _
"GROUP BY VT, xH, xN, Si, LT, Ser, Case, Comp" & _
"ORDER BY SUM(Ont) DESC;"
I tried to run this code but it gives an error