Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Jun 2003
    Location
    Indiana, USA
    Posts
    141
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Multiple Drop Down Search Fields (2003)

    I have developed several search pages based on (1) drop-down criteria for the seach keyword. These pages are feed from an Access database, and work really well. I am now trying to design a page that uses multiple criteria from as many as (3) drop down fields, to further define the queried data. An example is at http://www.ivfa.org/DeptMulti.asp

    I would like this page to seach on the and/or method, whereby the user can select from 1, 2, or all 3 drop downs, based on what they are wanting to see. However, none of the drop-downs will filter on the selected keywords, and it appears to want to return all records, regardless of the selected criteria. I have looked for articles on multi search fields, but have not been successful in locating any useful information. It may even be such that this type of operation isn't even possible, but figured it was worth asking if any one has done or seen something similiar, and may be able to provide me some information on how to make this work.

    Thank you in advance for any assitance.

  2. #2
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Multiple Drop Down Search Fields (2003)

    Hi SmokeEater.

    I think the first thing we need is a sample of your code, just so that we can see what is going on at the moment. It may be best to zip the html file and attach it to your next post in this thread, if not on a txt file. <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>
    Jerry

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Multiple Drop Down Search Fields (2003)

    The source of your page contains "webbot" comments, one of which lists the following WHERE clause in the SQL:

    <code>WHERE (County = '::County::' OR Alpha = '::Alpha::' OR District = ':istrict::')</code>

    I don't know which dialog in FP is used to write the query, but I think you want the connector between these criteria to be AND rather than OR.

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Multiple Drop Down Search Fields (2003)

    Upon further review, I see you want to let the user "ignore" one or two of the drop-downs. One way to do this would be to have the first (default) element be something like "Choose a value" and write custom ASP/ADO code to omit the criterion from your query if the select returned that value. Another way would be to have a checkbox next to the criteria the user wants to use, and write custom ASP/ADO code to use only the applicable criteria in the WHERE clause. But I suspect that the FP database wizard is not capable of doing something this fancy on its own. (To be fair, I haven't used it since FP 2000.)

  5. #5
    2 Star Lounger
    Join Date
    Jun 2003
    Location
    Indiana, USA
    Posts
    141
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: Multiple Drop Down Search Fields (2003)

    I would have to say that this is getting over my head. I believe you are correct though that the FrontPage DRW is limited in what it will let me do.

  6. #6
    2 Star Lounger
    Join Date
    Jun 2003
    Location
    Indiana, USA
    Posts
    141
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Re: Multiple Drop Down Search Fields (2003)

    Sorry it took so long to get back to you with this. Busy weekend at the fire department.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •