I want to have a button on a form to Duplicate a record. Not all of the fields would be duplicated. The code works until I use the fields that are Lookup Fields. I am not sure how to type the names of the fields to reference the correct field name. In the code, the Region, Class and Seller all come from a Lookup. My code is as follows:
Can anyone give me an idea how to write the lookup field names?
Code:
Private Sub DuplicateRecord_Click()
With Me.RecordsetClone
.AddNew
!Region = Region
!Class = Class
!Seller = Seller
!Description = Description
.Update
Me.Bookmark = .LastModified
End With
End Sub