Date:  07/15/2002 06:18:47 PM Msg ID:  000755
From:  Joe Goldsmith Thread:  000753
Subject:  Re: Option Boxes Not Saving
Aarrrghh, I never would have figured that out. Many thanks for the help!!!

Joe

Sent by FoxWeb Support on 07/15/2002 05:47:18 PM:
Your code is incorrect -- the SELECT tag does not take a VALUE clause.  What you need to do is dynamically set the SELECTED clause of each OPTION tag, based on the value of M.oconthow.  Here's some sample code:
 
<SELECT NAME="oconthow" SIZE="1">
<OPTION VALUE="Work Telephone" <%=IIF(M.oconthow='Work Telephone', 'SELECTED', '')%>>Work Telephone</OPTION>
<OPTION VALUE="Home Telephone" <%=IIF(M.oconthow='Home Telephone', 'SELECTED', '')%>>Home Telephone</OPTION>
<OPTION VALUE="Cell Telephone" <%=IIF(M.oconthow='Cell Telephone', 'SELECTED', '')%>>Cell Telephone</OPTION>
</SELECT>

FoxWeb Support Team
support@foxweb.com email

Sent by Joe Goldsmith on 07/15/2002 09:20:08 AM:
I have an edit form that works well for everything else other than option boxes that do not save chosen options. I have removed the SELECTED option and it still does not work. Would someone have a look at the snippit below and tell me what I'm doing wrong please?
 
<TR>
   <TD>   
      <SELECT NAME="oconthow" SIZE="1" VALUE="<%=TRIM(M.oconthow)%>">
      <OPTION VALUE="Work Telephone" SELECTED>Work Telephone</OPTION>
      <OPTION VALUE="Home Telephone">Home Telephone</OPTION>
      <OPTION VALUE="Cell Telephone">Cell Telephone</OPTION>
     </SELECT>
   </TD>
</TR>

Joe