Is it possible for a user to select a record from a datasheet in a subform, double click it, and write that specific record to another table? I have attempted to perform this task using DoCmd.DoMenuIte m commands and RunCommand acCmds but with no luck? Im currently building this system in VBA with MS Access 2003. Thus far I have only been able to copy the selected record to a the windows clipboard to be used in other text-based platforms, but I need to write this information to a temporary table for data-manipulation. The subform is running a query to filter information based on a combobox.
Any help will be greatly appreciated.
Any help will be greatly appreciated.
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 'This copies the information to the clipboard.
'These are methods I attempted to use - but ultimately do the same thing.
' 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
Comment