I need help to loop through a set of records that have been "checked" for printing.
<%
'Open Connection to the database
set conn = Server.CreateObject("ADODB.Connection"
conn.Open xDb_Conn_Str
dim arrPostedCheckValue, arrNameValuePairs, arrCustomerInfo, arrFirstNameInfo, arrLastNameInfo, strCustomerNumber, strFirstName, strLastName
arrPostedCheckValue=Request.Form("Print"
response.write arrPostedCheckValue
arrNameValuePairs=Split(arrPostedCheckValue,"|"
arrCustomerInfo=Split(arrNameValuePairs(0),","
arrFirstNameInfo=Split(arrNameValuePairs(1),","
arrLastNameInfo=Split(arrNameValuePairs(2),","
numCustomerNumber = arrCustomerInfo(1)
strFirstName = arrFirstNameInfo(1)
strLastName = arrLastNameInfo(1)
strsql = "select * from Customer WHERE CUSTOMERNUMBER=" & numCustomerNumber & ""
set rs = Server.CreateObject("ADODB.Recordset"
rs.Open strsql, conn, 1, 2
%>
<!--
<LINK href="stylesheet.css" rel=STYLESHEET><!--<body link="#ffffff" >-->
<body topmargin="15" leftmargin="0">
<BR>
<BR>
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="378" height="198">
<tr>
<td width="378" td height="62" NOWRAP style="line-height: .90">
<CENTER>
<font face="Bernard MT Condensed" style="font-size: 52pt">
<%
response.write ucase(strFirstName)
%>
</font>
</CENTER>
</TD>
</tr>
<tr>
<td width="378" td height="22" NOWRAP style="line-height: .90">
<CENTER>
<font face="Bernard MT Condensed" style="font-size: 18pt">
<%
response.write ucase(strFirstName)& " "
response.write ucase(strLastName)
%>
</font>
</CENTER>
</TD>
</tr>
<tr>
<td width="378" td height="22" NOWRAP style="line-height: .90">
<CENTER>
<font face="Bernard MT Condensed" style="font-size: 18pt">
<%
x_CustomerName = rs("CustomerName"
response.write ucase(x_CustomerName)
%>
</font>
</CENTER>
</TD>
</tr>
<tr>
<td width="378" td height="22" NOWRAP style="line-height: .90">
<CENTER>
<font face="Bernard MT Condensed" style="font-size: 18pt">
<%
x_CustomerCity = rs("CustomerCity"
x_CustomerState = rs("CustomerState"
response.write ucase(x_CustomerCity)& ", "
response.write ucase(x_CustomerState)
%>
</font>
</CENTER>
</TD>
</tr>
</table>
</div>
<SCRIPT TYPE="text/javascript">
var wndOpener = self.opener.parent
if (window.self) window.print();
timer = setTimeout("window.close()",1000);
wndOpener.location.reload(true);
</SCRIPT>
</BODY>
<html>
<%
' Close recordset and connection
rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing %>
<%
'Open Connection to the database
set conn = Server.CreateObject("ADODB.Connection"
conn.Open xDb_Conn_Str
dim arrPostedCheckValue, arrNameValuePairs, arrCustomerInfo, arrFirstNameInfo, arrLastNameInfo, strCustomerNumber, strFirstName, strLastName
arrPostedCheckValue=Request.Form("Print"
response.write arrPostedCheckValue
arrNameValuePairs=Split(arrPostedCheckValue,"|"
arrCustomerInfo=Split(arrNameValuePairs(0),","
arrFirstNameInfo=Split(arrNameValuePairs(1),","
arrLastNameInfo=Split(arrNameValuePairs(2),","
numCustomerNumber = arrCustomerInfo(1)
strFirstName = arrFirstNameInfo(1)
strLastName = arrLastNameInfo(1)
strsql = "select * from Customer WHERE CUSTOMERNUMBER=" & numCustomerNumber & ""
set rs = Server.CreateObject("ADODB.Recordset"
rs.Open strsql, conn, 1, 2
%>
<!--
<LINK href="stylesheet.css" rel=STYLESHEET><!--<body link="#ffffff" >-->
<body topmargin="15" leftmargin="0">
<BR>
<BR>
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="378" height="198">
<tr>
<td width="378" td height="62" NOWRAP style="line-height: .90">
<CENTER>
<font face="Bernard MT Condensed" style="font-size: 52pt">
<%
response.write ucase(strFirstName)
%>
</font>
</CENTER>
</TD>
</tr>
<tr>
<td width="378" td height="22" NOWRAP style="line-height: .90">
<CENTER>
<font face="Bernard MT Condensed" style="font-size: 18pt">
<%
response.write ucase(strFirstName)& " "
response.write ucase(strLastName)
%>
</font>
</CENTER>
</TD>
</tr>
<tr>
<td width="378" td height="22" NOWRAP style="line-height: .90">
<CENTER>
<font face="Bernard MT Condensed" style="font-size: 18pt">
<%
x_CustomerName = rs("CustomerName"
response.write ucase(x_CustomerName)
%>
</font>
</CENTER>
</TD>
</tr>
<tr>
<td width="378" td height="22" NOWRAP style="line-height: .90">
<CENTER>
<font face="Bernard MT Condensed" style="font-size: 18pt">
<%
x_CustomerCity = rs("CustomerCity"
x_CustomerState = rs("CustomerState"
response.write ucase(x_CustomerCity)& ", "
response.write ucase(x_CustomerState)
%>
</font>
</CENTER>
</TD>
</tr>
</table>
</div>
<SCRIPT TYPE="text/javascript">
var wndOpener = self.opener.parent
if (window.self) window.print();
timer = setTimeout("window.close()",1000);
wndOpener.location.reload(true);
</SCRIPT>
</BODY>
<html>
<%
' Close recordset and connection
rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing %>