Filter recordset for multiple dropdowns on a single page

Posted on 2006-04-24
Last Modified: 2012-06-27
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.
Question by:kobeballa
    LVL 8

    Accepted Solution

    You can use filter property of ado recordset.

    The above link will give you a good detail on that.

    Author Comment


    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>
    If (rsOptions.CursorType > 0) Then
    End If

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Suggested Solutions

    I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
    This demonstration started out as a follow up to some recently posted questions on the subject of logging in: and…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now