Something's odd. The code should only be 80 lines long?
inserted into Frontpage page meta tags etc.
===========================================
<%@ Language=VBScript %>
<% Option Explicit %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-
1252">
<meta http-equiv="Content-Language" content="en-us">
<title>Selectbox</title>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<style fprolloverstyle>A:hover {color: red; font-weight: bold}
</style>
<meta name="Microsoft Theme" content="tp-or12 1110">
<meta name="Microsoft Border" content="tlb, default">
</head>
<BODY>
<%
Dim sConnectionString
sConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" &
Server.MapPath("\fpdb\kelvindb.mdb")
%>
<%
'FOR DEBUGGING
Dim field
for each field in Request.Form
Response.Write "<li>" & field & ": " & Request.Form
(field) & "</li>"
next
'END DEBUGGING
%>
<form method=Post action=SelectBoxes.asp>
<% call GetSelectBoxes%>
<br>
<input type=submit value=Go>
</form>
</BODY>
</HTML>
<%
Sub GetSelectBoxes()
Dim oCN
Dim oRS
Dim sSQL
sSQL="SELECT UniqueID, Component_Type, Price, Component_Name
FROM Parts_Table ORDER BY Component_Type, Component_Name,"
Set oCN=CreateObject("ADODB.Connection")
oCN.Open sConnectionString
Set oRS=oCN.Execute(sSQL)
if not oRS.EOF then
Dim sCurrentBox
Dim bIsFirst
bIsFirst=true
Do While not oRS.EOF
'OK, we have our recordset.
'Let's go through each "thingy" and create a box for
it.
if sCurrentBox <> oRS.Fields("Component_Type") then
'it's time for a new select box.
'but first, let's close the last box.
if bIsFirst=false then
'make sure it's not the first select box.
Response.Write "</select><br>" & vbCrLf
else
bIsFirst=false
end if
'OK, create the new box.
sCurrentBox=oRS.Fields("Component_Type")
Response.Write sCurrentBox & ": <select
name=""" & sCurrentBox & """>" & vbCrLf
end if
'Now add the individual item
Response.Write vbTab & "<option value=""" &
oRS.Fields("UniqueID") & """>" & _
trim(oRS.Fields
("Component_Name")) & _
"</option>" & vbCrLf
oRS.MoveNext
Loop
'Let's close that last one
Response.Write "</select>" & vbCrLf
end if
Set oRS=nothing
oCN.Close
Set oCN=nothing
End Sub
%>