Duplicating Records - Extended Variant!

vdanelia

Registered User.
Local time
Today, 15:55
Joined
Jan 29, 2011
Messages
215
Hello Dear friends I have a question about duplicating the records....

I have a database and I have to enter many identical records with simple differences, Is there any way to specify amount of record duplication?
for example: I entered one record, but I need it to be duplicated 9 times, I created a small form with unbound text box, when I click "Duplicate Record button" this form must pop-up then I'll enter the amount of duplication value (9) and after this my record must be 10...
I played with it, but no results... please help, suggest how to solve this problem..

Thank you in advanced
 
You could just use a for loop:
Code:
For n=1 to (number of duplicates)
Docmd.runsql (Insert SQL code for append query here)
Next n
You'll have to be careful that you're not duplicating primary keys or anything like that but it should work OK.
 
Oh, and you'll have to put
Code:
Dim n as byte
At the start of your button's on click code to declare the variable.
 
Hello James Thanks for the reply, but Couldn't understand where to put these codes or how to use them....
I use Command Button (Embedded Macro, Duplicate Record)
 

Users who are viewing this thread

Back
Top Bottom