Copying Subform Recordset to Table

kgoneill

New member
Local time
Yesterday, 19:07
Joined
Apr 23, 2009
Messages
6
Hi,

I have a database where machine characteristics are evaluated periodically. When adding a new machine, users can base the machine's characteristics on a similar machine that already exists. Choosing the base machine filters the contents of a subform to reflect that machine's characteristics. Is there a way to copy these records (there will be several) into the original table and assign them the new machine's inventory number and a date of Now()?

Thanks :)
 
There are couple ways to do it.
1. Set up a set of default values into a table that stores characteristics for a particular machine.
When new machine is added, you can select those characteristics from that table and apply to the new machine.

2. When adding new machine, you will need to find a base machine and then apply the appropriate characteristics of the base machine to the new machine.

Not sure if I understand what you are trying to get, but it sounds like you are having a parent-child relationship here.
Using the options above, when adding new machine, you will need to create a way so that user can choose the base/default machine characteristics.

For example, you are adding new machine call "F" and wants to apply the characteristics of machine "C" to "F".
First you will need to add the parent record for "F", then create some sort of drop-down box or some thing and allow user to choose previous machine.

Let's say user choose "C", on the click event of the drop-down box, you will use C's record id and identify C's characteristics using some sort of record set.
As you loop through C's characteristics, insert new rows into the characteristic table, but use machine F's record id as the parent id for these new records.

Sample table to demonstrate the idea would be.

tblMachine
MachineID
MachineName
etc...


tblMachineCharacteristics
MachineCharacteristicsID
MachineID
Characteristic
etc...

Sorry if I mis-interpret your question.
 
Sorry for the long delay! I've been dragged over to other projects for the last couple of weeks...

Okay, so reading your reply, I'm currently using the second option that you suggested. The user has a combo box to select the base machine, and after that is chosen, that machine's characteristics show up in a subform below.

This is the part that is exactly what I want, but I'm fuzzy on how to do:
"As you loop through C's characteristics, insert new rows into the characteristic table, but use machine F's record id as the parent id for these new records."

Is it a matter of recordsets? Or am I on the wrong track here?
Thanks :)
 

Users who are viewing this thread

Back
Top Bottom