I'm getting syntax error in the following SQL Insert Into statement.
Its a routine to copy over a set of records from a form into another table (tblAddresses). I hate SQL !!!!!, can any of you guys assist?
Code: Select all
If Me.RecordsetClone.RecordCount > 0 Then
strSql = "INSERT INTO [tblAddresses] (CustomerID, Company, Last Name, First Name, E-mail Address, Job Title, Business Phone, Home Phone, Mobile Phone, Fax Number, Address, City, County, Postal Code, Notes) " & _
"SELECT CustomerID, Company, Last Name, First Name, E-mail Address, Job Title, Business Phone, Home Phone, Mobile Phone, Fax Number, Address, City, County, Postal Code, Notes" & _
"FROM [tblCustomers] WHERE CustomerID = " & Me.CustomerID & ";"
CurrentDb.Execute strSql, dbFailOnError
End If