I would like to ask for help in figuring out how to populate a drop down menu with an existing value from db, and also displaying all the other values available in case that the current values needs to be changed.
Form field Order Status is formed by appending 5 record set fields: Box_Nbr, Line_No, Part_ID, Heat_No, Bndl_Pc_Cnt.
The record set is retrieved by order id.
The page before the landing page, passes only one variable through the query-string. I would like to know if there is a quick way to do it, without having to pass all the needed values on the URL.
I am attaching my current code.
Thank you so much.
<option value="X"%><%="BX|LN | PART ID..................................| HEAT .|CNT"%></option>
Set cn2 = Server.Createobject("ADODB.Connection")
Sql = "Select Box_Nbr, Line_No, Part_ID, Heat_No, Bndl_Pc_Cnt from Label where Order_ID='" & Order_ID & _
"' Order By Box_Nbr, Line_No, Bndl_Pc_Cnt"
Set rsData2 = cn2.Execute(Sql)
On Error Resume Next
do while not rsData2.eof
Order_Item = AddLeadingZeros(rsData2.fields("Box_Nbr"), 2) & " | " & _
AddLeadingZeros(rsData2.fields("Line_No"), 2) & " | " & _
rsData2.fields("Part_ID") & " | " & _
rsData2.fields("Heat_No") & " | " & _
<option value="<%=rsData2.fields("Box_Nbr")%>" selected="selected"><%=Order_Item%></option>
set rsData2 = Nothing
set cn2 = Nothing