Syntax error in this append query. What is it?
I am trying to append data from the query into the table where the value on function field in the query is equal to the word ADD
mafhobb
Code:
Dim DataToAdd As String
DataToAdd = "INSERT INTO Address " & _
"customerId, addressNr, addressType, firstname, lastname, companyName, postalcode, country, workphone, email, notes, streetaddress, city, contactTypeId " & _
"SELECT customerId, addressNr, addressType, firstname, lastname, companyName, postalcode, country, workphone, email, notes, streetaddress, city, contactTypeId " & _
"FROM Customer WHERE ((Customer.function)=ADD);"
Debug.Print DataToAdd
CurrentDb.Execute DataToAdd, dbFailOnError
I am trying to append data from the query into the table where the value on function field in the query is equal to the word ADD
mafhobb