I have a form that needs to insert and then update values in two tables. I have the 
insert part, but I'm not sure how to handle the updates.

During the insert, the user enters info about a URL link in the LINKS table. There is 
a drop down list which allows the user to select multiple counties. Selected values 
will be entered in successive records in a COUNTIES table, linked to the first table 
on the URL field.

For the update, I call the form again and populate the fields with the values 
previously entered in both tables. The question is, if the user wants to make 
different selections in the drop down list, how to I make the needed changes to the 
COUNTIES table? In the first pass (insert), the values "1" "3" and "5" get entered. 
During the update, I want to remove "1" and "3", and add "2" and "4", so that I end up 
with only 2,4 and 5 in table.

I'm thinking it might be best, during an update to COUNTIES, to delete all records 
related to this URL first, then insert the newly selected values. Does this seem like 
the right approach? Or would I be better off simply storing this list in a single 
field in the LINKS table and dropping the COUNTIES table altogether, since it only 
contains the FK and an ID field? 

Part of the consideration is that I want to show the ID values as preselected in the 
drop down list during the update. I should mention that the drop down contains a total 
of 82 values (populated using another query), and there might be, say, 3 values 
preselected.

Thanks so much...
--John
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to