There are 2 sets of Checkboxes on this form, I want the second set of checkboxes to be auto filled to reflect what is in the Access databse.
<Body onLoad="setfocus()" bgcolor="#FFFFFF">
<%
dim first
dim last
dim first1
dim last1
dim dept
dim branch
dim signoff
dim GBS
dim VM
dim CYGNA
dim CAVIEW
dim VPS
dim CLAIMS
dim CUMULUS
dim GMX
dim SIERRA
dim ST400
dim TRADER2
dim ABACIS
dim BAMTRAC
dim Comments
first=Request.Form("first"
last=Request.Form("last"
first1=Request.Form("first1"
last1=Request.Form("last1"
dept=Request.Form("dept"
branch=Request.Form("branch"
signoff=Request.Form("signoff"
GBS=Request.Form("GBS"
VM=Request.Form("VM"
CYGNA=Request.Form("CYGNA"
CAVIEW=Request.Form("CAVIEW"
VPS=Request.Form("VPS"
CLAIMS=Request.Form("CLAIMS"
CUMULUS=Request.Form("CUMULUS"
GMX=Request.Form("GMX"
SIERRA=Request.Form("SIERRA"
ST400=Request.Form("ST400"
TRADER2=Request.Form("TRADER2"
ABACIS=Request.Form("ABACIS"
BAMTRAC=Request.Form("BAMTRAC"
Comments=Request.Form("Comments"
If first <> "" then
Rec_Save
End If
Function Rec_Save()
Dim f
Dim conn
Dim RecSet
Dim Recordsaffected
Dim rs
Dim x
Dim BCIP
Dim adOpenStatic
Dim rsName
set conn=Server.CreateObject ("ADODB.Connection"
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\inetpub\
conn.Execute "INSERT INTO BCResults ([Call_Taken_By_First_Name],[Last_Name],[Callers_FName],[Callers_LName],[Department],[Branch],[Signoff_Time],[GBS],[VM],[CYGNA],[CAVIEW],[VPS],[CLAIMS],[CUMULUS],[GMX],[SIERRA],[ST400],[TRADER2],[ABACIS],[BAMTRAC],Comments) values ( '" & _
first & "','" _
& last & "','" _
& first1 & "','" _
& last1 & "','" _
& dept & "','" _
& branch & "','" _
& signoff & "','" _
& GBS & "','" _
& VM & "','" _
& CYGNA & "','" _
& CAVIEW & "','" _
& VPS & "','" _
& CLAIMS & "','" _
& CUMULUS & "','" _
& GMX & "','" _
& SIERRA & "','" _
& ST400 & "','" _
& TRADER2 & "','" _
& ABACIS & "','" _
& BAMTRAC & "','" _
& Comments & "')"
set rs = Server.CreateObject("ADODB.recordset"
rs.Open "SELECT * from BCResults ORDER BY Results_Id DESC", conn, adOpenStatic
%>
<%rs.MoveFirst
%>
<%
response.write("<center><h2><font color=red><U>Croydon INC Business Continuity Test</h2></center></U></font>"
%>
<%
response.write("<center><h2><font color=red><U>Thankyou for your response</h2></center></U></font>"
%>
<table border="1" width="50%" bgcolor="#fff5ee" align="center">
<tr>
<% for each x in rs.fields
response.write("<th valign='center' bgcolor='#bOc4de'>" & x.name & "</th>"
%>
<td><bgcolor="#003399"><center><%Response.Write(x.value)%></center>
<tr>
<% next%>
</tr>
<TABLE bgcolor="#fff5ee" align="center">
<TR>
<BR>
<BR>
<form>
<input type='button' value='Close this Window' onClick='window.close()'>
</form>
</TR>
</TABLE>
<%
rs.close
conn.close
response.end
End function
%>
<center><font color=Red><H2><U>INC Business Continuity</U></font></H2></center>
<FORM name="userform1"
action="BC_Results_copy(1).asp"
method=post>
<table height="487">
<tr>
<TD WIDTH=150 VALIGN=TOP ALIGN="CENTER" BGCOLOR="#99FFFF" height="483">
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<applet code="fphover.class" codebase="../" width="150" height="24">
<param name="hovercolor" value="#0000FF">
<param name="textcolor" value="#FFFFFF">
<param name="text" value="Display Results">
<param name="color" value="#FF0000">
<param name="effect" value="glow">
<param name="url" valuetype="ref"
</applet>
<td valign=top width=629 height="483">
<table width="400" border="0" cellspacing="0" cellpadding="0">
<TR>
</td>
</tr>
</table>
<table valign=center width="632" border="0" cellspacing="0" cellpadding="0" height="482">
<tr>
<TD BGCOLOR="#99FFFF" height="482">
<B>
<FONT FACE="arial,helvetica,sansserif" SIZE="3">
<Font color=Red><U><center><H2>Branch Test Results.</center></H2></U></Font>
</font>
<Script>
var mydate = new Date()
var monthday = mydate.getDate()
var month = mydate.getMonth() + 1
var day = mydate.getDay()
var year = mydate.getYear()
document.write("<DIV ALIGN=right>" + "<BR>"
document.write("<U><font color = Red>Today's date is: </U></font>" + monthday + "-" + month + "-" + year + "</DIV>" )
</Script>
<BR>
<BR>
<P>
<FONT FACE="arial,helvetica,sansserif" SIZE="3"><B>
Primary Contact:<INPUT TYPE=text SIZE=50 NAME="first"</B><BR>
Work:
<INPUT TYPE=text SIZE=20 Name="work1" <BR>
Home:<INPUT TYPE=text SIZE=20 Name="home1"><BR>
Mobile No: <INPUT TYPE=text SIZE=20 Name="mobile1" <BR>
Pager:<INPUT TYPE=text SIZE=20 Name="pager1" <BR>
<P>
<FONT FACE="arial,helvetica,sansserif" SIZE="3"><B>
Secondary Contact:<INPUT TYPE=text SIZE=50 NAME="second"</B><BR>
Work:
<INPUT TYPE=text SIZE=20 Name="work" <BR>
Home:<INPUT TYPE=text SIZE=20 Name="home"><BR>
Mobile No:
<INPUT TYPE=text SIZE=20 Name="mobile" <BR>Pager: <INPUT TYPE=text SIZE=20 Name="pager" <BR>
<P>
Department Name: <INPUT TYPE=text SIZE=20 Name="dept" onChange="dept2(userform1.dept)">
<P>
<BR>
<P>
<FONT FACE="arial,helvetica,sansserif" SIZE="3"><B>
Branch Signed off at:: <input type="text" name="signoff" size="20" onKeyUp="TimeFormat(this,this.value,event,false)" onChange="TimeFormat(this,this.value,event,true)"></b></font>
<P>
<BR>
<B><U><font color = Red>Select Services Tested:</font></U></B><BR>
<TABLE width="500" height="91">
<TR>
<TD width="129" height="87"><B>Mainframe</B><BR>
<INPUT TYPE = Checkbox NAME = "GBS" VALUE="GBS">GBS<BR>
<INPUT TYPE = Checkbox NAME = "VM" VALUE="VM">VM<BR>
<INPUT TYPE = Checkbox NAME = "CYGNA" VALUE="CYGNA">CYGNA<BR>
<INPUT TYPE = Checkbox NAME = "CAVIEW" VALUE="CAVIEW">CAVIEW<BR>
<INPUT TYPE = Checkbox NAME = "VPS" VALUE="VPS">VPS<BR>
<BR>
<BR>
</TD>
<TD width="234" height="88"><B>Non Mainframe Services</B><BR>
<INPUT TYPE = Checkbox NAME = "CLAIMS" VALUE="CLAIMS">CLAIMS<BR>
<INPUT TYPE = Checkbox NAME = "CUMULUS" VALUE="CUMULUS">CUMULUS<BR>
<INPUT TYPE = Checkbox NAME = "GMX" VALUE="GMX">GMX<BR>
<INPUT TYPE = Checkbox NAME = "SIERRA" VALUE="SIERRA">SIERRA<BR>
<INPUT TYPE = Checkbox NAME = "ST400" VALUE="ST400">ST400<BR>
<INPUT TYPE = Checkbox NAME = "TRADER2" VALUE="TRADER2">TRADER2<BR>
<BR>
</TD>
<TD width="153" height="87"><B>US Connectivity</B><BR>
<INPUT TYPE = Checkbox NAME = "ABACIS" VALUE="ABACIS">ABACIS<BR>
<INPUT TYPE = Checkbox NAME = "BAMTRAC" VALUE="BAMTRAC">BAMTRAC<BR><BR>
<BR>
<BR>
<BR>
<BR>
</TABLE>
<B><U><font color = Red>Services previously advised that were to be tested:</font></U></B><BR>
<TABLE width="500" height="91">
<TR>
<TD width="129" height="87"><B>Mainframe</B><BR>
<INPUT TYPE = Checkbox NAME = "GBS" VALUE="GBS">GBS<BR>
<INPUT TYPE = Checkbox NAME = "VM" VALUE="VM">VM<BR>
<INPUT TYPE = Checkbox NAME = "CYGNA" VALUE="CYGNA">CYGNA<BR>
<INPUT TYPE = Checkbox NAME = "CAVIEW" VALUE="CAVIEW">CAVIEW<BR>
<INPUT TYPE = Checkbox NAME = "VPS" VALUE="VPS">VPS<BR>
<BR>
<BR>
</TD>
<TD width="234" height="88"><B>Non Mainframe Services</B><BR>
<INPUT TYPE = Checkbox NAME = "CLAIMS" VALUE="CLAIMS">CLAIMS<BR>
<INPUT TYPE = Checkbox NAME = "CUMULUS" VALUE="CUMULUS">CUMULUS<BR>
<INPUT TYPE = Checkbox NAME = "GMX" VALUE="GMX">GMX<BR>
<INPUT TYPE = Checkbox NAME = "SIERRA" VALUE="SIERRA">SIERRA<BR>
<INPUT TYPE = Checkbox NAME = "ST400" VALUE="ST400">ST400<BR>
<INPUT TYPE = Checkbox NAME = "TRADER2" VALUE="TRADER2">TRADER2<BR>
<BR>
</TD>
<TD width="153" height="87"><B>US Connectivity</B><BR>
<INPUT TYPE = Checkbox NAME = "ABACIS" VALUE="ABACIS">ABACIS<BR>
<INPUT TYPE = Checkbox NAME = "BAMTRAC" VALUE="BAMTRAC">BAMTRAC<BR><BR>
<BR>
<BR>
<BR>
<BR>
</TABLE>
<Body onLoad="setfocus()" bgcolor="#FFFFFF">
<%
dim first
dim last
dim first1
dim last1
dim dept
dim branch
dim signoff
dim GBS
dim VM
dim CYGNA
dim CAVIEW
dim VPS
dim CLAIMS
dim CUMULUS
dim GMX
dim SIERRA
dim ST400
dim TRADER2
dim ABACIS
dim BAMTRAC
dim Comments
first=Request.Form("first"
last=Request.Form("last"
first1=Request.Form("first1"
last1=Request.Form("last1"
dept=Request.Form("dept"
branch=Request.Form("branch"
signoff=Request.Form("signoff"
GBS=Request.Form("GBS"
VM=Request.Form("VM"
CYGNA=Request.Form("CYGNA"
CAVIEW=Request.Form("CAVIEW"
VPS=Request.Form("VPS"
CLAIMS=Request.Form("CLAIMS"
CUMULUS=Request.Form("CUMULUS"
GMX=Request.Form("GMX"
SIERRA=Request.Form("SIERRA"
ST400=Request.Form("ST400"
TRADER2=Request.Form("TRADER2"
ABACIS=Request.Form("ABACIS"
BAMTRAC=Request.Form("BAMTRAC"
Comments=Request.Form("Comments"
If first <> "" then
Rec_Save
End If
Function Rec_Save()
Dim f
Dim conn
Dim RecSet
Dim Recordsaffected
Dim rs
Dim x
Dim BCIP
Dim adOpenStatic
Dim rsName
set conn=Server.CreateObject ("ADODB.Connection"
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\inetpub\
conn.Execute "INSERT INTO BCResults ([Call_Taken_By_First_Name],[Last_Name],[Callers_FName],[Callers_LName],[Department],[Branch],[Signoff_Time],[GBS],[VM],[CYGNA],[CAVIEW],[VPS],[CLAIMS],[CUMULUS],[GMX],[SIERRA],[ST400],[TRADER2],[ABACIS],[BAMTRAC],Comments) values ( '" & _
first & "','" _
& last & "','" _
& first1 & "','" _
& last1 & "','" _
& dept & "','" _
& branch & "','" _
& signoff & "','" _
& GBS & "','" _
& VM & "','" _
& CYGNA & "','" _
& CAVIEW & "','" _
& VPS & "','" _
& CLAIMS & "','" _
& CUMULUS & "','" _
& GMX & "','" _
& SIERRA & "','" _
& ST400 & "','" _
& TRADER2 & "','" _
& ABACIS & "','" _
& BAMTRAC & "','" _
& Comments & "')"
set rs = Server.CreateObject("ADODB.recordset"
rs.Open "SELECT * from BCResults ORDER BY Results_Id DESC", conn, adOpenStatic
%>
<%rs.MoveFirst
%>
<%
response.write("<center><h2><font color=red><U>Croydon INC Business Continuity Test</h2></center></U></font>"
%>
<%
response.write("<center><h2><font color=red><U>Thankyou for your response</h2></center></U></font>"
%>
<table border="1" width="50%" bgcolor="#fff5ee" align="center">
<tr>
<% for each x in rs.fields
response.write("<th valign='center' bgcolor='#bOc4de'>" & x.name & "</th>"
%>
<td><bgcolor="#003399"><center><%Response.Write(x.value)%></center>
<tr>
<% next%>
</tr>
<TABLE bgcolor="#fff5ee" align="center">
<TR>
<BR>
<BR>
<form>
<input type='button' value='Close this Window' onClick='window.close()'>
</form>
</TR>
</TABLE>
<%
rs.close
conn.close
response.end
End function
%>
<center><font color=Red><H2><U>INC Business Continuity</U></font></H2></center>
<FORM name="userform1"
action="BC_Results_copy(1).asp"
method=post>
<table height="487">
<tr>
<TD WIDTH=150 VALIGN=TOP ALIGN="CENTER" BGCOLOR="#99FFFF" height="483">
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<applet code="fphover.class" codebase="../" width="150" height="24">
<param name="hovercolor" value="#0000FF">
<param name="textcolor" value="#FFFFFF">
<param name="text" value="Display Results">
<param name="color" value="#FF0000">
<param name="effect" value="glow">
<param name="url" valuetype="ref"
</applet>
<td valign=top width=629 height="483">
<table width="400" border="0" cellspacing="0" cellpadding="0">
<TR>
</td>
</tr>
</table>
<table valign=center width="632" border="0" cellspacing="0" cellpadding="0" height="482">
<tr>
<TD BGCOLOR="#99FFFF" height="482">
<B>
<FONT FACE="arial,helvetica,sansserif" SIZE="3">
<Font color=Red><U><center><H2>Branch Test Results.</center></H2></U></Font>
</font>
<Script>
var mydate = new Date()
var monthday = mydate.getDate()
var month = mydate.getMonth() + 1
var day = mydate.getDay()
var year = mydate.getYear()
document.write("<DIV ALIGN=right>" + "<BR>"
document.write("<U><font color = Red>Today's date is: </U></font>" + monthday + "-" + month + "-" + year + "</DIV>" )
</Script>
<BR>
<BR>
<P>
<FONT FACE="arial,helvetica,sansserif" SIZE="3"><B>
Primary Contact:<INPUT TYPE=text SIZE=50 NAME="first"</B><BR>
Work:
<INPUT TYPE=text SIZE=20 Name="work1" <BR>
Home:<INPUT TYPE=text SIZE=20 Name="home1"><BR>
Mobile No: <INPUT TYPE=text SIZE=20 Name="mobile1" <BR>
Pager:<INPUT TYPE=text SIZE=20 Name="pager1" <BR>
<P>
<FONT FACE="arial,helvetica,sansserif" SIZE="3"><B>
Secondary Contact:<INPUT TYPE=text SIZE=50 NAME="second"</B><BR>
Work:
<INPUT TYPE=text SIZE=20 Name="work" <BR>
Home:<INPUT TYPE=text SIZE=20 Name="home"><BR>
Mobile No:
<INPUT TYPE=text SIZE=20 Name="mobile" <BR>Pager: <INPUT TYPE=text SIZE=20 Name="pager" <BR>
<P>
Department Name: <INPUT TYPE=text SIZE=20 Name="dept" onChange="dept2(userform1.dept)">
<P>
<BR>
<P>
<FONT FACE="arial,helvetica,sansserif" SIZE="3"><B>
Branch Signed off at:: <input type="text" name="signoff" size="20" onKeyUp="TimeFormat(this,this.value,event,false)" onChange="TimeFormat(this,this.value,event,true)"></b></font>
<P>
<BR>
<B><U><font color = Red>Select Services Tested:</font></U></B><BR>
<TABLE width="500" height="91">
<TR>
<TD width="129" height="87"><B>Mainframe</B><BR>
<INPUT TYPE = Checkbox NAME = "GBS" VALUE="GBS">GBS<BR>
<INPUT TYPE = Checkbox NAME = "VM" VALUE="VM">VM<BR>
<INPUT TYPE = Checkbox NAME = "CYGNA" VALUE="CYGNA">CYGNA<BR>
<INPUT TYPE = Checkbox NAME = "CAVIEW" VALUE="CAVIEW">CAVIEW<BR>
<INPUT TYPE = Checkbox NAME = "VPS" VALUE="VPS">VPS<BR>
<BR>
<BR>
</TD>
<TD width="234" height="88"><B>Non Mainframe Services</B><BR>
<INPUT TYPE = Checkbox NAME = "CLAIMS" VALUE="CLAIMS">CLAIMS<BR>
<INPUT TYPE = Checkbox NAME = "CUMULUS" VALUE="CUMULUS">CUMULUS<BR>
<INPUT TYPE = Checkbox NAME = "GMX" VALUE="GMX">GMX<BR>
<INPUT TYPE = Checkbox NAME = "SIERRA" VALUE="SIERRA">SIERRA<BR>
<INPUT TYPE = Checkbox NAME = "ST400" VALUE="ST400">ST400<BR>
<INPUT TYPE = Checkbox NAME = "TRADER2" VALUE="TRADER2">TRADER2<BR>
<BR>
</TD>
<TD width="153" height="87"><B>US Connectivity</B><BR>
<INPUT TYPE = Checkbox NAME = "ABACIS" VALUE="ABACIS">ABACIS<BR>
<INPUT TYPE = Checkbox NAME = "BAMTRAC" VALUE="BAMTRAC">BAMTRAC<BR><BR>
<BR>
<BR>
<BR>
<BR>
</TABLE>
<B><U><font color = Red>Services previously advised that were to be tested:</font></U></B><BR>
<TABLE width="500" height="91">
<TR>
<TD width="129" height="87"><B>Mainframe</B><BR>
<INPUT TYPE = Checkbox NAME = "GBS" VALUE="GBS">GBS<BR>
<INPUT TYPE = Checkbox NAME = "VM" VALUE="VM">VM<BR>
<INPUT TYPE = Checkbox NAME = "CYGNA" VALUE="CYGNA">CYGNA<BR>
<INPUT TYPE = Checkbox NAME = "CAVIEW" VALUE="CAVIEW">CAVIEW<BR>
<INPUT TYPE = Checkbox NAME = "VPS" VALUE="VPS">VPS<BR>
<BR>
<BR>
</TD>
<TD width="234" height="88"><B>Non Mainframe Services</B><BR>
<INPUT TYPE = Checkbox NAME = "CLAIMS" VALUE="CLAIMS">CLAIMS<BR>
<INPUT TYPE = Checkbox NAME = "CUMULUS" VALUE="CUMULUS">CUMULUS<BR>
<INPUT TYPE = Checkbox NAME = "GMX" VALUE="GMX">GMX<BR>
<INPUT TYPE = Checkbox NAME = "SIERRA" VALUE="SIERRA">SIERRA<BR>
<INPUT TYPE = Checkbox NAME = "ST400" VALUE="ST400">ST400<BR>
<INPUT TYPE = Checkbox NAME = "TRADER2" VALUE="TRADER2">TRADER2<BR>
<BR>
</TD>
<TD width="153" height="87"><B>US Connectivity</B><BR>
<INPUT TYPE = Checkbox NAME = "ABACIS" VALUE="ABACIS">ABACIS<BR>
<INPUT TYPE = Checkbox NAME = "BAMTRAC" VALUE="BAMTRAC">BAMTRAC<BR><BR>
<BR>
<BR>
<BR>
<BR>
</TABLE>