Solved

Command or Action 'Paste' isn't available

Posted on 2006-07-20
5
496 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
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…
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…

810 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