<select name="Location" size="3" multiple="multiple" id="jobsearchcounty">
<%
Dim MyArray, sSelected
MyArray = Split(Request.Querystring("location"),",")
While (NOT rslocation.EOF)
' Find out if this one is selected or not by taking the id and checking it against out array in a basic loop
sSelected = ""; ' Reset each time
for i=0 to UBound(MyArray)
if MyArray(i) = rslocation.Fields.Item("intid").Value then
sSelected = " selected"
end if
next
%>
<option value="<%=(rslocation.Fields.Item("intid").Value)%>" <%=sSelected%>><%=(rslocation.Fields.Item("strlocation").Value)%></option>
<%
rslocation.MoveNext()
Wend
If (rslocation.CursorType > 0) Then
rslocation.MoveFirst
Else
rslocation.Requery
End If
%>
</select>