Duplicating Records

  • Thread starter Thread starter Brian Hauf
  • Start date Start date
B

Brian Hauf

I want to duplicate a record on a form because only two
fields are changing value from record to record.I have
created a duplicate record button. When I click on this
button a new record is created but the unique record
number (key) does not change and I get error messages
that the duplicated data does not comply with the new
records input mask. I can't modify the record in any way
and the only way out is to quit the program.
How can I duplicate these records? It seems inefficient
to type the same data in each time I add a new record.
Thanks for any help you can give me
Brian H
 
It seems inefficient
to type the same data in each time I add a new record.

Yes, it is - which is why most databases are built using one-to-many
relationships! Rather than having some fields that are routinely
duplicated, would it be possible to have two tables in a one to many
relationship? You'ld enter the unchanging data into the "one" table,
and the changable data into the "many" table using a Subform.

If this isn't practical, you'll need to duplicate all the fields
EXCEPT for the primary key; if that field is a Autonumber, just let it
increment, otherwise you'll need code to create a new unique ID.
 
Back
Top