I've had this question posted for 2 days now! Can anyone answer it?!?!?!?!?!?
I have a form that allows users to make multiple selections using checkboxes. There are about 100 different options to select from. The problem is that I want each selection to be inserted as individual entries in a MS Access database I've created so that I can use the count function to determine how many times each item is selected. The columns in the database are ID (set to Auto number) and Checklist. The form on my web page looks similar to the one below:
<cfform action="checklist_process.cfm" method="post">
<td class="text" valign="top"><br>
<input type="checkbox" name="checklist" value="Abuse">Abuse<br>
<input type="checkbox" name="checklist" value="Abandonment">Abandonment<br>
<input type="checkbox" name="checklist" value="Addiction">Addiction<br>
<input type="checkbox" name="checklist" value="Adversity">Adversity<br>
On my checklist_process.cfm page, I have the simple code below:
<cfinsert datasource="checklist" tablename="checklist">
But when more than one selection is made, the selections are inserted in the database as one entry separated by commas like below:
However, I need each selection to be inserted into it's "own row" as below:
How can I accomplish this task. I've been trying to figure it out for weeks, but have not been successful :( I need an answer QUICK because I have to finish this project for one of my clients by tomorrow!!!!!