Duplicate a Record

D

dssmithpkg

I have a DB which I have inherited and in it there is a form linked to a
table of records, each record has a number which is individual, I have added
a 'Duplicate Button' in which I have used code from a similar button on
another form.
The button selects the current record, copies it, performs a 'Paste Append'
and then moves to the last record. It gives it a new number but copies all
the detail from the other record.
It works well but in the form there is a 'Subform' (from a different table to
the first) which also needs to be copied, this information is not copied can
anyone tell me if there is a way to copy the information from the form and
the subform at the same time?

Sorry if this sounds confusing I am relativley new to Access and am picking
it up as I go along!!
 
S

Starwood

Sorry, I don't have an answer to your question, but I've been trying to
create a "Duplicate Button" function like you have described. Would you
please send me a copy of the code you used to create it?

Thanks,

George L.
 
D

dssmithpkg via AccessMonster.com

Here is a copy of the code:

Private Sub Duplicate_Spec_Click()
On Error GoTo Err

varFunction = "Duplicate"
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdCopy
DoCmd.RunCommand acCmdPasteAppend 'Paste Append

Err_Exit:
Exit Sub

Err:
Resume Err_Exit

End Sub

Hope this helps.
Sorry, I don't have an answer to your question, but I've been trying to
create a "Duplicate Button" function like you have described. Would you
please send me a copy of the code you used to create it?

Thanks,

George L.
I have a DB which I have inherited and in it there is a form linked to a
table of records, each record has a number which is individual, I have added
[quoted text clipped - 10 lines]
Sorry if this sounds confusing I am relativley new to Access and am picking
it up as I go along!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top