Populating list box

Results 1 to 5 of 5

Thread: Populating list box

  1. #1
    Join Date
    Dec 1969
    Posts
    131

    Default Populating list box

    I have a list box which is selecting the correct Category_Name from my recordset. I need to list the other 10 Category_Names within the list box. Do i have to create a loop and if so how? Thanks for your help.

  2. #2
    Ian Hoppes Guest

    Default RE: Populating list box

    Check out this link:<BR>http://www.4guysfromrolla.com/webtech/041599-1.shtml<BR><BR>ian<BR>ian@shelby.net

  3. #3
    Sam Otto Guest

    Default RE: Populating list box

    rs.Open "SELECT Category_ID,Catgeory_Name FROM Category ORDERBY Category_Name",conn,0,1,1<BR><BR>Response.write("& #060;select name=Category_ID"><BR>while not rs.eof<BR> id = rs("Category_ID")<BR> nm = rs("Category_Name")<BR> if id=val then<BR> s = "SELECTED"<BR> end if<BR> Response.write("&#060;option value=""" & id & """ " & s & "> " & nm )<BR>wend

  4. #4
    Sam Otto Guest

    Default RE: Populating list box

    I forgot the rs.MoveNext before the wend...


  5. #5
    Join Date
    Dec 1969
    Posts
    131

    Default RE: Populating list box

    Thank you both. Your directions and help were very much appreciated. My list box is working correctly. Thanks again!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •