mazer
09-13-2005, 11:19 AM
I'm totally new to SQL so please bare with me, I have a multiple dropdown menu search on my site and I want to replace one of the dropdown with a query that will select a specific product group which the customer can then search using the other two menus. I have managed to select the product group but when I delete the code for the dropdown it doesn't work anymore. Any help would be greatly appreciated.
strQuery = "SELECT * FROM Comics WHERE ProductGroup='Marvel';"
Set objRS = objConn.Execute(strQuery)
dropdown(0) = "<SELECT SIZE=1 NAME=productset>"
dropdown(0) = dropdown(0) & "<OPTION></OPTION>"
While NOT objRS.EOF
dropdown(0) = dropdown(0) & "<OPTION>" & objRS("ProductGroup") & "</OPTION>"
objRS.MoveNext
Wend
dropdown(0) = dropdown(0) & "</SELECT>"
strQuery = "SELECT * FROM Comics WHERE ProductGroup='Marvel';"
Set objRS = objConn.Execute(strQuery)
dropdown(0) = "<SELECT SIZE=1 NAME=productset>"
dropdown(0) = dropdown(0) & "<OPTION></OPTION>"
While NOT objRS.EOF
dropdown(0) = dropdown(0) & "<OPTION>" & objRS("ProductGroup") & "</OPTION>"
objRS.MoveNext
Wend
dropdown(0) = dropdown(0) & "</SELECT>"