Others

Fix the Unavailable Paste Command When Duplicating Records in Microsoft Access

Phi Hung VoPhi Hung Vo Nov 13, 2026 868 views

Question details

The user needs to duplicate records in Microsoft Access without receiving an unavailable Paste command error.

Fix the Unavailable Paste Command When Duplicating Records in Microsoft Access
Product
Microsoft Access
Device & OS
not provided
Scenario
A form button uses older VBA menu commands to copy and paste a record.
Observed behavior
Access displays “The command or action 'Paste' is not available now” during the duplication process.
Before you start

Identify the form button that duplicates the record and check the destination table's primary key, required fields, and unique constraints. Confirm that the database content is enabled and that you have permission to edit its VBA code.

Solution 1Recommended

Replace the Copy and Paste Commands With a DAO Insert Query

Use a DAO insert query to duplicate selected fields without relying on the clipboard or menu command availability.

The following example assumes the form is positioned on a saved record with a numeric RecordID. Replace the table and field names with your own. Do not copy an AutoNumber primary key, and adjust values that must be unique.

This query duplicates one record in one table. Related child records require separate handling.

1
Open the button's event procedure

Open the form in Design View, select the duplicate button, and open Property Sheet > Event. Next to On Click, choose [Event Procedure] and select the ellipsis button to open the VBA editor.

2
Find the legacy commands

In the button's Click procedure, locate the RunMenuCommand or DoCmd.RunCommand statements used to copy and paste the record.

3
Insert the duplicate with DAO

Replace the copy-and-paste statements with an insert query adapted to your table and fields, for example: CurrentDb.Execute "INSERT INTO [YourTable] ([FieldA], [FieldB]) SELECT [FieldA], [FieldB] FROM [YourTable] WHERE [RecordID] = " & CLng(Me![RecordID]), dbFailOnError. Include all required fields and supply new values for any fields that must be unique.

4
Refresh and test the form

Add Me.Requery after the insert if the form needs to display the new record. Save the VBA code, return to Form View, select a saved record, and click the duplicate button. Verify the new record and its field values.

Replace the Copy and Paste Commands With a DAO Insert Query
Review the data design: If duplication routinely copies the same information into multiple records, consider whether related tables would reduce redundant data.
Free Microsoft Office alternative

Work With Office Files in WPS Office

WPS Office is a free, lightweight alternative for working with documents, spreadsheets, and presentations in a familiar interface. Open compatible Office files to move everyday work over easily. WPS Office does not fix Access VBA or replace an Access database.

Use spreadsheets for suitable tabular data tasks outside an Access databaseOpen and edit compatible Microsoft Office formats, including DOCX, XLSX, and PPTXNavigate a familiar interface with common editing toolsUse a free, lightweight suite for everyday office work
microsoft office alternative - wps office

Frequently Asked Questions

Why is Paste unavailable in my Access button code?

Paste can be unavailable when the active form or control is not in a suitable state, the record source is not updatable, or security restrictions affect the action. Inspect the button's On Click event and check for security warnings.

Where can I find the VBA code for the duplicate button?

Open the form in Design View, select the button, and go to Property Sheet > Event. Select the ellipsis next to On Click to open its event procedure.

Should I copy the AutoNumber field when duplicating a record?

No. Leave the AutoNumber primary key out of the INSERT field list so Access can generate a new value. Also change or omit other fields subject to unique constraints, as appropriate.

Will the insert query also duplicate related records?

No. An INSERT query targeting one table does not automatically copy related child records. Those records need separate logic that links them to the new parent record.

Can WPS Office run my Access database and VBA button?

No. WPS Office is an alternative for compatible documents, spreadsheets, and presentations; it does not run an Access database or fix its VBA code.