Solved

ms access 2010 error 3825 on update query, regarding multi-value

Posted on 2016-09-07
8
44 Views
Last Modified: 2016-09-13
app updates fields (text,Y/N,Memo,dates) in table in db(a). When completed, db(a) deletes a single record in db(b) and runs an update query to insert the data in db(a) to identical fields in db(b). The error occurs on the "docmd.RUNSQL" line below. The error is: error 3825;
"SELECT * cannot be used in an insert into query when the source or destination contains a multi-valued field". I have not created any multi-valued fields that I know of, and don't know how to determine if a field is defined as multi-valued.

vba code:
db.Execute "DELETE * FROM tblJobSpec", dbFailOnError

' Append new data for this Job
JobSpecFileName = DB_Template_Path & "CAC_Field_Surveyor_JobData_Template.accdb"
strSQL = "INSERT INTO tblJobSpec IN '" & JobSpecFileName & "' SELECT tblJobSpec.* FROM tblJobSpec;"

DoCmd.SetWarnings False
DoCmd.RunSQL strSQL
DoCmd.SetWarnings True
...etc,,,
0
Comment
Question by:jsgould
  • 3
  • 3
  • 2
8 Comments
 
LVL 20

Assisted Solution

by:crystal (strive4peace) - Microsoft MVP, Access
crystal (strive4peace) - Microsoft MVP, Access earned 250 total points
ID: 41788395
is this a query? Even if it is an real table, it is best to qualify * -- Use
DELETE [tablename].* FROM [tablename]

Open in new window

also try CurrentDb.Execute instead of a macro action to run a query
with CurrentDb
   .Execute strSQL
   'do this right now
   DoEvents
   'refresh
   .TableDefs.Refresh
End With 'CurrentDb

Open in new window

0
 
LVL 36

Accepted Solution

by:
PatHartman earned 250 total points
ID: 41788537
Open each table in design view and examine each column to determine if it is a multi-value field.  If you don't find one, you may have in the past added one to test with and Access is retaining a memory of that field.  In that case, create two new tables from scratch and move over any existing data.  Then rename the original tables and give the replacement tables the names of the originals and try again.
0
 

Author Comment

by:jsgould
ID: 41788555
Pathartman:
how do I tell if its a multi-value field?
0
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

 
LVL 36

Expert Comment

by:PatHartman
ID: 41788593
You have to click on the Lookup tab for each field.MultiValue.JPG  Or if it is easier, use the database documenter on the Database Tools tab and print a report that documents all the properties for each table.
0
 
LVL 20
ID: 41788608
adding on:
The free Analyzer for Microsoft Access can also tell you where multi-value fields are .. as well as fields that have RowSource defined in each table (Lookup Fields report)

free Analyzer for Microsoft Access on CodePlex
http://Analyzer.CodePlex.com
Document Access databases.  Reports to show list of tables, data dictionary, form and control properties, and more.
0
 

Author Comment

by:jsgould
ID: 41789638
Thanks for the quick responses. Turns out the error is misleading. The problem is the 2 tables involved in the Insert query are not exact duplicates in field order and the insert * is trying to insert memo into text or vice versa.
0
 

Author Closing Comment

by:jsgould
ID: 41796042
Thank you
0
 
LVL 20
ID: 41796137
you're welcome ~ happy to help
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question