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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Another RecordSet Combo Box question

Status
Not open for further replies.

egolds

MIS
Aug 29, 2001
105
US
I know there are a lot of combo box record set questions in the forum but I have not seen an answer to this one:

I have a form with two identical sets of data one of the items is a drop down box that pulls from a table in the data base. On the first occurance of the dropdown box it works fine. I use the typical:
<select size=&quot;1&quot; name=&quot;EDUC1_DEGREE&quot;><%
While not objRS1.EOF
response.write(&quot;<option value = &quot;&objRS1(&quot;code&quot;)&&quot;>&quot;&objRs1(&quot;description&quot;)&&quot;</option>&quot;)
objRS1.MoveNext
Wend
%>
</select>

The problem is the second time i need to use this code to populate the dropdown it doesn't work. I have a feeling it is because the record set is at EOF. How do i reset it to BOF?

Thanks
 
No need to respond I figured it out. For those who need it:
I needed to
1) include the adovbs.inc
<!--#include file=&quot;../adovbs.inc&quot;-->

2) set the property of the recordset adOpenStatic
objRS1.CursorType = adOpenStatic

3)then use the MoveFirst just before the second occurance of the combo box.
objRS1.MoveFirst

I think I am finally getting this stuff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top