Copy Record Issues With Unique Value

  • Thread starter Thread starter Karl Burrows
  • Start date Start date
K

Karl Burrows

Hi!

Working on a small membership database for a interior design professionl
group. If I try to copy an existing record into a new record, I get an
error message telling me the unique value (membership number) can not be
duplicated. At that point, the only thing I can do is hit the escape key
and start a record from scratch. Is there a way to tell the copy macro
(built-in button command) to copy all except the primary , unique value
field?

Thanks!

Private Sub CopyRecord_Click()
On Error GoTo Err_CopyRecord_Click

DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append

Exit_CopyRecord_Click:
Exit Sub

Err_CopyRecord_Click:
MsgBox Err.Description
Resume Exit_CopyRecord_Click

End Sub
 
Did you try to set value of the existing record into a new
record for everything but the membership number, with your
membership number being an autonumber?

Helen
 
The number is assigned by the national organization, so the autonumber will
not work in this instance, unless I can use autonumber and overwrite with
the correct assigned number.
 
Back
Top