Experts Exchange connects you with the people and services you need so you can get back to work.
Private Sub btnCopy_Click()
Dim rstSource As DAO.Recordset
Dim rstInsert As DAO.Recordset
Dim fld As DAO.Field
Dim intDupe As Integer
Dim intDupes As Integer
' Specify the count of duplicates to create.
intDupes = 7
If Me.NewRecord = True Then Exit Sub
Set rstInsert = Me.RecordsetClone
Set rstSource = rstInsert.Clone
If .RecordCount > 0 Then
' Go to the current record.
.Bookmark = Me.Bookmark
For intDupe = 1 To intDupes
For Each fld In rstSource.Fields
If .Attributes And dbAutoIncrField Then
' Skip Autonumber or GUID field.
' Copy field content.
rstInsert.Fields(.Name).Value = .Value
' Go to the last new record and sync form.
Me.Bookmark = .Bookmark
Set rstInsert = Nothing
Set rstSource = Nothing
Open in new window
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.