Date:  10/11/2003 08:28:58 PM Msg ID:  001672
From:  Joe Goldsmith Thread:  001672
Subject:  Checkbox Format
I have a table with a list of buyers and I want to send a listing to chosen buyers. To do this I want to use a checkbox then run through the buyers list and check for a checked checkbox. The code snippit is:

<%
IF Request.FormCount("btnchoice") > 0
    FOR I = 1 TO m.lnbuyrecs
    GO I 
    IF Request.Form(sclientid) = "1"
       RESPONSE.WRITE("Got IT")
    ENDIF
    ENDFOR
ENDIF
%>
 
<FORM NAME=addproperty METHOD=post ACTION="abuyertomany.fwx">
    <TABLE CELLSPACING=1 width=100%>
    <%SELECT buyers%>
    <%FOR I = 1 TO m.lnbuyrecs
    GO I%>
     <TR>
         <TD>
             <INPUT TYPE="checkbox" NAME=<%=(sclientid)%> VALUE="1" <%=IIF(Request.Form("TEST") = "1", "checked", "")%>>
         </TD>
     </TR>
 <%ENDFOR%>
     <TR>
         <TD>
             <INPUT TYPE="Submit" NAME=btnchoice VALUE="Send">
         </TD>
    </TR>                
</TABLE>
</FORM>
 
The error message is:
Message:  Invalid FieldName parameter
Program:  c:\inetpub\wwwroot\admin\abuyertomany.fxp
Line #:  109
Line:  IF Request.Form(sclientid) = "1"
 
I know that the checkbox syntax is wrong but I cannot figure out the right syntax for the Request.Form. Can someone help please?