Copy and Multiple Paste

Eddie Mason

Registered User.
Local time
Today, 03:57
Joined
Jan 31, 2003
Messages
142
I would like to be able to copy a single record in a table and then paste this record a pre-defined number of times 10,20,30 depending on requirements. The reason I need to do this is that I want to set up a number of identical records that can easily be amended into unique records. This will vastly reduce the amount of work and time spent entering records individually.

The only way that I have been able to achieve this is to copy and transfer the master record into Excel, and then copy the row and paste it into a range of cells. Copy the range of cells back from Excel and then paste this range back into the Access table.

This works but is long winded; what I would like to know is is there a simply way of achieving this. Hope someone can help

Kind regards,

Eddie
 
Maybe run an append query with code to loop and append that record that many times? Would be simple.
 
I must say I agree with Pat on the design flaw, but honnestly think it you can handle it easier with code, especially if you want to handle this in a form and automate it, but it is probably a matter of preference.

You can do it with an append query. No code required. Create a new table with a single numeric field. Populate it with the numbers 1 through your max dups required. Add this table to your append query without any join lines. This will create a Cartesian Product. Add criteria that selects records with the numeric field <= the number of duplicates you want. So the query will have two tables, the original and the dummy with selection criteria for each.

BTW,
It is almost certain that you have a design flaw if you need to do this. Additionally, you'll need to modify all your queries to ignore incomplete records.
 

Users who are viewing this thread

Back
Top Bottom