• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 242
  • Last Modified:

Filter recordset for multiple dropdowns on a single page

I have a table here below:

optionID      optionName
1      CD
1      Checking
1      Money Market
2      401k
2      IRA
3      C-Corporation
4      Autos
4      Boats
4      Trailers & RV's

These are options for the 4 dropdowns that I'm going to use on a single page. I'm trying to avoid creating 4 recordsets to populate the 4 dropdowns. Is there a way that I can have the dropdown filter the options based on the optionID?

Your assistance is greatly appreciated.
0
kobeballa
Asked:
kobeballa
1 Solution
 
sankarbhaCommented:
You can use filter property of ado recordset.

http://www.devguru.com/technologies/ado/8656.asp

The above link will give you a good detail on that.
0
 
kobeballaAuthor Commented:
Thanks.

Here's what my code looked like - FYI

    <select name="select3">
    <option value="">Please Select One</option>
    <%
rsOptions.Filter = "optionID = 3"      
While (NOT rsOptions.EOF)
%>
    <option value="<%=(rsOptions.Fields.Item("optionName").Value)%>"><%=(rsOptions.Fields.Item("optionName").Value)%></option>
    <%
  rsOptions.MoveNext()
Wend
If (rsOptions.CursorType > 0) Then
  rsOptions.MoveFirst
Else
  rsOptions.Requery
End If
%>
  </select>
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now