verdante
asked on
List box syntax
Hi
I have an update form that populates a number of list boxes with data from a secondary recordset. What I would like to be able to do is display the current record values from the primary recordset when the update form is first displayed rather than just seeing the list options from the seconday recordset. The user can then change the current value if they wish. Below is the code from one field. Can someone please advise me of the correct syntax.
thanks
Verdy
<select name="Brk1" > 'from RSday
<%
While (NOT RSBreakfast.EOF)
%>
<option value="<%=(RSBreakfast.Fie lds.Item(" Breakfast_ Item_Name" ).Value)%> "><%=(RSBr eakfast.Fi elds.Item( "Breakfast _Item_Name ").Value)% ></option>
<%
RSBreakfast.MoveNext()
Wend
If (RSBreakfast.CursorType > 0) Then
RSBreakfast.MoveFirst
Else
RSBreakfast.Requery
End If
%>
</select>
I have an update form that populates a number of list boxes with data from a secondary recordset. What I would like to be able to do is display the current record values from the primary recordset when the update form is first displayed rather than just seeing the list options from the seconday recordset. The user can then change the current value if they wish. Below is the code from one field. Can someone please advise me of the correct syntax.
thanks
Verdy
<select name="Brk1" > 'from RSday
<%
While (NOT RSBreakfast.EOF)
%>
<option value="<%=(RSBreakfast.Fie
<%
RSBreakfast.MoveNext()
Wend
If (RSBreakfast.CursorType > 0) Then
RSBreakfast.MoveFirst
Else
RSBreakfast.Requery
End If
%>
</select>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Love your work gladxml. It certainly did help. Very happy customer
Verdy
Verdy
If its updating the values into second listbox depending on selection in first you should post back the form to itself and handle it there...
If you are more clear .. i will help u out