Solved

Command or Action 'Paste' isn't available

Posted on 2006-07-20
5
517 Views
Last Modified: 2006-11-18
I'm using Access 2003.  On a form I have a button to allow the user to copy all the fields in the current record into the next record in the dataset.  I tested the button in a copy  of the DB yesterday and it worked fine. Today, I can't get it to work in either the copy or the live DB.  The error message is:

Command or Action 'Paste' isn't available

The code is the standard button click stuff . If I use the mouse and click the Edit Menu "select record" "copy" goto next "select record" "paste" it works without an error.  It's only when I try to run it as code that the error occurs.  I have tried the DoMenuItem method and also get the same error.  The form is set to allow edits.  VB has the DAO 3.6 Library reference checked.

The user occasionally has to copy 30 plus records at a time.  Each record is an individual Sign which, while identical, must be numbered, inventoried and located. Once this is working I will try to nest it in a FOR NEXT loop so they can simply enter a number and have the routine execute that many times.
----------------------------------------
Private Sub copynext_Click()
On Error GoTo Err_copynext_Click

               RunCommand acCmdSelectRecord
               RunCommand acCmdCopy
               RunCommand acCmdRecordsGoToNext
               RunCommand acCmdSelectRecord
               RunCommand acCmdPaste

Exit_copynext_Click:
    Exit Sub

Err_copynext_Click:
    MsgBox Err.Description
    Resume Exit_copynext_Click
   
End Sub

--------------------------------------
0
Comment
Question by:Quig653
  • 3
  • 2
5 Comments
 
LVL 65

Expert Comment

by:rockiroads
ID: 17151734
Do u have unique id's in that record list? perhaps thats why?
0
 
LVL 65

Accepted Solution

by:
rockiroads earned 500 total points
ID: 17151744
Just a thought, are you wanting to create a new record?

If u have 15 records in your table, and u were on record 3, you will end up overwriting record 4
Do u need to go to the last record then paste?
0
 
LVL 1

Author Comment

by:Quig653
ID: 17153898
Thanks for asking Rocki

Yes, each record has a unique ID number and yes, I want "record 4" to be overwritten.

I preload "place holder" records so that Bar Code labels can be printed.  Because of the nature of the "paper flow" signs are produced and sent out into the field, before the information is input into the database.

As I mentioned, if you do each of those steps manually, the process works.  Access seems to understand not to try and copy the "autonumber" field.

0
 
LVL 1

Author Comment

by:Quig653
ID: 17158052
OK part of me feels foolish.

I was accessing the DB remotely at a client's location using GOTOMYPC and I was also accessing a copy of the DB on my local computer. Both databases gave me the same error message.

Today, while onsite at the client's location the subroutine worked without error.  I started thinking about it and using remote access was the only difference.  So I tested it and sure enough GOTOMYPC must take control of the Clipboard.  I not only got the error message on the remote machine, but also when running the db on local machine. As soon as I closed GOTOMYPC's session the subroutine worked.

Rocki thanks for trying...
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 17159017
Hi sorry didnt respond earlier
Not using EE much at the moment, as I ill and looking for a car urgently!

Glad you sorted though and well done on figuring it out
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Flowing down data to other tables 13 33
MkDir to create multiple folder and subfolder 2 41
Signature required on a report 5 33
Microaoft Access on a SBS 2011 Server 4 18
When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

827 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question