If you have three related tables, Parent -> Child -> Grandchild, with one to many relationships, how would you code a button to copy a record in the parent table, have it automatically copy records in both the other tables and then paste those as new records in the appropriate tables, preserving the relationship between the new records?
It’ll be easier to explain if you take a look at the sample DB I have attached, which is a very simplified version of what I’m trying to do. In my real database, the first table has approx 20 fields, the second has approx 100 and the third approx another 20, but the overall structure is the same.
My users will not understand the structure of the tables so I can't rely on them using manual copy/paste. Anyway, I'm probably going to deploy the final version in Access runtime.
So when the user is at one "top-level" record, viewing related records in sub-forms, I need a button that does something like:
------------------------------------------------------------------------
Copy this record
...and all the sub records
......and all the sub-sub-records
Create new record
...create new sub-records
......create new sub-sub-records
Paste everything into the right place.
Display the new record, with the related sub-forms and allow user to edit
-------------------------------------------------------------------------
Is this kind of thing possible?
It’ll be easier to explain if you take a look at the sample DB I have attached, which is a very simplified version of what I’m trying to do. In my real database, the first table has approx 20 fields, the second has approx 100 and the third approx another 20, but the overall structure is the same.
My users will not understand the structure of the tables so I can't rely on them using manual copy/paste. Anyway, I'm probably going to deploy the final version in Access runtime.
So when the user is at one "top-level" record, viewing related records in sub-forms, I need a button that does something like:
------------------------------------------------------------------------
Copy this record
...and all the sub records
......and all the sub-sub-records
Create new record
...create new sub-records
......create new sub-sub-records
Paste everything into the right place.
Display the new record, with the related sub-forms and allow user to edit
-------------------------------------------------------------------------
Is this kind of thing possible?