Link to home
Start Free TrialLog in
Avatar of ijenkins
ijenkins

asked on

ASP - Multiple Categories With Drop Downs

I have a database for storing company information.  One key ingredient is the ability to categorize the data.  I have four levels of categorization:

Category
Sub-Category
Class
Sub-Class

The sub category depends on the category as the class depends on the sub category and the sub class depends on the class.  I envision using 4 drop downs initially with only the category drop down visible.  Once the user selects a category the sub-category will be shown and populated according to what was selected in category.  Once a user selects a sub-category the class combo will be visible and populated according to the sub-category value and so on.  Any suggestions on how to do this from within the bounds of asp.

This would be for category.  Sub category would be the same but would have the value of category in the sql where statement instead of -1.  It is also would not become visible until the category is selected.  I need to do this without submitting the form.

<select name="category">
<%
sql = "Select * from cat where cat_dep = -1"
set rs = cn.execute(sql)
Do While Not rs.eof
%>

<option value="<%=rs("cat_id")%>"><%=rs("cat_name")%></option>

<%
rs.movenext
loop
%>

</select>

ASKER CERTIFIED SOLUTION
Avatar of fritz_the_blank
fritz_the_blank
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MaxOvrdrv2
MaxOvrdrv2

ok.. then hows this:

we have the 4 drop-downs in the same page, but within if statements that check for it being enabled:

ThePage.asp
<%
LastSelected=Request.QueryString("LastSelected")
Category=Request.QueryString("CategorySelected")
SubCateg=Request.QueryString("SubCategorySelected")
Class=Request.QueryString("ClassSelected")
SubClass=Request.QueryString("SubClassSelected")
%>
<select name="category" OnChange="JavaScript:ReLoad('Cat')">
<%
sql = "Select * from cat where cat_dep = -1"
set rs = cn.execute(sql)
Do While Not rs.eof
%>

<option value="<%=rs("cat_id")%>"<%if rs("cat_id")=Category then%> SELECTED <%end if%>><%=rs("cat_name")%></option>

<%
rs.movenext
loop
%>

</select>
<%

if LastSelected="Category" OR IsNull(Catgeory)=FALSE then
%>
<select name="SubCategory" OnChange="JavaScript:ReLoad('SubCat')">
<%
sql = "Select * from subcat where subcat_dep = -1"
set rs = cn.execute(sql)
Do While Not rs.eof
%>

<option value="<%=rs("subcat_id")%>"<%if rs("subcat_id")=SubCateg then%> SELECTED <%end if%>><%=rs("subcat_name")%></option>

<%
rs.movenext
loop
%>
</select>
<%
end if
if LastSelected="SubCat" OR IsNull(SubCateg)=FALSE then
%>
and so on for each menu... now... here is the function Reload:

<script language="JavaScript">
<!--
function ReLoad(strOptionName)
{
document.location="ThePage.asp?LastSelected=" + strOptionName + "&Category=" + document.category.value + "&SubCateg=" + document.SubCategory.value + "&Class=" + document.Class.value + "&SubClass=" + document.SubClass.value;
}

hope this helps!

MaxOvrdrv2
Thats alot of code to handle, try this, shorter version....my version is for only 2 boxes but all you would have to do it copy and paste, rename for yours to work! just copy and past this into your page!

<%
set conn = server.createobject("adodb.connection")
conn.open ole_STRING ' this would be your connection string
set objRS = createobject("ADODB.Recordset")
objRS.Open "SELECT * FROM dbo.agents order by agentname ASC", ole_STRING ' this would be your connection string
hey = Request.form("cboPrimary")
    if Request("cboPrimary") = "" then
        lPrimary = objRS("agentid")
    else
        lPrimary = clng(Request("cboPrimary"))          
         
    end if
%>

<form name="form2" method="post" action="search360.asp">
<select name=cboPrimary size=1 onChange="form2.submit();">
<% if hey = "" then %>
<option value="" selected>[Select an agent]</option>
<% end if %>
<%
while not objRS.EOF
lID = clng(objRS("agentid"))
%>
<option value="<%=lID%>" <% if lPrimary = lID and hey <> "" then Response.Write " SELECTED"%>>
<%=objRS("agentname")%>
<% objRS.MoveNext
wend
objRS.Close
objRS.Open "SELECT * FROM dbo.properties WHERE agentid=" & lPrimary, MM_rentole_STRING %>
</option>
</select>
</form>

