duplicate previous record

cadillac

Registered User.
Local time
Today, 03:15
Joined
May 9, 2001
Messages
34
i would like to be able to duplicate the record that was last entered into a form. i want to be able to do this x (user entered) number of times. i just want to take the last record in the table and copy it x number of times. i know i shouldn't duplicate identical records, but it's only for lables.

thanks
 
The easiest way I've found to do this is to code a command button that moves to the last record then sets the default values of the fields you'd like to duplicate equal to the current record. From there it should be a simple matter to create x number of records. If you need help with the code let me know and I’ll send you a sample.

[This message has been edited by Abby N (edited 08-16-2001).]
 
please do send me an example. i think i follow you, but i don't know the code to reference the record.
 
Just sent it off. If you have any questions just let me know. BTW, I wasn't sure what version of Access you're running. So, I created it in 97. But, it should work fine in 2000 as well. Hope it helps.

One more thing, the sub I created creates duplicates of the current record. I figured it would be more flexable that way. If you only want to duplicate the last record add this line of code to the beginning of the sub.

DoCmd.GoToRecord , , acLast


~Abby

[This message has been edited by Abby N (edited 08-17-2001).]
 
please do send me an example on how to duplicate previous record.

Thanks
 
I would like to request a copy of this also.

Advance thanks.
 

Users who are viewing this thread

Back
Top Bottom