Hello,
I am trying to merge table1 with table2, but only when the "section" column has a certain value. The statement worked fine until I added the last WHERE clause. I get the error "Too Few Parameters. Expected 1."
The error explanation on the Microsoft website says, "you refer to a column in a table that does not exist."
I checked, and the column name is correct ("section").
I should also note that the tables have an AutoNumber field and an ID field... does that make a difference?
Any suggestions?
Thanks, (-:
Brian
I am trying to merge table1 with table2, but only when the "section" column has a certain value. The statement worked fine until I added the last WHERE clause. I get the error "Too Few Parameters. Expected 1."
The error explanation on the Microsoft website says, "you refer to a column in a table that does not exist."
I checked, and the column name is correct ("section").
I should also note that the tables have an AutoNumber field and an ID field... does that make a difference?
Any suggestions?
Code:
For dist = 1 To 28
If checkMerge(dist).Value = 1 Then
strsql$ = "INSERT INTO table1 SELECT table2.* FROM table2 WHERE section = " & namearray(dist) & ";"
db.Execute strsql$
End If
Next dist
Thanks, (-:
Brian