Papa_Bear1
Member
- Local time
- Yesterday, 19:54
- Joined
- Feb 28, 2020
- Messages
- 134
So, I'm getting an error 3825 from Access while running an INSERT INTO query, and the error says "SELECT * cannot be used in an INSERT INTO query when the source or destination table contains a multi-valued field."
This is quite strange since neither table has any multi-valued fields.
I found one other thread on this where someone apparently saw this, and wondered if there was some ghost attribute of the table that was making Access think there was an MV field when there wasn't, but I've seen no fixes or comments on how to resolve it. In fact, in this case, I'm fairly certain that the tables involved NEVER had an MV field, so it is quite puzzling.
Any suggestions on how to perhaps 'clean' the tables to ensure Access doesn't think this?
I intend to try to list the fields next, rather than using the *, but that is a pain - not to mention just slows things down.
The code that constructs the SQL is as follows:
In case it helps any to describe the purpose - it is trying to simply copy some data from a local table, to a table in an external Access DB. In this case, the strSource variable refers to a SELECT query (so that I can limit the output rows to the current record basically.) So, it ends up looking something like "INSERT INTO [C:\BLAHBLAH\BLAH.accdb].
SELECT X.* FROM qryGetAnalysisData AS X.
Thanks for any insight!
This is quite strange since neither table has any multi-valued fields.
I found one other thread on this where someone apparently saw this, and wondered if there was some ghost attribute of the table that was making Access think there was an MV field when there wasn't, but I've seen no fixes or comments on how to resolve it. In fact, in this case, I'm fairly certain that the tables involved NEVER had an MV field, so it is quite puzzling.
Any suggestions on how to perhaps 'clean' the tables to ensure Access doesn't think this?
I intend to try to list the fields next, rather than using the *, but that is a pain - not to mention just slows things down.
The code that constructs the SQL is as follows:
Code:
strSQL = "INSERT INTO [" & strOutPath & strOutFile & "].[" & strOutTableName & "] " _
& "SELECT X.* FROM " & strSource & " AS X"
In case it helps any to describe the purpose - it is trying to simply copy some data from a local table, to a table in an external Access DB. In this case, the strSource variable refers to a SELECT query (so that I can limit the output rows to the current record basically.) So, it ends up looking something like "INSERT INTO [C:\BLAHBLAH\BLAH.accdb].
Thanks for any insight!