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!

Drop down Menus

Status
Not open for further replies.

voice3

Programmer
Nov 3, 2002
8
GB
Hi,

Just to give you the back ground info I am building a site using VBscript and using IBM Redback objects. I have are ready got a drop down menu to be populated by a redback object. But because some of the entries are entered more than once I would like to filter the results so each result is only shown once.

<%


Set oConn = GetConnectionObj()
Set oLookup = Server.CreateObject(&quot;RedBack.RedObject&quot;)
If Err.number Then DisplayError
oLookup.Open oConn, &quot;STOCK:ListStock&quot;
If Err.number Then DisplayError
oLookup(&quot;select_criteria&quot;).Value = &quot;INVEN.CATEG <> &quot;&quot;&quot;&quot;&quot;
Set rs = oLookup.CallMethod(&quot;Select&quot;)
If Err.number then DisplayError

Response.write&quot;<select name=&quot;&quot;vender&quot;&quot; id=&quot;&quot;vender&quot;&quot;>&quot;
Response.write&quot;<option value=&quot;&quot;&quot;&quot;></option>&quot;
Do While Not rs.EOF
Response.write LCase(&quot;<option value=&quot; & rs(&quot;INVEN.CATEG&quot;).Value & &quot;>&quot; & rs(&quot;INVEN.DESCR&quot;) & &quot;</option>&quot;)
rs.Movenext
loop
Response.write&quot;</select>&quot;
%>

Thank you for taking the time to read this and hopefully help me.
 
why dont u use distinct select while getting back the data? that would give you only one occurence of each -else you would have to write a loop which checks if the value already is there (u can use arrays to do that)
 
I think that something you'll have to write in the Object.

My knowledge of basic in method codes is very limited, but it's something that the U2 developers should handle
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top