Hi All,
I'm joining two tables. A product table and an options table. The options table has a column for different sizes for each product. I'm trying to populate a web form dropdown with the sizes. But the dropdown will only display the first size and repeat that first size. So if I have small, medium, and large, the dropdown will only have "small" 3 times.
Product Table
--------------
ID | Name | Description
1 widget the best product
Options Table
-------------
ID | Size | Inventory
1 small 5
1 medium 1
1 large 2
rs.Source = "SELECT P.id, P.name, P.description, O.id, O.size, O.Inventory FROM Product LEFT JOIN Options ON P.id = O.id AND O.id = '" & QueryStringID & "' WHERE P.id = '" & QueryStringID & "'ORDER BY P.id ASC"
Dim strDropList
While NOT rs.EOF
strDropList = strDropList & "<option value='" & strSize1 & "'>" & strSize1 & "</option>"
rs.MoveNext
Wend
Response.Write "<p><select size='1' name='drop'>"
Response.Write strDropList
Response.Write "</select></p>"
Let me know if you need any more info. Thanks.