Solved

Command or Action 'Paste' isn't available

Posted on 2006-07-20
5
550 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

617 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