That's probably because your code assumes you're only passing one value. I haven't seen your code for the second drop-down but I assume it's something like this:
Code:
Dim selectedValue
Dim sql
selectedValue = Request.Form("1")
sql = "SELECT Col1, Col2 FROM Table WHERE PrimKey = '" & selectedValue & "'"
In normal circumstances, the WHERE clause will look like
Code:
WHERE PrimKey = 's'
However, in the "multiple values" option, it will look like this:
Code:
WHERE PrimKey = 's,w'
which won't give you any results.
You should parse Request.Form("1") by splitting on a comma and then build up a WHERE clause dynamically using OR.
You can also take a look at the IN clause of a WHERE statement.E.g.
Code:
WHERE PrimKey IN ('s', 'a')
An even better solution is to leave out the WHERE clause at all when Request.Form("1") equals "all":
Code:
If Request.Form("1") = "all" Then
' Do nothing
Else
sql = sql & " WHERE bla bla bla "
End If
HtH,
Imar