<form name="form3" action="/360tours/searchquery.asp">
<select name=fid size=1">
<% if hey = "" then %>
<option value="" selected></option>
<% end if %>
<% while not objRS.EOF
if ISNull(objRS("active")) or objRS("active") = "" then    
lID = clng(objRS("propertyid"))
%>
<option value="<%=lID%>">
<%= objRS("propertyname") %>
<%
end if
%>                              
<% objRS.MoveNext
wend
objRS.Close
set objRS.ActiveConnection = nothing
set objRS = nothing
%>
</option>
</select>                    
</form>
Both of those solutions require submitting the form, and that is what ijenkins wants to avoid.

Fritz the Blank
I'm not 100% does this solve the problem, but at least it is another view. Idea is this: when you select something from the dropdown-list, you can always avoid sending the form by going to another page - more precisely, going to the same page but with different parameters.

You must use both JavaScript and ASP here. Since values come from a database its more easier you think :)

JavaScript-function looks like this:

function changePage(myParam,whichlistbox)
{
newpage = document.location.href '&'+whichlistbox+'='+myParam;
document.location.href='newpage;
}

In the first listbox:
<select name="mylistbox" OnChange="changePage(this.options[this.selectedIndex].value, 'list1')">
.......
</select>

So, when you select something from the 1st listbox, let's say its value is 5. It calls the function with: (5,'list1') -> page is now: page.asp?foo=bar&list1=5

And below this listbox you have the 2nd listbox. If nothing is selected from the 1st listbox, parameter list1 is empty. Which leads to this:

<% IF Request.Querystring("list1") <> "" THEN
....do your SQL here and search subcategories which are below the categoryid 5....
END IF %>

2nd listbox is exactly same the 1st one, except it calls the function with 'list2'.

<select name="mylistbox2" OnChange="changePage(this.options[this.selectedIndex].value, 'list2')">
.......
</select>

Now when you select something from the 2nd listbox with value lets say 3, page is now: page.asp?foo=bar&list1=5&list2=3

And below 2nd listbox is the 3rd listbox, and you do the same thing. IF parameter list2 is not empty, then go and search the values.

This example should fill your needs if I understood them right. Only problem: If after selecting something from the 1st listbox you change its value again, the javascript function adds another "list1" parameter to the URL. So you can prevent this by:

1) Do a check to javascript function: if the current page includes the string "list1=" already, remove it.
2) Check everytime a page is loaded with ASP is some parameter twice. With Instr function that is very easy, and you can either delete the previous parameter from the string or replace the current value with the new one.

Also if you don't have any parameters added already, after selecting from the 1st listbox your page will be:
page.asp&list1=5
--> this causes error, so you can use a parameter-with-no-use-but-to-make-things-easier:
page.asp?something=some_value
--> then you can add parameters with no errors.

Phew, a long post.

-EEK
R0AARR, since this forum doesn't seem to have edit post -option...this row:
newpage = document.location.href '&'+whichlistbox+'='+myParam;

should be:
newpage = document.location.href +'&'+whichlistbox+'='+myParam;
my solution does just that.. it simply calls itself...

MaxOvrdrv2
Hi ijenkins,

Basically, you have two choices here if you do NOT want to submit the page after each dropdown selection:

     1.  Read all possible choices from DB into Javascript arrays.  Fritz gave you this option in his first post.

     2.  Use XMLHTTP to query the DB via the Web server after each selection is made.  The page is NOT submitted.  You simply have an ASP that returns ONLY the data needed for the "sub" dropdown.  

If you would like to use Option #2, let me know and I will post a complete example.

Best Regards,
>apollois<
I was also wondering about having each select list in a frame that submits to the next frame? Once all is done, it passes the values to a hidden field in the final frame...

Messy, but it might work.

Fritz the Blank
fritz_the_blank,

>>>I was also wondering about having each select list in a frame that submits to the next frame?

