Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    techexpressinc's Avatar
    techexpressinc is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Dec 2008
    Location
    Indiana, USA
    Posts
    151

    Binoculars default seach crtieria "Any Part of Field" not "Whole"

    Does any one know how to code this routine up to be Any Part of Field instead of Whole field on the search?

    Thx


    Russ

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,443
    in your criteria use this:

    like * & [Enter your search value] & *

  3. #3
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,443
    err I just realized are you talking about a query or are you trying to have it browse your actual code

  4. #4
    techexpressinc's Avatar
    techexpressinc is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Dec 2008
    Location
    Indiana, USA
    Posts
    151
    the find command default value of whole field

  5. #5
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,443
    You're not clear

    Your thumbnail posted is a picture of the code in a VB window, are you trying to find something in your VB Scripting window, in a table, in a query, what?

  6. #6
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,443
    Wait a minute I think I understand.

    You have a button on a form that is invoking the find command from a toolbar and you want it to default to any part of field instead of whole field?

    You can manually change it but you want to make it automatic?

  7. #7
    techexpressinc's Avatar
    techexpressinc is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Dec 2008
    Location
    Indiana, USA
    Posts
    151

    correct - make the default part not the whole

    I want it to be automatically part of the field not the whole field on the find.
    Rus

  8. #8
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,443
    you are still not answering my question.

    I have to assume you're trying to get the innate search window to default to 'any part of field' instead of 'whole field' which can be done in versions of access prior to 2007

    Click on TOOLS
    Click on OPTIONS
    Click on the EDIT/FIND tab
    Change the DEFAULT FIND/REPLACE BEHAVIOR to GENERAL SEARCH

  9. #9
    techexpressinc's Avatar
    techexpressinc is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Dec 2008
    Location
    Indiana, USA
    Posts
    151
    Running Access 2003, I will try your suggestion and let you know the results. Although, I want a pop-up find that does it. I do have easy access to the PC-s my 40 users.

  10. #10
    techexpressinc's Avatar
    techexpressinc is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Dec 2008
    Location
    Indiana, USA
    Posts
    151

    Thumbs up Not there yet..

    That is not the solution needed yet. Two problems:

    1) That did the part of a field setting, but the find box looks for the whole form not the field of focus. See pic. attached.

    2) I would not want to go to every person's PC and do this setting.


    I need to get those issues resolved before a roll-out.

    Rus

  11. #11
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,443
    Then don't use the default search engine.

    Build your own search engine using queries with criteria of items found in your form.

    Trying to adapt the default microsoft find tool is really not going be customizable.

  12. #12
    techexpressinc's Avatar
    techexpressinc is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Dec 2008
    Location
    Indiana, USA
    Posts
    151
    I would think there is someone out in an Access Forum who is a geek and would have create a VBA routine to do this type of search. I have read and talked with other Access supporters looking for the Holy Grail.
    If I must create the wheel can you give some pointers, I am a beginner at VBA, and a old timer at programming.
    Rus

  13. #13
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,443
    There is no holy grail for searching a database, every database is different and there is no possible way to have code interpret your database and perform the search for you.

    Let's assume you want to look up a specific account number (one of the field names I can see on your form). Instead of having your form based on your entire table you could have your form based on a query and in the criteria of that query you could have

    forms![your form name]![Account number search field]

    Then in the ON EXIT property of your account number search field you would have

    me.requery

    which would update your form and bring you to the first record that matched your search criteria.

    Without seeing an example of your database it's not easy to suggest where you could make your search engine work because I assume you want to search more than one field, possibly more than one field at a time too.

  14. #14
    techexpressinc's Avatar
    techexpressinc is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Dec 2008
    Location
    Indiana, USA
    Posts
    151
    I have half dozen databases i support. Each with 75 screen fields, it would not be good to code a search routinue each field.
    The search field is the Field of focus=where-ever the cursor is.
    How about a Field of focus search routinue, like the Access find command works, but just change the parameter from whole to part.
    If we could to the get the code behind the MS-find box. Or if there was a simple way to move the radio button down one to start with. Most all my users do that manually and I been asked multiple times if I could change that default. I been looking on and off for a year now, without success.
    Rus

  15. #15
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,443
    To do that you would likely have to build a SQL statement on the fly and adjust the WHERE clause to only search for those fields you want. Basing your form on a static table is not going to give you what you want. Attached is an example of what I'm talking about.

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. "Group By" causes "ODBC--Call Failed" error
    By kaledev in forum Queries
    Replies: 1
    Last Post: 03-09-2011, 02:43 PM
  2. Replies: 8
    Last Post: 11-12-2010, 10:55 AM
  3. Replies: 3
    Last Post: 04-10-2010, 10:22 AM
  4. aSTR = Dir("C:\*.*") >> "Type Mismatch"
    By JGrant in forum Programming
    Replies: 1
    Last Post: 03-28-2009, 05:17 AM
  5. "Count" and "Countif" in Reports
    By JMantei in forum Reports
    Replies: 1
    Last Post: 06-20-2006, 02:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums