[thelist] Part II: ASP, FSO, Replace

Joshua Olson joshua at waetech.com
Tue Feb 4 15:37:00 CST 2003


----- Original Message -----
From: "Michele Foster" <michele at wordpro.on.ca>
Sent: Tuesday, February 04, 2003 4:18 PM


> But if it equals more than one .. how to do that?  IOW,  this is a
> multi-select list, and the values in the DB are such as 1214,3435,2211
(yes,
> I am replacing the standard string delimiter ";" with a "," on insert to
the
> DB so that it'll work in a multiselect form in Access .. Access doesn't
like
> the ";".)

Michelle,

Try using "split" to break the list into an array, then run through and
replace each option in the array.

Untested Eg.

arr = Split(str_Citizenship)

For i = 0 to UBound(arr)
strCombo = Replace (strCombo, "<option value=""" & arr(i) &
""">","<option selected value=""" & arr(i) & """>")
Next

Response.Write strCombo

HTH,

-joshua




More information about the thelist mailing list