XMLHTTP is much cleaner.

Best Regards,
>apollois<
No doubt, but is it cross browser compatible?

Fritz the Blank
fritz_the_blank,

>>>No doubt, but is it cross browser compatible?

Good question.  I initially thought it was, but after checking it turns out that currently it is mostly an MS IE feature.  Netscape Nav uses something called "XMLHttpRequest" which is very similar.  But it has limited documentation at this time.  Here is the NN ref if anyone is interested:
http://www.mozilla.org/xmlextras/

So, as far as I can tell, no other browsers offers 100% compatibility with XMLHTTP at this time.

Best Regards,
>apollois<
That's what I understood, so I haven't been working with that much. I think I'm going to wait to see how this plays out before I invest much time into it.

Fritz the Blank
Avatar of ijenkins

ASKER

apollis,
what answer is more complicated, the javascript solution or the xmlhttp solution.  post the xmlhttp if it isn't that much trouble.
ijenkins,

OK, you realize that it will only work in MS Internet Explorer, right?
And you still want it?

Best Regards,
>apollois<
forget it.  I am toying with using design time controls in interdev.  I am at the point where I need to make the magic happen with the form manager.  Any on know what I should do?

here is what i have

Recordset1 (selects all categories)
Recordset2 (selects all subcategories)
Recordset3 (selects all classes)
Recordset4 (selects all subclasses)

listbox1 (set to contain all categories)
listbox2 (set to contain subcategories according to listbox1 selection)
listbox3 (set to contain classes according to listbox2 selection)
listbox4 (set to contain subclasses according to listbox3 selection)

formmanager1  - here is where I am confused.  What modes should I create and what should they do.  I am assuming we can deal with the onchange event and then alter the query for each recordset.
ijenkins,

>>> I am toying with using design time controls in interdev.

Don't waste your time.  You're better off going with VS.net if you want this type of automation.

But if you really want to use VID, then you'll be better off in the VID TA:
https://www.experts-exchange.com/Web/WebDevSoftware/Visual_Interdev/


AT this point, if you don't have too much data, I'd recommend going with the javascript arrays that Frtiz suggested.  All you have to add is some ASP code to load the JS arrays.

Best Regards,
>apollois<
It is a pain to do it that way, but I have had good success as long as there are not too many items in each list. And the solution works with all browsers.

Fritz the Blank
FRITZ the BLANK,
If I use your method I need to have all 4 boxes coming from a database, not hard coded.  How would you modify your code to accomdate this.  I am using ASP.
What I do is use server-side ASP code to generate the arrays. I create a recordset for the table that holds the values, and then I set up a loop that uses Response.write, a counter that gets incremented, and the recordset to write out the arrays.

Fritz the Blank

Fritz the Blank,
I've been using your code to do what I want.  Everything works fine for the first selection.  However, when I perform the second selection I run into a problem.  It does not work.  I just get a blank drop down except for selection 1, 2, and 3.  Here is what I have set up.  How can the rest of your code be modified to accomodate my code.  I also need to add a 4th drop down (sub-class) dependent on the 3rd.  I have lised the array population code for the 4th as well.  Please help. ijenkins

--------------------
<%@ language=vbscript %>
<HTML><HEAD>
<%
'Establish database connection and recordset objects
set cn  = server.createobject("adodb.connection")
set rs  = server.createobject("adodb.recordset")

'SQL Server authentication via DSN on MONTCOSERVER
cn.connectionstring="DSN=?????;database=????;uid=????;pwd=????"
cn.open
%>


<%
'Start JavaScript
Response.write("<SCRIPT language=JavaScript>")
%>

<%
'Create arrays for sub-category
Response.write("var arrItems1 = new Array();")
Response.write("var arrItemsGrp1 = new Array();")

'Select all sub-categories
sql = "select * from cat where cat_type = 'sub-category'"
set rs = cn.execute(sql)
%>

<%
'Populate sub-category arrays
i=1
Do While Not rs.EOF
     Response.Write("arrItemsGrp1[" & i & "] = " & rs("cat_dep") & ";")
     Response.write("arrItems1[" & i & "] = " & chr(34) & rs("cat_desc") & chr(34) & ";")
