I am attempting to use this disconnected recordset in client side script so that when a department is chosen from a drop down menu another menu will then display all employees from a database whose area match the area chosen. All this information is information that is with in the recordset. Here is a copy of my code. I am using FrontPage as my editor so I have few luxuries.
<SCRIPT LANGUAGE="VBScript" >
<!-- #include file="adovbs.inc" --%>
<%
''''''''''''''''''''''''''''''''server side rs call '''''''''''''''''''''''''''''''''''''''''''''''
'retrieve rs's for the mill's and the areas within the mills
'open a connection to the database
dim cn
dim ConnectionString
set cn = server.createobject("ADODB.Connection"

ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\InetPub\
one audits.mdb"
cn.open ConnectionString
'open a recordset of Mill and area
dim MillAreaCrossRefSQL
dim rsMillAreaCrossRef
'Write the Query Statement based on the area description
MillAreaCrossRefSQL = "SELECT * From Mill, Area, MillAreaCrossRef Where Mill.MID = MillAreaCrossRef.MID " _
& "And Area.AID = MillAreaCrossRef.AID;"
'create recordsets
set rsMillAreaCrossRef = server.createobject("ADODB.RecordSet"
'Open rsMillAreaCrossRef so that it
rsMillAreaCrossRef.CursorLocation = adLockBatchOptimistic
rsMillAreaCrossRef.LockType = adUseClient
rsMillAreaCrossRef.open MillAreaCrossRefSQL, cn
'create a disconnected recordset
Set rsMillAreaCrossRef.ActiveConnection = Nothing
cn.close
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
%>
</SCRIPT>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Cold Mill Quality Audit Menu</title>
<script LANGUAGE="JavaScript">
<!-- Begin
function formHandler(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}
function formHandler2(form2){
var URL = document.form2.site2.options[document.form2.site2.selectedIndex].value;
window.location.href = URL;
}
function formHandler3(form3){
var URL = document.form3.site3.options[document.form3.site3.selectedIndex].value;
window.location.href = URL;
}
function formHandler4(form4){
var URL = document.form4.site4.options[document.form4.site4.selectedIndex].value;
window.location.href = URL;
}
// End -->
</script>
<Script Language = "VBscript">
Sub Mill()
alert <% response.write NumberOfRecords %>
set frmAudit = document.forms(0)
set frmForm2 = document.forms(1)
dim Joseph
do while not rsMillAreaCrossRef.eof
dim MIDMessage
MIDMessage = <% response.write rsmillareaCrossref("MID"
%>
MsgBox MIDMessage
rsMillAreaCrossRef.movenext
loop
''''''''display information in drop down menu based on selection''''''''''''''''''''''''''''''''''''''''''''''
dim i
dim Length
i = o
'determine the length of drop down menu
Length = frmAudit.site.Length
'delete all items in the drop down menus
For i = 1 TO Length -1
frmAudit.site.Remove 1
frmForm2.site2.remove 1
Next
'dependant upon the selected index display the proper items in the site drop down menu
dim ItemSelected
ItemSelected = frmAudit.MillIdentification.Value
'determine the length of the record
dim rsLength
rsLength = rsMillAreaCrossRef.recordcount
'Determine the mill of each record
rsMillAreaCrossRef.MoveFirst
do while NOT rsMillAreaCrossRef.EOF
MillID = rsMillAreaCrossRef("Mill.MID"
Select Case MillID
Case 1
response.write "Mill ID = " & MillID & "<br>" & "Mill = " & rsMillAreaCrossRef("Mill.Mill"

& "<br>"
'place the data into the drop down menu based on selection
If ItemSelected = MillID Then
alert "IF"
Area = rsMillAreaCrossRef("Area Description"

alert area
Value = rsMillAreaCrossRef("Area.AID"

alert value
Set Element = document.createElement("OPTION"

Element.Text = Area
Element.Value = Value
frmAudit.Site.add Element
Set Element = document.createElement("OPTION"

Element.Text = Area
Element.Value = Value
frmForm2.Site2.add Element
End If
Case 2
'place the data into the drop down menu based on selection
If ItemSelected = MillID Then
Area = rsMillAreaCrossRef("Area Description"

Value = rsMillAreaCrossRef("Area.AID"

Set Element = document.createElement("OPTION"

Element.Text = Area
Element.Value = Value
frmAudit.Site.add Element
Set Element = document.createElement("OPTION"

Element.Text = Area
Element.Value = Value
frmForm2.Site2.add Element
End If
Case 3
'place the data into the drop down menu based on selection
If ItemSelected = MillID Then
Area = rsMillAreaCrossRef("Area Description"

Value = rsMillAreaCrossRef("Area.AID"

Set Element = document.createElement("OPTION"

Element.Text = Area
Element.Value = Value
frmAudit.Site.add Element
Set Element = document.createElement("OPTION"

Element.Text = Area
Element.Value = Value
frmForm2.Site2.add Element
End If
Case 4
'place the data into the drop down menu based on selection
If ItemSelected = MillID Then
Area = rsMillAreaCrossRef("Area Description"

Value = rsMillAreaCrossRef("Area.AID"

Set Element = document.createElement("OPTION"

Element.Text = Area
Element.Value = Value
frmAudit.Site.add Element
Set Element = document.createElement("OPTION"

Element.Text = Area
Element.Value = Value
frmForm2.Site2.add Element
End If
End Select
rsMillAreaCrossRef.MoveNext
response.write rsMillAreaCrossRef.Status
Loop
End Sub
</Script>
<body language="vbscript" onload="Mill()">
<h1><font face="Arial" color="#0000FF">Cold Mill Quality Audit Menu</font></h1>
<hr align="center">
<div align="center" style="width: 753; height: 130">
<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
function FrontPage_Form1_Validator(theForm)
{
if (theForm.site.selectedIndex == 0)
{
alert("The first \"site\" option is not a valid selection. Please choose one of the other options."

;
theForm.site.focus();
return (false);
}
return (true);
}
//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" name="FrontPage_Form1" Action="
onsubmit="return FrontPage_Form1_Validator(this)">
<p align="left"><font face="Arial">
<div align="left">
<table border="0" width="25%" height="35">
<tr>
<td width="776" height="35" align="center">
<p align="left"><b>Mill ID</b></p>
</td>
<td width="776" height="35" align="center">
<p align="left"><b>Team</b></p>
</td>
</tr>
<tr>
<td width="776" height="35" align="center">
<p align="left"><select size="1" name="MillIdentification" onChange="Mill()">
<option value="1">CM1</option>
<option value="2">CM2</option>
<option value="3">CM3</option>
<option value="4">RS</option>
</select></p>
</td>
<td width="776" height="35" align="center">
<p align="left"><select size="1" name="Team">
<option value="1">A</option>
<option value="2">B</option>
<option value="3">C</option>
<option value="4">D</option>
</select></p>
</td>
</tr>
</table>
</div>
<h4 align="left">Go to audit form:</h4>
<h4 align="left"><!--webbot bot="Validation" B-Disallow-First-Item="TRUE" --><select name="site" size="1">
<option value>Select audit form and click go.... </option>
<option value="1">Prep</option> %>
<option value="2">Crane</option>
<option value="3">Entry</option>
<option value="4">Pulpit</option>
<option value="5">Band/Weigh</option>
<option value="6">Fluids</option>
<option value="8">Inspection</option>
</select><input type="submit" value="Go" name="B1">
</h4>
</font>
</form>
</div>
<% 'response.write rsMillAreaCrossRef("Area Description"

%>
<h4><font face="Arial">Review audit completion rate report:</font></h4>
<form name="form2" Method="Post" Action="
<p><font face="Arial"><select name="site2" size="1">
<option value>Select report and click go.... </option>
<option value="1">Prep</option>
<option value="2">Crane</option>
<option value="3">Mill Entry</option>
<option value="4">Pulpit</option>
<option value="5">Band/Weigh</option>
<option value="6">Fluids</option>
<option value="7">Inspection</option>
</select> <input type="submit" value="Go!">
<input type="hidden" name="Mill" value="1">
</form>
<h4><font face="Arial">Review audit conformance summary:</font></h4>
<form name="form3">
<p><font face="Arial"><select name="site3" size="1">
<option value>Select report and click go.... </option>
<option value="/Old_Reports/Cast_Bay/CB_conformance_summary_00_09.asp">Cast Bay - Sep/Oct 2000</option>
<option value="/Old_Reports/Melt_Bay/MB_conformance_summary_00_09.asp">Melt Bay - Sep/Oct 2000</option>
<option value="/Old_Reports/Scrap_Bay/SB_conformance_summary_00_09.asp">Scrap Bay - Sep/Oct 2000</option>
<option value="/Old_Reports/SWARF/SW_conformance_summary_00_09.asp">SWARF - Sep/Oct 2000</option>
</select> <input type="button" value="Go!" onClick="javascript:formHandler3(this)"> </font> </p>
</form>
<h4><font face="Arial">Review detailed audit responses:</font></h4>
<form name="form4">
<p><font face="Arial"><select name="site4" size="1">
<option value>Select report and click go.... </option>
<option value="/Current_Reports/CastBay/CB_conformance_detail.asp">Cast Bay - current month</option>
<option value="/Current_Reports/MeltBay/MB_conformance_detail.asp">Melt Bay - current month</option>
<option value="/Current_Reports/ScrapBay/SB_conformance_detail.asp">Scrap Bay - current month</option>
<option value="/Current_Reports/SWARF/SW_conformance_detail.asp">SWARF - current month</option>
<option value>_______________________________</option>
<option value="/Old_Reports/Cast_Bay/CB_conformance_detail_00_09.htm">Cast Bay - Sep/Oct 2000</option>
<option value="/Old_Reports/Melt_Bay/MB_conformance_detail_00_09.htm">Melt Bay - Sep/Oct 2000</option>
<option value="/Old_Reports/Scrap_Bay/SB_conformance_detail_00_09.htm">Scrap Bay - Sep/Oct 2000</option>
<option value="/Old_Reports/SWARF/SW_conformance_detail_00_09.htm">SWARF - Sep/Oct 2000</option>
</select> <input type="button" value="Go!" onClick="javascript:formHandler4(this)"> </font> </p>
</form>
<p><font face="Arial Narrow"><a href="tvertrees/crid.asp#web2">Return to Coldmill Home
Page</a></font></p>
</font>
<hr align="center">
<div align="center" style="width: 753; height: 130">
</body>
</html>
The present error is:
Type mismatch: 'rsmillareaCrossref'
line 86
Line 86 is in red
I know this is a lot of information that does not neccessarily pertain to the problem, but I felt you should know what I am attempting. At present I am just attempting to determine different areas dependant upon the department that is clicked (mill or rs). Any thoughts?