Please post what you have so far, and I will take a look at it.
Regardless, I have some tips for you. From what I gather from your original post, you are trying to retrieve and present a variable number of records in forms that allow for a user to modify the data. In the past, when I have to deal with issues like this, I will usually have one cfoutput tag that loops over the records your query returned, with a hidden field that is outside the cfoutput containing the ids of the records in a comma-delimited format (name it queryIDs). The loop will present the data in a form as you have already said you are able to do, and you will simply have the names of the field contain the unique identifier of the record (eg. firstName_#qryMyQuery.uniqueID#). On the action page of the form you will use a cfloop to loop over the list of ids from your hidden field on the form page. Inside the loop you will then perform the database action you need to perform. You can see what I mean below:
<cfloop list="#FORM.queryIDs#" index="recordID">
<cfquery name="INSERT" datasource="myDatasource">
Insert Into Table2 (Table2ID, Table1ID, FirstName, LastName, ...)
Values (#newRecordID#,
#recordID#
'#Evaluate("FORM.FirstName_#recordID#")#',
'#Evaluate("FORM.LastName_#recordID#")#',
...)
</cfquery>
</cfloop>
You will of course need to determine the value of newRecordID on your own. What makes this possible is the Evaluate Function (read up on it at Adobe's Livedocs). The evaluate function receives a string and dynamically returns the value of the string. In this case you are asking it to return the value of FORM.FirstName_1 (or whatever the value of recordID is).
Note: One thing that you should be aware of is that you should never start the name of a form field with a number. It tends to not work (at least it didn't work the last time I tried it).
Last edited by hinde : Mar 16th, 2008 at 10:18 pm. Reason: Edited to add quoted around what are almost certainly form fields containing text. I swear to god that gets me every damn time.