rs.MoveNext
i=i+1
loop
%>

<%
'Create arrays for class
Response.write("var arrItems2 = new Array();")
Response.write("var arrItemsGrp2 = new Array();")

'Select all classes
sql = "select * from cat where cat_type = 'sub-category'"
set rs = cn.execute(sql)
%>

<%
'Populate class arrays
i=1
Do While Not rs.EOF
     Response.Write("arrItemsGrp2[" & i & "] = " & rs("cat_dep") & ";")
     Response.write("arrItems2[" & i & "] = " & chr(34) & rs("cat_desc") & chr(34) & ";")
rs.MoveNext
i=i+1
loop
%>

<%
'Create arrays for sub-class
Response.write("var arrItems3 = new Array();")
Response.write("var arrItemsGrp3 = new Array();")

'Select all sub-classes
sql = "select * from cat where cat_type = 'sub-class'"
set rs = cn.execute(sql)
%>

<%
'Populate sub-class arrays
i=1
Do While Not rs.EOF
     Response.Write("arrItemsGrp3[" & i & "] = " & rs("cat_dep") & ";")
     Response.write("arrItems3[" & i & "] = " & chr(34) & rs("cat_desc") & chr(34) & ";")
rs.MoveNext
i=i+1
loop
%>
.....the rest of your code
Fritz,
I think I know why it is not working.  The first drop down is populated with the category data.  (value=cat_id, name=cat_desc)

The second drop down is populated with the sub-category information.  (where cat_dep = cat_id of category)

The third drop is populated with the class information. (where cat dep = cat_dep of sub-category)  THIS WON'T work.  It needs to be cat_dep = cat_id of sub-category.  I can't do that because it then messes up the link for the first and second drop down.
Here is a different model that makes it a little easier to generate the arrays:

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
<SCRIPT LANGUAGE=javascript>
<!--

// Populate an array with all of the models from the different
// manufactures in the order that the manufacturers appear in the
// drop-down list. In this example, I'll use Ford and Toyota
// of course, you'll want to generate these via server-side vbscript

models = new Array(3)
models [0] = new Array(1)
models [1]= new Array(3)
models [2] = new Array(4)

//Empty (0)
models [0][0] = " "

//Ford  (1)
models [1] [0] = "Tempo"
models [1] [1] = "Tauras"
models [1] [2] = "Windstar"

//Toyota   (2)
models [2][0] = "Tercel"
models [2][1] = "Corolla"
models [2][2] = "Camry"
models [2][3] = "Avalon"


//============================================

//Next, we create a function to fill the second drop down from
//the array based on the item selected in the first drop down.

function FillList()
{
var num=document.formname.manufacturer.selectedIndex
var boxlength = 0

document.formname.models.selectedIndex = 0
for ( ctr=0;ctr<models[num].length;ctr++)
 {
 boxlength++;
 document.formname.models.options[ctr] = new Option(models[num] [ctr], models[num][ctr]);
 }

document.formname.models.length = boxlength;
document.formname.models.options.length = boxlength;
document.formname.models.focus() ;

}


//-->
</SCRIPT>
</HEAD>
<BODY>
<FORM action="" method=post id=form1 name=formname>
<SELECT id=select1 name=manufacturer onChange="JavaScript:FillList()">
<OPTION value=""></OPTION>
<OPTION value=Ford >Ford</OPTION>
<OPTION value=Toyota>Toyota</OPTION>

</SELECT>

<p>
<SELECT id=select2 name=models>
<OPTION></OPTION>
</SELECT>

</FORM>
</BODY>
</HTML>


And here is an example of how I created the arrays dynamically server side with the above model--of course, you can't use this verbatim, but it should give you an idea of how I approached the problem.

<%@ Language = VBScript %>
<%Option Explicit%>
<%Call ExpiresNow()%>
<%Response.Buffer = True%>
<%'On Error Resume Next%>
<!-- #include file="adovbs.inc" -->
<!-- #include file="constants.inc" -->
<!-- #include file="styles.inc" -->

<%
call ExpiresNow()
call IsAuthorized()
%>

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
<script language="JavaScript" src="JavaScript/main.js"></script>
<%
dim ojbConnectionJavaScript, objRSJavaScript

if not IsObject("ojbConnectionJavaScript") then
      set ojbConnectionJavaScript=Server.CreateObject("ADODB.Connection")
      strConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;"_
                        + " Data Source= " & strDataPath & ";"_
                        + " Mode=Share Deny None;User Id=admin;PASSWORD=;"

      ojbConnectionJavaScript.ConnectionTimeout = 15
      ojbConnectionJavaScript.CommandTimeout =  10
      if ojbConnectionJavaScript.state = 0 then
            ojbConnectionJavaScript.Open strConnectString
      end if
end if

if not isObject("objRSJavaScript") then
      set objRSJavaScript=Server.CreateObject("ADODB.RecordSet")
end if
if objRSJavaScript.state <> 0 then
      objRSJavaScript.close
end if

Response.Write("<SCRIPT LANGUAGE=javascript>" & vbcrlf & "<!--" & vbcrlf)
dim strJavaSQL, numRecordCount, i

strJavaSQL = "select numRecordID, strDescription, strState from lu_FineRegion order by strState, strDescription"
objRSJavaScript.Open strJavaSQL,ojbConnectionJavaScript,adOpenKeyset,adLockOptimistic
numRecordCount = objRSJavaScript.RecordCount
Response.write("arrFine = new Array(" & numRecordCount*3 & ")" & vbcrlf)
for i =0 to numRecordCount - 1
      Response.Write("arrFine[" & i & ".1] = '" & objRSJavaScript("strState") & "'" & vbcrlf)
      Response.Write("arrFine[" & i & ".2] = '" & objRSJavaScript("numRecordID") & "'"  & vbcrlf)
      Response.Write("arrFine[" & i & ".3] = '" & objRSJavaScript("strDescription") & "'"  & vbcrlf)
      objRSJavaScript.movenext
next
objRSJavaScript.close

strJavaSQL = "select numRecordID, strDescription, strState from lu_CoarseRegion order by strState, strDescription"
objRSJavaScript.Open strJavaSQL,ojbConnectionJavaScript,adOpenKeyset,adLockOptimistic
numRecordCount = objRSJavaScript.RecordCount
Response.write("arrCoarse = new Array(" & numRecordCount*3 & ")" & vbcrlf)
for i =0 to numRecordCount - 1
      Response.Write("arrCoarse[" & i & ".1] = '" & objRSJavaScript("strState") & "'" & vbcrlf)
      Response.Write("arrCoarse[" & i & ".2] = '" & objRSJavaScript("numRecordID") & "'"  & vbcrlf)
      Response.Write("arrCoarse[" & i & ".3] = '" & objRSJavaScript("strDescription") & "'"  & vbcrlf)
      objRSJavaScript.movenext
next

if IsObject("objRSJavaScript") then
      if objRSJavaScript.state <> 0 then
            objRSJavaScript.close
      end if
      set objRSJavaScript = Nothing
end if
if IsObject("ojbConnectionJavaScript") then
      if ojbConnectionJavaScript.state <> 0 then
             ojbConnectionJavaScript.close
      end if
      set ojbConnectionJavaScript = Nothing
end if

Response.Write("//-->" & vbcrlf & "</SCRIPT>")
%>
<SCRIPT LANGUAGE=javascript>
<!--
function initPage()
{
      getImages();
      eval(document.form1.strAttachment1.focus());
}

