Solved

Command or Action 'Paste' isn't available

Posted on 2006-07-20
5
474 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
Comment Utility
Do u have unique id's in that record list? perhaps thats why?
0
 
LVL 65

Accepted Solution

by:
rockiroads earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now