Duplicate a record in the same table

R

René

Hi,


My database contains a table with records that have 2 fields as primary

key; Contract and Index. What I want is keep a full history of every
contract, therefor I'm using the index-field to keep history. For
example: each new contract gets Index = 1. Whenever any of the fields
in the record must change, I want to add a new record to the database
with Index = 2. In that way I have a complete history of every
contract. I think the easiest way to accomplish this is to make a copy
of the record I want to change and paste it into a new record and add 1

to the Index-field. My VBA-skills are not enough developed to do this.
Can anybody help me out ?
 
T

TomHinkle

Not sure that is the BEST way to do what you want to do,,, but I guess it
will work.

you are correct, you're going to have to write some VBA on a form to do what
you want.. Nothing will be too complex, you just have to dot a lot of i's and
cross a lot of t's.

An easy solution would be to make the index field an autonumber. All the
indicies would be unique and they would show a chronological order. Granted
within a contract they might not be sequential (ie, could be 5,12,14,21).

That or don't worry about filling in the index field. the form wizards can
help you make a copy record function.
 
J

Jeff Boyce

Rene

To jump on Tom's bandwagon, you could use a date/time field that uses Now()
as a default value. This way, you'd alway have unique records, plus you'd
know when the record was added.

Regards

Jeff Boyce
<Access MVP>
 
Top