Copying records

D

Dan

I have an Orders table and an OrderDetails table. I want to select certain
orders, change a field or two, and make a copy of these records (along with a
copy of their detail records unchanged). I know how to OpenRecordset and loop
on the records selected and to get the fields within those records. Is there
an easier shortcut to copying records and their associated detail records?
 
A

Allen Browne

Using a recordset for the main record probably makes sense, because it's
easy to get the new AutoNumber value that you need for the new related
records. After that, you could execute an Append query statement.

Here's an example to follow:
Duplicate the record in form and subform
at:
http://allenbrowne.com/ser-57.html
 

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