I am having a horrible time with this and if anyone could shed some light on it for me I would appreciate it. I'm trying to make an update page where I have a drop down menu that pulls the options from a table. I have another table that will be the one needing to be updated. How in the world do you get the drop down menu to display all the options and pre-select the option from the table that is to be updated?
hours - is the recordset I'm using for the options
Recordset1 - is the recordset of the table to be updated
Here is a piece of the drop down menu code that I've been arguing with:
<option value="<%=(hours.Fields.Item("hourid").Value)%>" <%If (CStr(hours.Fields.Item("hourid").Value) = CStr(Recordset1.Fields.Item("bhours").Value)) Then Response.Write("SELECTED") : Response.Write("")%> ><%=(hours.Fields.Item("hhours").Value)%></option>
Thank you all in advance!
hours - is the recordset I'm using for the options
Recordset1 - is the recordset of the table to be updated
Here is a piece of the drop down menu code that I've been arguing with:
<option value="<%=(hours.Fields.Item("hourid").Value)%>" <%If (CStr(hours.Fields.Item("hourid").Value) = CStr(Recordset1.Fields.Item("bhours").Value)) Then Response.Write("SELECTED") : Response.Write("")%> ><%=(hours.Fields.Item("hhours").Value)%></option>
Thank you all in advance!