How to copy a selected record from a subform datasheet and write it to a table?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Marshal Barrett

    How to copy a selected record from a subform datasheet and write it to a table?

    Can a table be specified in the PasteAppend EditMenu option?
    This is the sub im trying to build.
    Attempting with RunCommands now but no luck.
    Thanks in advance

    Code:
    Private Sub Form_DblClick(Cancel As Integer)
    If MsgBox("Are you sure you want to activate this part?", vbYesNo) = vbYes Then
        RunCommand acCmdSelectRecord
        RunCommand acCmdCopy
        
    '    DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
    '    DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
    '    DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70
        
    Else
        Exit Sub
    End If
    End Sub
Working...