Results 1 to 5 of 5
  1. #1
    lacigol is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    14

    Missing Field data on paste append

    So, I've noticed when we use a duplicate record command button, the new duplicate record is missing one specific field [Marker Lights] data .

    Any suggestions on how this could happen?

    Duplicate Record command button does the following:
    Code:
    Private Sub cmdDup_Click()
    On Error GoTo Err_cmdDup_Click
    
    
        DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 'acCmdSelectRecord
        DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70 'acCmdCopy
        DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append
        Model = Model & " DUP"
        DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 'acCmdSaveRecord
        Combo109 = Null
        Model.SetFocus
        
    Exit_cmdDup_Click:
        Exit Sub
    
    
    Err_cmdDup_Click:
        MsgBox Err.Description
        Resume Exit_cmdDup_Click
        
    End Sub


  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    dont copy/paste,
    instead use an append query and you can see all the fields.

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,900
    Why are you using DoMenuItem instead of RunCommand?

    Is [Marker Lights] a multi-value field? Multi-value fields require special handling with VBA using parent and child recordset objects to copy data to another record.
    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.

  4. #4
    lacigol is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2017
    Posts
    14
    Quote Originally Posted by June7 View Post
    Why are you using DoMenuItem instead of RunCommand?

    Is [Marker Lights] a multi-value field? Multi-value fields require special handling with VBA using parent and child recordset objects to copy data to another record.
    I'm coming behind someone else. I prefer sql, dao.recordsets, and docmd, but more so, I prefer limiting what I change/redo. This code is probably from Access97 days, but I'm mostly curious why it doesn't work properly now.

    .[Marker Lights] is a size 50 short text field.

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,900
    So it is not set up to be multi-value? If field is set up in table as a combobox or listbox allowing multiple values, then it is a multi-value field. That's the only reason I can think of why it would not copy/paste.
    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. Replies: 7
    Last Post: 06-15-2017, 10:48 AM
  2. Replies: 3
    Last Post: 07-07-2016, 08:13 AM
  3. Replies: 1
    Last Post: 07-05-2015, 11:11 PM
  4. Replies: 3
    Last Post: 03-19-2015, 02:11 PM
  5. Paste Append not working
    By martinshort in forum Access
    Replies: 3
    Last Post: 01-20-2012, 07:45 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