View Complete Thread | FoxWeb Forum Home
Date:    Msg ID:   
From:    Thread:   
Yes, you are right and I found that earlier but somehow posted the STR(GCOMMISSION,3,2) instead. I see no reason why this should not work. I had it working in VFP for many years and now it fails. I know there is something stupid I am either not doing or overlooking. The saga continues.
Sent by FoxWeb Support on 05/08/2004 11:25:49 AM:
You need to use STR(GCOMMISSION,4,2).  The second argument is the total number of characters, including the period.

FoxWeb Support Team 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
*** Set The Vars
*** The Edit 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>
  <INPUT TYPE=SUBMIT NAME=btnchoice VALUE="Update">
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?