Results 1 to 10 of 10

Thread: Searching

  1. #1
    Join Date
    Sep 2002
    Posts
    79

    Unanswered: Searching

    How can I make "Any part of field" the default search?

    Thanks for your help

  2. #2
    Join Date
    Sep 2003
    Location
    The extremely Royal borough of Kensington, London
    Posts
    778
    select *
    from table
    where column LIKE '*'&[param]&'*'
    Bessie Braddock: Winston, you are drunk!
    Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.

  3. #3
    Join Date
    Sep 2002
    Posts
    79
    That code makes no sense to me - Please be more detailed.

    Sorry for being a pain. I do appreciate it.

  4. #4
    Join Date
    Mar 2004
    Location
    Greenville, SC
    Posts
    271

    WHew

    I agree. Let me know when you get an answer to this one!!!

    I would love to do that!

    Surf
    Gotta to do some code

  5. #5
    Join Date
    Mar 2004
    Location
    Adelaide, Australia
    Posts
    32
    The post by r123456 is pretty straightforward.

    They have supplied a generic SQL string. It will search a table where the contents of a field contains [param].

    For example:

    If you have a control on a form called SEARCH, and it contained the text "lap", and used the following SQL string;

    SELECT * FROM myTable WHERE myColumn LIKE '*" & me.SEARCH & "*'"

    then it might return records where myColumn contains data like:

    elapse
    laptop
    dunlap
    .... etc, etc.

    HTH.

  6. #6
    Join Date
    Mar 2004
    Location
    Greenville, SC
    Posts
    271
    I think alex is talking about when you use the Binoculars or find button you have "Whole Field" as the default. He wants "Any part of field" as his default?

    I think?
    Gotta to do some code

  7. #7
    Join Date
    Mar 2004
    Location
    Adelaide, Australia
    Posts
    32
    Surfacesys, you may be right.

    Found this in Access Help:

    "Change default behavior for find or replace operations

    On the Tools menu, click Options.

    Click the Edit/Find tab.

    Under Default Find/Replace Behavior, click the option you want to use.
    Note Changes made to this setting don't take effect until the next time you start Microsoft Access. To change the behavior for a specific find or replace operation, choose Find or Replace from the Edit menu, and then set the appropriate options in the dialog box."

  8. #8
    Join Date
    Mar 2004
    Location
    Greenville, SC
    Posts
    271
    I still didn't see a way change the "MATCH' option in the Find dialog box to "Any part of field"
    Gotta to do some code

  9. #9
    Join Date
    Mar 2004
    Location
    Adelaide, Australia
    Posts
    32
    Under Default Find/Replace Behavior, the options are:

    Fast Search - search the current field and match the whole field

    General Search - search all fields and match any part of the field

    Start of Field Search - search the current field and match the beginning
    character(s) of the field.

    Once you apply your preference, you would need to re-start Access Application.

  10. #10
    Join Date
    Mar 2004
    Location
    Greenville, SC
    Posts
    271

    FANTASTIC

    Thank You so much!!! I have been wanting to do this forever..




    Surf
    Gotta to do some code

Posting Permissions

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