"Duplicate Record" Macro Error Message

NoSmoke

Board Regular
Joined
Dec 1, 2012
Messages
114
Hello, newbie and new poster here:

One of the actions available (Access 2010, Win 7) with the Command Button Wizard is "Duplicate Record" (which I gather is to copy the current record and paste-append it as a new record). Trouble is, it results in a "The command or action 'Paste' isn't available now" error message.

I've looked at the Macro the action creates and find that the "paste" action is not even listed as available with the RunMenuCommand (although it shows up as the command when the macro is displayed). Same thing for "copy" BTW although the copy commend seems to work as if "paste" is clicked on the ribbon after the error message is cleared, the record is successfully appended ("paste is grayed out when the error message appears and goes to bold when the error message is cleared.

Can anyone please help me with this? I have also been trying BTW to perform this task with a macro using SendKeys but it doesn't get past the copy part.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Is your database trusted, or in a trusted location? If you're not sure what that means do a web search, but in essence Office 2007 and 2010 disable particular functionality as a security measure unless the file is opened in a trusted location (a directory that you nominate via the Options dialog).

Macro steps, in particular, are affected by this; many are turned off in untrusted environments. Pretty well any steps that will change data are on this list.

Denis
 
Upvote 0
Thanks Denis. I added the directory in which the database file is stored to the Trusted Location list and, enabled all macros in Macro Settings but no cigar (same error message as b/f). Maybe something else required?

I should add this database was originally constructed in Access 97 and opened later in 2010. I read on another forum of someone experiencing delete/copy/paste problems with an older database running under 2010 whose problem was apparently solved by creating a new 2010 database and importing the tables, forms etc. I tried that by importing from the mdb version as well as from the converted accdb version but no improvement was found in either case.
 
Upvote 0
Tried a couple of things:


Created an entirely new database and added the "Duplicate Record" macro with the command button wizard.
Ran the macro and got the same error message (".....Paste isn't available now") as above.


Reran the macro in single step and it worked!


Reran the same macro in my original project database in single step and it worked too.


What the heck is wrong here??
 
Upvote 0

Forum statistics

Threads
1,215,046
Messages
6,122,849
Members
449,096
Latest member
Erald

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top