You are getting such type of problem because you haven't declared Field name in your SQL statement. In this case you have to declared Field name in your SQL statement to fix this problem. I have written following SQL query using Field name, just try to use this query in your code to fix this problem.
Code:
sql = "insert into table1values (Field1, Field2, Field3, ...) Values ("& ids &"," &_
"" & active & "," &_
"null," &_
"'" & 1stName & "'," &_
"'" & 2ndName & "'," &_
"'" & 3rdname & "'," &_
etc...
Bookmarks