J
jpb
I am trying to run an append query using variable tables. Dependant upon
other fields, AppropriateTable is modified to be the title of a prexisiting
table name in order to add the data from DataTable. I am getting a Type
Mismatch Error #13 on the below code. Can anyone see why? I am at a loss.
I have built the query using the design viewer - and it runs correctly - but
the SQL code that it generates does not translate dirrectly.
Thanks.
jpb
DoCmd.RunSQL "INSERT INTO " & AppropriateTable(Field1, Field2, Field3) _
& " SELECT DataTable.Field1, DataTable.Field2,
DataTable.Field3" _
& " FROM DataTable"
other fields, AppropriateTable is modified to be the title of a prexisiting
table name in order to add the data from DataTable. I am getting a Type
Mismatch Error #13 on the below code. Can anyone see why? I am at a loss.
I have built the query using the design viewer - and it runs correctly - but
the SQL code that it generates does not translate dirrectly.
Thanks.
jpb
DoCmd.RunSQL "INSERT INTO " & AppropriateTable(Field1, Field2, Field3) _
& " SELECT DataTable.Field1, DataTable.Field2,
DataTable.Field3" _
& " FROM DataTable"