function fillList(strState)
{
      var iLength, ctr
      
      iLength=document.form1.numFineRegion.length;
      document.form1.numFineRegion.selectedIndex = 0;
      for(i=iLength;i>0;i--){
            document.form1.numFineRegion.options[i] = null;
      }
      document.form1.numFineRegion.length = 0      
      
      var boxlength = 0
      var numIndex = 0
      var numItems = arrFine.length/3
      document.form1.numFineRegion.selectedIndex = 0
      for (ctr=0;ctr<numItems;ctr++){
            sState = eval("arrFine[" + ctr + ".1]")
            if(sState==strState){
                  boxlength++;
                  numIndex++;
                  strValue = eval("arrFine[" + ctr + ".2]")
                  strDispay =  eval("arrFine[" + ctr + ".3]")
                  document.form1.numFineRegion.options[numIndex] = new Option(strDispay,strValue);
            }
       }

      document.form1.numFineRegion.length = boxlength + 1;
      document.form1.numFineRegion.focus() ;

      iLength=document.form1.numCoarseRegion.length;
      document.form1.numCoarseRegion.selectedIndex = 0
      for(i=iLength;i>0;i--){
            document.form1.numCoarseRegion.options[i] = null;
      }
      document.form1.numCoarseRegion.length = 0      
      
      boxlength = 0
      numIndex = 0
      numItems = arrCoarse.length/3

      document.form1.numCoarseRegion.selectedIndex = 0
      for (ctr=0;ctr<numItems;ctr++){
            sState = eval("arrCoarse[" + ctr + ".1]")
            if(sState==strState){
                  boxlength++;
                   numIndex++;
                  strValue = eval("arrCoarse[" + ctr + ".2]")
                  strDispay =  eval("arrCoarse[" + ctr + ".3]")
                  document.form1.numCoarseRegion.options[numIndex] = new Option(strDispay,strValue);
            }
       }

      document.form1.numCoarseRegion.length = boxlength +1;
      document.form1.numCoarseRegion.focus() ;

}
//-->
</SCRIPT>
</HEAD>
<BODY onLoad="JavaScript:initPage()">

