Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Apr 2001
    Posts
    304
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Performing a parameter search across many fields (Access 2000)

    Hi guys - turning to my "source" for help. I'm working in a database and we'd like to be able to perform a parameter search across several fields. Is this possible (I assume so), and how do you do it. I would prefer to not put the Like statement in each of the fields that I want to search since then the end user has to enter the information several times, not to mention that we don't get the correct search results. Help (and TIA). - Sat.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Performing a parameter search across many fields (Access 2000)

    You'll have to be more specific. You want a parameter search across several fields but you don't want the user to enter information several times. Can you explain what you mean by that, with specific details? Thanks.

  3. #3
    3 Star Lounger
    Join Date
    Apr 2001
    Posts
    304
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Performing a parameter search across many fields (Access 2000)

    Ok - I'll try to be specific without confusing the heck out of you. We have a table with the names of all our applications within our company and the servers that they are run on, or that they affect in some way. So there are three different server fields. One for File Server Name, one for Client Name, one for App Server name. One of our servers can be listed in any three of those fields. Or ALL three of those fields. I wanted to be able to (in an ideal world) click a button on my form that will run a Server search query. One box would pop up asking you to enter the server name, and after you did, it would search the File Server, Client Name and App Server fields. HOWEVER, if I enter the [Enter Server Name] parameter as a Criteria on the File Server field, it will only return hits from the File Server field. If I enter the same parameter on all three fields, when I click Run, it will pop up the Enter Server Name message box three times, and it searches each of those fields individually.

    I don't know if that makes it any clearer. Is there a way to do what I want? Thanks.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Performing a parameter search across many fields (Access 2000)

    That's not as it should be. If the parameters are exactly the same, you should only get prompted once. Check this very carefully; the slightest difference, such as an extra space, will cause Access to see them as different parameters. If it doesn't work, declare the parameter explicitly in Query | Parameters... Set Parameter to exactly the text you use in the query grid, and Data Type to Text.

    To search for the text in each of the three fields, enter the parameter in a different row for each of the three fields.

  5. #5
    3 Star Lounger
    Join Date
    Apr 2001
    Posts
    304
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Performing a parameter search across many fields (Access 2000)

    Hey Hans! Your last sentence was the key. I was not putting the parameter on three different rows, so it was prompting me three times, I guess. When I went back in and made sure each of the identical parameters was on it's own row, it ran fine and only prompted me once. THANK YOU!

Posting Permissions

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