# Really Simple Yet Wont Work!

**URL:** <https://forum.kirupa.com/t/really-simple-yet-wont-work/215603>\
**Category:** programming\
**Created:** [February 8, 2007, 4:06pm UTC](https://forum.kirupa.com/t/really-simple-yet-wont-work/215603 "2007-02-08T16:06:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thedaveyb](https://avatars.discourse-cdn.com/v4/letter/t/4af34b/32.png) [@thedaveyb](https://forum.kirupa.com/u/thedaveyb)\
**Post date:** [February 8, 2007, 4:06pm UTC](https://forum.kirupa.com/t/really-simple-yet-wont-work/215603/1 "2007-02-08T16:06:21Z")

</div>

hey people… am really struggling with this as seems straightforward yet wont work…

its basically a form, that submits to the same page.

there is then an IF statement requesting the Form value and then will either do option one or option two from there.

```auto
<% 

applicant_treatment = request.Form("applicant_treatment")

%>

<form action="eshot.asp" method="post" name="home_news" id="home_news">
<select class="login" style="width: 250px;" name="applicant_treatment" id="applicant_treatment" onchange="document.home_news.submit()" >
<option value="na">Please Select </option>
<%
sql = "Select applicant_treatment from applicants"
rs.open sql,,,adopenstatic
do while not rs.eof
%>
<option <% if applicant_treatment = rs("applicant_treatment") then response.Write("selected") end if %> value="<%=rs("applicant_treatment") %>"><%=rs("applicant_treatment") %></option>
<%
rs.movenext
loop
rs.close 
%>
          </select>  
          
          <input class="sub" type="submit" value="View News Article"/>

        </form>

<h1> <em>Send</em> Eshot </h1>

<div id="task_select">
<% 
if applicant_treatment <> "" Then
sql = "Select * from applicants where applicant_treatment = " & applicant_treatment
else
sql = "Select * from applicants"
End if
rs.open sql, , , adopenstatic
%>

<% 
response.Write("<textarea cols='50' rows='15' name='recipient' id='recipient'>")
%>
<%
do while not rs.eof
response.Write (rs("applicant_email") & ";")
rs.movenext
loop
rs.close
%>
<% 
response.Write("</textarea> ")
%>
</div>

```

im basically getting the result

```auto
No value given for one or more required parameters. 
 /cms/eshot.asp, line 54

```

\*applicant treatment is the field from the database and is in text format.
