Copy function does not copy data in subforms

C

CW

For each transaction we have a multi-form record - a main page with several
subforms on tabs. These work fine in all respects except for one problem:

Sometimes we need to create an additional transaction record for the same
customer that is very similar to an existing one, with just a few differences.
So I have provided a Copy function via a command button using the inbuilt
Record Operations/Duplicate Record procedure. After creating the new one,
users then simply edit the few bits that need to be different on the new
record.
Problem: only the data on the main form is copied. We need everything that
has been entered on any of the subforms on the original record to be copied
over to the new record, too.
I guess I need to add some code to the procedure but I don't know how to do
this.
Some advice, please??
Many thanks
CW
 
A

Allen Browne

You will need to write code that handles the related records from each
subform's table in turn.

There's an example for the main form and one subform here:
Duplicate the record in form and subform
at:
http://allenbrowne.com/ser-57.html

The part labelled, "Duplicate the related records" will need to be done for
each subform.
 
C

CW

Excellent - many thanks Allen.

Allen Browne said:
You will need to write code that handles the related records from each
subform's table in turn.

There's an example for the main form and one subform here:
Duplicate the record in form and subform
at:
http://allenbrowne.com/ser-57.html

The part labelled, "Duplicate the related records" will need to be done for
each subform.
 
Top