Results 1 to 4 of 4
  1. #1
    Dave_D's Avatar
    Dave_D is offline Advanced Beginner
    Windows XP Access 2010 64bit
    Join Date
    Aug 2015
    Posts
    67

    Post Updating a MVF from a query

    I'm trying to update a multi-valued field (attachments) using the following SQL but I'm getting the following error:
    An UPDATE or DELETE query cannot contain a multi-valued field. 3826

    If Me.LstAttachment.ListCount > 0 Then
    For I = 0 to Me!LstAttachment.ListCount -1
    Attch = Me.LstAttachment.ItemData(I)


    sSql = "UPDATE tbl_IssueLst " _
    & "Set ShareDoc = ' " & Attch & " ' " _
    & "Where ID = " & Me!ID
    next I
    End If

    What are my alternatives of getting this MVF updated?

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    While I strongly suggest NOT using MVFs (they are not supported by other database programs like SQL and Oracle), see if this helps: https://support.office.com/en-us/art...624e1e323a#bm8

  3. #3
    Dave_D's Avatar
    Dave_D is offline Advanced Beginner
    Windows XP Access 2010 64bit
    Join Date
    Aug 2015
    Posts
    67
    I absolutely agree with you of not using MVFs fields, but the end user insist upon it. I've seen this link before and what I'm trying now is this, just to see if I can get a record inserted into this MVF field:

    INSERT into tbl_IssueList [ShareDoc.FileName]
    Values ("Legal Name in Document.msg")
    Where ID = 292

    but I receive the following:

    Click image for larger version. 

Name:	Append.jpg 
Views:	15 
Size:	64.4 KB 
ID:	35185

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    AFAIK, Attachment field requires VBA manipulating recordset objects to programmatically insert/delete/replace file. Topic has been asked and answered many times http://www.fmsinc.com/microsoftacces...mentFields.htm

    Saving files in db can quickly use up Access 2gb file size limit.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. updating using a query
    By angie in forum Access
    Replies: 3
    Last Post: 04-03-2018, 04:57 PM
  2. Replies: 3
    Last Post: 05-13-2016, 01:15 AM
  3. Updating form after updating and closing a popup window
    By Historypaul in forum Programming
    Replies: 2
    Last Post: 04-21-2014, 02:13 AM
  4. Updating a query
    By bailey537 in forum Programming
    Replies: 1
    Last Post: 07-16-2009, 10:30 AM
  5. Query not updating
    By timbim in forum Queries
    Replies: 0
    Last Post: 11-16-2008, 09:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums