Duplicating records from one table to itself

G

Goldar

I have developed a data entry form for my customer's accounting application.
This for has a controlsource that is the accounting transactions table. I
have been asked to provide a capability to copy the record being displayed on
the screen and duplicate it a number of times in the same table as recurring
transactions, each of which would have a different billing date. I have
considered several approaches, but would like some suggestions about how to
proceed.

Thank you.
 
B

bhicks11 via AccessMonster.com

You can create an append query that has the form controls for the value of
each field. Then you can run the query x number of times with x date in the
billing date column, either through a command button or an event trigger.

Bonnie
http://www.dataplus-svc.com
 
A

Allen Browne

The two alternative ways to add the new records would be:
a) AddNew on the form's RecordsetClone
b) Append query (using a Cartesian product with a counting table to get the
multiple values) and then Requery the form.

The first one would be simpler.

This article gives an example of both:
Duplicate the record in form and subform
at:
http://allenbrowne.com/ser-57.html
It uses the Recordset approach to duplicate the main form record, and the
Append query approach to duplicate the records in the subform. Since you're
not trying to duplicate related values in a subform, you can just ignore the
second part.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top