Date:  06/05/2006 09:18:34 AM Msg ID:  002961
From:  Larry Zhang Thread:  002961
Subject:  How do I display the option value?
Oops, no question over the past month.
 
I used an option dropdown list to display "State" in a user table.
 

<%cUser=Allt(Auth.UserID)

Select * from user where lower(UserID)=cUser;

into Cursor curUser

 

cState=Allt(State)

 

IF LOWER(Request.Form("UserForm")) = "user_edit"

    M.state = Request.Form('state')

 

    Select User
    UPDATE User;
      SET State = M.state,;
        WHERE Upper(UserID) = cUser

 

Endif

%>

 

<select size="1" name="State" value="<%=cState%>">
   <option>AK</option>
   <option>AL</option>
   <option>AR</option>
   <option>AZ</option>
   <option>CA</option>
   <option>CO</option>
   <option>CT</option>
......

   </select>

 

 

 
I can update the State value of the User table based on the user selection on the screen. But when I pulled out the same record, the value returns to the first option of the selection list.
 
When displaying the old record, how can I let the selection list points to the value of the User table, not the first selection as a new record?
 
Thank you in advance.
 
Larry