|
 |
asptoday_discuss thread: Multiple Selections on Input
Message #1 by jlane <jlane@t...> on Thu, 20 Dec 2001 08:59:14 -0500
|
|
I have an ASP form that queries an MSAccess db and returns a dropdown
list of all trouble report numbers associated with a customer name. My
form creates this dropdown as a 'multiple select'. When this form is
submitted it is sent back to the database with all the entries in the
'multiple select' as one field delimited by commas. Is there an easy way
I can parse this info prior to it being written to the database so that
it create seperate records for each?
Here's how the data is written now:
Customer Trouble Report Numbers
Johnson Publishing, TR12345, TR54368,TR98746,TR987343
Here's what I would like to have:
Customer Trouble Report Numbers
Johnson Publishing, TR12345
Johnson Publishing, TR54368
Johnson Publishing, TR98746
Johnson Publishing, TR987343
Message #2 by howard@c... on Thu, 20 Dec 2001 19:29:12
|
|
Use the split function and then construct what you put in the database...
Dim laArray
laArray = Split(ComboName,',')
For LoopCntr = 1 To UBound(laArray)
TmpField = laArray(0) & "," & laArray(cntr)
Write to database
Next
This is pretty close but check the sytax of the split...
Hope this helps...
Howard
|
|
 |