Results 1 to 3 of 3
  1. #1
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Suggestions for Searching (A2003 SP2)

    I have a request for searching memo fields that contains two parts and am just looking for suggestions on the best way to do this.

    In a nutshell, Users want to be able to input a word or words (or part of a word(s)) in a textbox and have the ability to return matches from many memo fields.

    I can parse out the word parts in the text box into individual array entries (or other means) by breaking the characters on the "space" between them. The rule will be to separate the word or part of words with a single space. Or I can create a search string in code using a Like clause and wildcards.

    My question is what would be the best and fastest way to search the memo fields for these word(s)? Use an Instring, query with Like and or statements for the words, or other suggestions.

    Thanks.
    Regards,

    Gary
    (It's been a while!)

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

    Re: Suggestions for Searching (A2003 SP2)

    I don't really know what would be the fastest solution, but I'd use the Split function (in VBA code) to parse the search string into an array, and create a filter string (where condition) by looping through the array items and concatenating parts that look like

    [FieldName] Like "*word*"

    with Or (or And, as the case may be).

  3. #3
    Silver Lounger GARYPSWANSON's Avatar
    Join Date
    Aug 2001
    Location
    Frederick, Maryland, USA
    Posts
    1,788
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Suggestions for Searching (A2003 SP2)

    Hans,

    Thanks. I'll give it a whirl. I was leaning toward something similar to this as well.
    Regards,

    Gary
    (It's been a while!)

Posting Permissions

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