Link to home
Start Free TrialLog in
Avatar of verdante
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.Fields.Item("Breakfast_Item_Name").Value)%>"><%=(RSBreakfast.Fields.Item("Breakfast_Item_Name").Value)%></option>
          <%
  RSBreakfast.MoveNext()
Wend
If (RSBreakfast.CursorType > 0) Then
  RSBreakfast.MoveFirst
Else
  RSBreakfast.Requery
End If
%>
        </select>
Avatar of rohanbairat3
rohanbairat3

Sorry didnt get the question .... please explain in detail....

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
ASKER CERTIFIED SOLUTION
Avatar of gladxml
gladxml

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of verdante

ASKER

Love your work gladxml. It certainly did help. Very happy customer
Verdy