Select Lists

Results 1 to 2 of 2

Thread: Select Lists

  1. #1
    Paul Staynor Guest

    Default Select Lists

    How can I,using VB script cause a Select List to show the value from a data field. For example if I read a customer record into a recordset and want to display to a user for updateI want to show the State/Province field in a list so it may be changed.<BR>Is this possible?

  2. #2
    Join Date
    Dec 1969

    Default RE: Select Lists

    Here is a code sample of how I selct the current state that a client is in with a dropdown<BR><BR>I have a state table in my database with the abreviation and the name<BR><BR>While writting the client information to the form fields I populate the state drop down from another recordset and check the<BR>abreviation of the state recordset against the client value and if they match I add selected to that option<BR><BR><BR>&#060;Select Name="State"&#062;<BR>&#060;% Do While Not RSstates.EOF %&#062;<BR>&#060;Option value="&#060;%=RSstates("abr")%&#062;"&#060;%If RS("State")=RSstates("abr") Then Response.write "Selected"%&#062;&#062;&#060;%=RSstates("Name")%&# 062;&#060;/Option&#062;<BR>&#060;%<BR>RSstates.MoveNext<BR>Lo op<BR>RSstates.Close<BR>Set RSstates=Nothing<BR>%&#062;<BR>&#060;/SELECT&#062;<BR><BR>hope this helps<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