Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Another ListBox Question

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Really...... Im not an idiot but this list box is giving me nothing but problems. I finnally have it displaying infor from the database. I wish to add another listbox in the same form that calls from another field. When published the first listbox works great, but the second listbox is just displaying all of the data from the database, but not placing it into the dropdown. Any ideas?

dim conn
dim oconn
set conn= server.CreateObject ("adodb.recordset")
set oconn= server.CreateObject ("adodb.recordset")
conn.Open "classifacation", "DSN=S215"
oconn.Open "abc", "DSN=S215"
conn.MoveFirst
oconn.MoveFirst
%>
<form action=DAP1.asp id=form1 name=form1>
<p><select Name=&quot;Class&quot; Size=&quot;1&quot;>
<%
Do While Not conn.EOF
Response.Write &quot;<OPTION Value='&quot; & conn(&quot;business Type&quot;) & &quot;'>&quot;
Response.Write conn(&quot;business type&quot;) & &quot;</Option>&quot;
conn.MoveNext
Loop
%>
<p><select Name=&quot;Location&quot; Size=&quot;1&quot;>
<%
Do While Not oconn.EOF
Response.Write &quot;<OPTION Value='&quot; & oconn(&quot;bcity&quot;) & &quot;'>&quot;
Response.Write oconn(&quot;bcity&quot;) & &quot;</Option>&quot;
oconn.MoveNext
Loop
%>
<FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT id=submit1 name=submit1 type=submit value=Submit></FORM></FONT>
<P></P></TD></TR></TABLE>

Im Grateful for any assistance.
Mr. Prewit, that was the problem. Thanks for lending the assistance

Micah A. Norman
 
Minoad07, you forgot the closing </select> tags for both listboxes. After you finish your loops through the recordsets, place the closing tag, and it'll work. :)
Hope this helps...



<webguru>iqof188</webguru>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top