Solved

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

Posted on 2016-09-07
8
38 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 19

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 35

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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 35

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 19
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 19
ID: 41796137
you're welcome ~ happy to help
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
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…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

770 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