<Table width=650 Border=0 cellpadding=0 cellspacing=3>
     <tr>
           <td colspan = 2 align = left><img src ="Graphics/header.gif"></td>
     </tr>
     <TR>
           <TD width=160 valign=top bgcolor="#003366">
                 <p>&nbsp;</p>
                 <%MakeMenu()%>
           </td>
           <td width=480 bgcolor="#E3E3E7">
                 <FORM action="MailingsReview.asp" method=POST id=form1 name=form1 onSubmit="return validateMailings()">
                 <TABLE BORDER=0 CELLSPACING=2 CELLPADDING=2>
                       <tr>
                             <td colspan=2 align=center><font  face=Arial size=3>&nbsp;&nbsp;<b>Mail Selection Criteria</b></font></td>
                       </tr>
                      <TR>
                            <TD align = right>Attachment 1</TD>
                            <TD><INPUT type="file" name=strAttachment1></TD>
                      </TR>
                      <TR>
                            <TD align = right>Attachment 2</TD>
                            <TD><INPUT type="file" name=strAttachment2></TD>
                      </TR>
                      <TR>
                            <TD align = right>Attachment 3</TD>
                            <TD><INPUT type="file" name=strAttachment3></TD>
                      </TR>
                      <TR>
                            <TD align = right>Attachment 4</TD>
                            <TD><INPUT type="file" name=strAttachment4></TD>
                      </TR>
                      <TR>
                            <TD align = right>Attachment 5</TD>
                            <TD><INPUT type="file" name=strAttachment5></TD>
                      </TR>
                      <TR>
                            <TD align = right>Attachment 6</TD>
                            <TD><INPUT type="file" name=strAttachment6></TD>
                      </TR>
                      <tr>
                            <td colspan=2>
                                  <hr>
                            </td>
                      </tr>
                      <TR>
                            <TD align = right>Express Mail</TD>
                            <TD><%call CreateOption("numExpressMail","tblExpressMail","numRecordID","strDescription","","")%></TD>
                      </TR>
                      <tr>
                            <td colspan=2>
                                  <hr>
                            </td>
                      </tr>
                      <TR>
                            <TD align = right>State</TD>
                            <TD><%call CreateOption("strState","lu_States","strCode","strDescription",""," onChange='javascript:fillList(this.value)'")%></TD>
                      </TR>
                      <TR>
                            <TD align = right>Coarse Region</TD>
                            <TD><%call CreateOption("numCoarseRegion","lu_CoarseRegion","numRecordID","strDescription","","")%></TD>
                      </TR>
                      <TR>
                            <TD align = right>Fine Region</TD>
                            <TD><%call CreateOption("numFineRegion","lu_FineRegion","numRecordID","strDescription","","")%></TD>
                      </TR>
                      <TR>
                            <TD colspan=2>
                                  <hr>
                                    <TABLE BORDER=0 CELLSPACING=1 CELLPADDING=1>
                                          <TR>
                                                <TD width = 150>Category</TD>
                                                <TD width=40 align= center>PM</TD>
                                                <TD width=40 align= center>Est</TD>
                                                <TD width=40 align= center>Sup</TD>
                                                <TD width=40 align= center>Oth</TD>
                                          </TR>
                                          <TR>
                                                <TD>General Building</TD>
                                                <TD align=center><INPUT type=checkbox name=bolPM_GB value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolEst_GB value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolSup_GB value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolOth_GB value=1></TD>
                                          </TR>
                                          <TR>
                                                <TD>Transportation</TD>
                                                <TD align=center><INPUT type=checkbox name=bolPM_Trans value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolEst_Trans value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolSup_Trans value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolOth_Trans value=1></TD>
                                          </TR>
                                          <TR>
                                                <TD>Manufacturing</TD>
                                                <TD align=center><INPUT type=checkbox name=bolPM_Man value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolEst_Man value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolSup_Man value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolOth_Man value=1></TD>
                                          </TR>
                                          <TR>
                                                <TD>Industrial Process</TD>
                                                <TD align=center><INPUT type=checkbox name=bolPM_IP value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolEst_IP value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolSup_IP value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolOth_IP value=1></TD>
                                          </TR>
                                          <TR>
                                                <TD>Petroleum</TD>
                                                <TD align=center><INPUT type=checkbox name=bolPM_Pet value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolEst_Pet value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolSup_Pet value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolOth_Pet value=1></TD>
                                          </TR>
                                          <TR>
                                                <TD>Power</TD>
                                                <TD align=center><INPUT type=checkbox name=bolPM_Power value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolEst_Power value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolSup_Power value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolOth_Power value=1></TD>
                                          </TR>
                                          <TR>
                                                <TD>Environmental</TD>
                                                <TD align=center><INPUT type=checkbox name=bolPM_Env value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolEst_Env value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolSup_Env value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolOth_Env value=1></TD>
                                          </TR>
                                          <TR>
                                                <TD>Telecommunications</TD>
                                                <TD align=center><INPUT type=checkbox name=bolPM_TelCom value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolEst_TelCom value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolSup_TelCom value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolOth_TelCom value=1></TD>
                                          </TR>
                                          <TR>
                                                <TD>Developers</TD>
                                                <TD align=center><INPUT type=checkbox name=bolPM_Dev value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolEst_Dev value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolSup_Dev value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolOth_Dev value=1></TD>
                                          </TR>
                                          <TR>
                                                <TD>Finance</TD>
                                                <TD align=center><INPUT type=checkbox name=bolPM_Fin value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolEst_Fin value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolSup_Fin value=1></TD>
                                                <TD align=center><INPUT type=checkbox name=bolOth_Fin value=1></TD>
                                          </TR>
                                    </TABLE>
                                    <hr>                                    
                            </TD>
                      </TR>
                      <TR>
                            <TD align = right>Associate</TD>
                            <TD><%call CreateOption("numStaffID","Select numRecordID, strLast + ', ' + strFirst as strName from lu_staff order by strLast, strFirst","numRecordID","strName","","")%></TD>
                      </TR>
                      <TR>
                            <TD align=right valign=top>Message</TD>
                            <TD>
                                  <TEXTAREA rows=8 cols=40 name=memMessage></TEXTAREA>
                            </TD>
                      </TR>
                      <TR>
                            <TD colspan = 2 align = center>
                                  <hr>
                                  <INPUT type="reset" value="Reset" id=reset1 name=reset1>
                                  <INPUT type="submit" value='Continue' name=submit1 action="Submit">
                              </td>
                        </tr>
           </td>
     </TR>
</table>
<%
call ListErrors()
call ClearRecordSet()
call ClearConnection()
%>

</BODY>
</HTML>


Fritz the Blank





Thanks Fritz!
Glad to have helped! I am sorry if the last little bit of code was messy....

Fritz the Blank