Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Apr 2004
    Thanked 0 Times in 0 Posts

    Multi word search on two tables (Access 2000)

    I am trying to set up a search system similar to how the search engines work, but for an off-line database. Where the user can type in several words into a textbox, and the when clicking a search button it checks all the fields in two linked databases and displays the results.

    I am just trying to get the query to work at the moment. I can get it to search on one word throughout every field on a table, but not two words. I can do it with two textboxes by running two queries, but would be glad if there's a way to use only one textbox? is there a way in an access query to run a multi field search showing only those records which contain both words in the textbox (when those words are in different fields in the record).

    Eg a search using "Yorkshire Food" would display all companies in Yorkshire which sell food.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 28 Times in 28 Posts

    Re: Multi word search on two tables (Access 2000)

    You could write code to:
    - parse the text in the text box into words (separated by spaces), using the Split function.
    - construct a query for each word.
    - construct a query that returns only those records that are in the result of each of the separate queries.
    I haven't actually tried this, but I suspect that performance might be sluggish.

  3. #3
    Super Moderator
    Join Date
    Aug 2001
    Evergreen, CO, USA
    Thanked 58 Times in 58 Posts

    Re: Multi word search on two tables (Access 2000)

    How are you trying to do the search - with a Query that has a criteria something like <font color=blue><font face="Georgia">Like "*myWord*"</font face=georgia></font color=blue> for each field?
    Or are you using the Find command from the menu? Also a description of the table structure would be useful.

Posting Permissions

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