Date:  05/15/2013 10:11:07 AM Msg ID:  004603
From:  Ali Koumaiha Thread:  004600
Subject:  Re: Help with Request.Form
You can also do it like this:

<%for i = 1 to lnRecs%>
  <%lcF6 = alltrim(STR(i))+'F'%>
  <INPUT TYPE=text NAME="<%=(lcF6)%>" VALUE="<%=alltrim(strack)%>"> 
  and so on...
  <INPUT TYPE=SUBMIT NAME=btnUpdate VALUE="Update">
endfor
%>
<%IF Request.FormCount("btnUpdate") > 0
  for i = 1 to lnRecs
    lcTest = alltrim(str(i))+"F"
     M.shipper = Request.Form(lcTest)
%>
Sent by Joe Goldsmiith on 05/12/2013 12:06:37 PM:
WOW! That's works like a charm! Thanks a lot for helping. I have been using Fox long before MS took it over and never knew that function existed.
Thanks again...
Joe
Sent by Ali Koumaiha on 05/10/2013 09:41:11 AM:
<%
if !empty(request.form("btnUpdate"))
 for x = 1 to lnRecs
 response.write("Value: " + request.form(trans(x)+"F"))
 endfor
endif
%>
 
Sent by Joe Goldsmiith on 05/08/2013 10:30:29 PM:
 Trying to reduce some code fat in a script I am trying to use a FOR-NEXT loop to stick a value into a Request.Form to get a form input string such as:
<%for i = 1 to lnRecs%>
  <%lcF6 = STR(i)+'F'%>
  <INPUT TYPE=text NAME="<%=(lcF6)%>" VALUE="<%=alltrim(strack)%>"> 
  and so on...
  <INPUT TYPE=SUBMIT NAME=btnUpdate VALUE="Update">
endfor
%>
<%IF Request.FormCount("btnUpdate") > 0
  for i = 1 to lnRecs
    lcTest = str(i)+"F"
     M.shipper = Request.Form('lcTest')
%>
After about an hour of trying various permutations, I am unable to substitute the value of lcTest in the Request.Form to capture lcF6 input. Perhaps this is not possible but maybe some has a thought.
Thanks for giving this some consideration.
Joe