Drop Down List

Results 1 to 2 of 2

Thread: Drop Down List

  1. #1
    Glen Guest

    Default Drop Down List

    I retrieve a string from a memeo field in Access, and use the split function to assign all the seperated values into variables.<BR>When I go to populate my drop list, I want to check to see if any values match the list and have them selected.<BR><BR>My code works if I use the actual string, but won&#039;t work if I use the variable. When I split the memo field, should I make sure the variables are strings?<BR><BR>The values are strings and my database indexs/values are strings

  2. #2
    Join Date
    Dec 1969

    Default RE: Drop Down List

    Example<BR><BR>Dim MyList<BR>Dim NewList<BR><BR>MyList="Cats,Dogs,Fish,Frogs"<BR><B R>NewList=Split(MyList,",")<BR><BR>Response.write "&#060;select Name=&#039;TheList&#039;&#062;" & vbcrlf<BR>for i = 0 to Ubound(NewList)<BR>Response.write "&#060;option"<BR>If NewList(i)= Request.form("TheList") Then Response.write " Selected"<BR>Response.write "&#062;" & NewList(i) & "&#060;/option&#062;" & vbcrlf<BR>next <BR>Response.write "&#060;/Select&#062;" & vbcrlf<BR>

Posting Permissions

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