Run-time error '2046': the command or action 'Paste' isn't available now:

I am using a Front end Access and a back end in SQL. I am running the front end from the network from users with Access 2010 and Access 2013. Everything seems to work perfectly but there are some computer where the command 'Paste' does not work from VBA command. Manually, everything is perfect. By VBA command, I am receiving this message but when I continue by clicking on 'Debug', I have the command "DoCmd.RunCommand acCmdPaste" in Yellow. When, I continue to click on "run", the command is executed.

I tried many command for copy and paste but I still have the same problems. I checked on the libraries but everything is normal, I did compact and repair, but nothing change.

this problem is on two machines one running Access 2010 and another one running Access 2013.

In working on some forms and queries, I was using both Access 2010 or Access 2013.

Is anyone experienced the same problems!

Thanks.
ndikufelixAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gustav BrockCIOCommented:
Try inserting a DoEvents before your command and/or force a SetFocus:

    DoEvents
    Me!TextboxToPasteInto.SetFocus
    DoCmd.RunCommand acCmdPaste

/gustav
ndikufelixAuthor Commented:
Thank you Gustav, this maybe helpful when copying in one field. I am copying selected records from one query to another table with the same specifications. This is the instructions I am using:

DoCmd.OpenQuery "Timesheets2 query1", acViewNormal, acEdit
DoCmd.RunCommand acCmdSelectAllRecords
DoCmd.RunCommand acCmdCopy

DoCmd.OpenTable "Timesheets1", acViewNormal
DoCmd.GoToRecord acDataTable, "timesheets1", acNewRec
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdPaste

....

any help?
Gustav BrockCIOCommented:
Try this sequence:

 DoCmd.OpenTable "Timesheets1", acViewNormal
 DoCmd.GoToRecord acDataTable, "timesheets1", acNewRec

 DoCmd.OpenQuery "Timesheets2 query1", acViewNormal, acEdit
 DoCmd.RunCommand acCmdSelectAllRecords
 DoCmd.RunCommand acCmdCopy

 DoCmd.SelectObject acTable, "Timesheets1"
 DoCmd.RunCommand acCmdSelectRecord
 DoCmd.RunCommand acCmdPaste

/gustav
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

ndikufelixAuthor Commented:
I tried to use also this

DoCmd.OpenTable "Timesheets1", acViewNormal
 DoCmd.RunCommand acCmdPasteAppend
.....
with the same message.

I created a form for this table for using:

DoCmd.Openform "Timesheets1", , , , , acWindowNormal
 DoCmd.GoToRecord acDataForm, "timesheets1", acNewRec
 DoCmd.RunCommand acCmdSelectRecord
 DoCmd.RunCommand acCmdPaste

with the same error.
ndikufelixAuthor Commented:
With the new sequence, I still have the same error message. As I said, this is not working only for some computers but the sequence is working for the most of computers.

thanks. Any way of doing?
Gustav BrockCIOCommented:
Why not just run a query:

DoCmd.RunSQL "INSERT INTO Timesheets1 SELECT * FROM [Timesheets2 query1];"

/gustav

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ndikufelixAuthor Commented:
thanks. It is working perfectly.
Gustav BrockCIOCommented:
You are welcome!

/gustav
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.