You've not given us enough information, please post all the VBA code. Is the VBA line above the one being highlighted when the error flags?
Also, how did you get the SQL that you posted above? Did you Debug.Print your VBA? or are you just assuming that's the SQL that the VBA is creating?