Access2003 in XP
If I open a form to a specific record and click on a command button
with the following code I get a duplcate record:
DoCmd.RunComman d acCmdSelectReco rd
DoCmd.RunComman d acCmdSaveRecord
DoCmd.RunComman d acCmdCopy
DoCmd.RunComman d acCmdPasteAppen d
OR
DoCmd.DoMenuIte m acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuIte m acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuIte m acFormBar, acEditMenu, 5, , acMenuVer70 'Paste
Append
But if I try to run this from and event such as OnLoad, OnCurrent or
OnTimer I get an error message.
"The command or action 'Copy' isn't available now."
I know going in that I what a duplicate record so is there a fix for
this?
Thanks, Rick
If I open a form to a specific record and click on a command button
with the following code I get a duplcate record:
DoCmd.RunComman d acCmdSelectReco rd
DoCmd.RunComman d acCmdSaveRecord
DoCmd.RunComman d acCmdCopy
DoCmd.RunComman d acCmdPasteAppen d
OR
DoCmd.DoMenuIte m acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuIte m acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuIte m acFormBar, acEditMenu, 5, , acMenuVer70 'Paste
Append
But if I try to run this from and event such as OnLoad, OnCurrent or
OnTimer I get an error message.
"The command or action 'Copy' isn't available now."
I know going in that I what a duplicate record so is there a fix for
this?
Thanks, Rick
Comment