Assign Child Records from Template Parent Record to Current Parent Record

  • Thread starter Thread starter BCW
  • Start date Start date
B

BCW

I have a parent table P with a child table C. I have a justified form for
the parent table with a tabular subform listing all associated child
records. Since I have several known situations where the initial set of
child records would be standard, I would like to create a simple, almost
non-programmatic way to copy all the records in the child table of a
template record to the current child records of a newly created parent. I
would have some number of different template parent/child records & the user
could just specify which instance of parent template they would like to copy
from.

I don't know how to do the SQL query that will assign the template child
records to my current record.
 
Doing this in a simple, almost non-programmatic way, are you kidding?

The easiest way to do this would be to let the user choose the template he
needs from a list (combobox, listbox?) and then call or create an append
query that will do the job on SQL-Server and after that refresh the subform
so that the newly created records on SQL-Server are displayed locally.

By reading a few posts in this newsgroup, you will find many ways of
executing a sql string on the server or calling a stored procedure with
parameters.
 
Back
Top