Date:  05/08/2004 11:25:49 AM Msg ID:  002026
From:  FoxWeb Support Thread:  002021
Subject:  Re: SELECT/OPTION
You need to use STR(GCOMMISSION,4,2).  The second argument is the total number of characters, including the period.

FoxWeb Support Team
support@foxweb.com email

Sent by Joe Goldsmith on 05/07/2004 10:10:58 PM:
It seems that select/option may not like numeric value converted to character. Here is my code.
 
*** GCOMMISSION is stored as a numeric with a value of 0.90
*** START EDIT FORM ***
*** Set The Vars
M.GCOMMISSION = STR(GCOMMISSION,3,2)
 
*** The Edit Form
<FORM>
  <SELECT NAME="gcommission" SIZE="1">
  <OPTION VALUE="0.85" <%=IIF(M.gcommission='0.85', 'SELECTED', '')%>>0.85</OPTION>
  <OPTION VALUE="0.90" <%=IIF(M.gcommission='0.90', 'SELECTED', '')%>>0.90</OPTION>
  </SELECT>
  <INPUT TYPE=SUBMIT NAME=btnchoice VALUE="Update">
</FORM>
 
The problem is that 0.90 is never automatically selected and it form always loads with 0.85. In the add form I am able to properly save the commission but the edit form fails. Am I missing something?
 
Joe