I am trying to update a list of reports with certain attributes. I select the report with a checkbox, then choose certain attributes with select dropdowns and a textarea. I can chose the correct report to update, but the other fileds are not working. Thanks.
page one:
<%
On Error Resume Next
rs2.MoveFirst
do while Not rs2.eof
%>
<TR>
<TD width=250 ><TEXTAREA name="zReportName" cols=55 rows=1 style="font-family: arial; font-size: 12px;" readonly>
<%=Server.HTMLEncode(rs2.Fields("ReportName").Value)%></TEXTAREA>
</TD>
<TD width=120 align=center><FONT SIZE=-2 FACE="Verdana" COLOR=#000000><big>I use this report:</big>
<input type="checkbox" name="zReportUse"
value="<%=Server.HTMLEncode(rs2.Fields("ReportID").Value)%>" style="width:120px;">
</TD>
<TD width=110 ><select name="zReportType" style="font-family:Verdana;font-size:10px;width:120px;" >
<option value="gram">green</option>
<option value="Excel Extract">Excel Extract</option>
<option value="Formatted Hard Copy">Formatted Hard Copy</option>
<option value="Extract and Report">Extract and Report</option>
</select></TD>
<TD width=110 ><select name="zReportNeed" style="font-family:Verdana;font-size:10px;width:120px;">
<option value="clam ">pink</option>
<option value="Mission Critical">Mission Critical</option>
<option value="Very Important">Very Important</option>
<option value="Somewhat Important">Somewhat Important</option>
<option value="May Not be Needed">May Not be Needed</option>
</select> </TD>
<TD width=250 ><TEXTAREA name="zReportNotes" cols=55 rows=2 wrap=physical style="font-family: arial; font-size: 12px;"></TEXTAREA><br />
</TR>
<%
rs2.MoveNext
loop%>
page two:
<%
Dim i,arrUse,arrType,arrNeed,arrNotes
arrUse=Split(request.Form("zReportUse"),",")
arrType=Split(request.Form("zReportType"),",")
arrNeed=Split(request.Form("zReportNeed"),",")
arrNotes=Split(request.Form("zReportNotes"),",")
for i=lbound(arrUse) to Ubound(arrUse)
sSQL="update tbl_UserReports set ReportType='"& arrType(i) &"',ReportNeed='"& arrNeed(i) &"',ReportNotes='"& arrNotes(i) &"',Complete = 'x' where ReportID = "& arrUse(i) &" "
conntemp.Execute sSQL
next
%>
page one:
<%
On Error Resume Next
rs2.MoveFirst
do while Not rs2.eof
%>
<TR>
<TD width=250 ><TEXTAREA name="zReportName" cols=55 rows=1 style="font-family: arial; font-size: 12px;" readonly>
<%=Server.HTMLEncode(rs2.Fields("ReportName").Value)%></TEXTAREA>
</TD>
<TD width=120 align=center><FONT SIZE=-2 FACE="Verdana" COLOR=#000000><big>I use this report:</big>
<input type="checkbox" name="zReportUse"
value="<%=Server.HTMLEncode(rs2.Fields("ReportID").Value)%>" style="width:120px;">
</TD>
<TD width=110 ><select name="zReportType" style="font-family:Verdana;font-size:10px;width:120px;" >
<option value="gram">green</option>
<option value="Excel Extract">Excel Extract</option>
<option value="Formatted Hard Copy">Formatted Hard Copy</option>
<option value="Extract and Report">Extract and Report</option>
</select></TD>
<TD width=110 ><select name="zReportNeed" style="font-family:Verdana;font-size:10px;width:120px;">
<option value="clam ">pink</option>
<option value="Mission Critical">Mission Critical</option>
<option value="Very Important">Very Important</option>
<option value="Somewhat Important">Somewhat Important</option>
<option value="May Not be Needed">May Not be Needed</option>
</select> </TD>
<TD width=250 ><TEXTAREA name="zReportNotes" cols=55 rows=2 wrap=physical style="font-family: arial; font-size: 12px;"></TEXTAREA><br />
</TR>
<%
rs2.MoveNext
loop%>
page two:
<%
Dim i,arrUse,arrType,arrNeed,arrNotes
arrUse=Split(request.Form("zReportUse"),",")
arrType=Split(request.Form("zReportType"),",")
arrNeed=Split(request.Form("zReportNeed"),",")
arrNotes=Split(request.Form("zReportNotes"),",")
for i=lbound(arrUse) to Ubound(arrUse)
sSQL="update tbl_UserReports set ReportType='"& arrType(i) &"',ReportNeed='"& arrNeed(i) &"',ReportNotes='"& arrNotes(i) &"',Complete = 'x' where ReportID = "& arrUse(i) &" "
conntemp.Execute sSQL
next
%>