Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Duplicating Record

Status
Not open for further replies.

AT76

Technical User
Apr 14, 2005
460
US
Hi,

I've created a button to duplicate a record on my access database. I've found this code in another forum that is supposed to do just this:

Private Sub Copy_Quote_Click()

DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70

End Sub

However, when I click on a button I created to run this code when clicked, ACCESS 2003 creates a new table which calls it "Paste Errors" and copys the record there.

Here is the error message I get: "Records that NAME Database was unable to paste have been inserted into a new table called 'Paste Errors.'

Any suggestions why it might be doing this?

Thanks in advance for any feedback!
 
If you have keys in your table they may not be allowed to be duplicated.

Check your table structure to allow duplicate keys.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top