Results 1 to 10 of 10
  1. #1
    pbouk is offline Advanced Beginner
    Windows Vista Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    58

    keyword search in a combo box

    I am trying to restyle my combo boxes on my form. Right now, I have two boxes, one that searches company name, and one that searches last name, both from drop-down lists. So the user starts typing a name and access auto selects the name from the list. However it is not searching by keyword, only by the first word in the field. This is proving exasperating for some people as they have to remember to use "The" in their company searches, for example.

    How can I make my combos keyword searchable?


    I found this article, but its rather daunting: http://www.experts-exchange.com/Micr...-ComboBox.html

    thank you.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Don't think you can with a combobox. Maybe with a textbox. Review

    http://www.allenbrowne.com/ser-62.html

    http://allenbrowne.com/vba-Soundex.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Please describe WHAT you are trying to do in plain English so we all understand. I'm not following the comboboxes.
    I think you should look at using text boxes and the OnChange Event-- but then again I don't know exactly what you are trying to accomplish.
    When you say restyle my combos, does that mean this is a "making it prettier" of an existing application? Or are you in development mode?

  4. #4
    pbouk is offline Advanced Beginner
    Windows Vista Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    58
    Quote Originally Posted by orange View Post
    Please describe WHAT you are trying to do in plain English so we all understand. I'm not following the comboboxes.
    I think you should look at using text boxes and the OnChange Event-- but then again I don't know exactly what you are trying to accomplish.
    When you say restyle my combos, does that mean this is a "making it prettier" of an existing application? Or are you in development mode?
    I stated at the end of my question that I want to make my combo boxes keyword searchable.
    eg. Archivio Mulag Questo
    Right now, if the person types in Mulag, they will not find the company. They must type Archivio in order to locate the company.
    So I'm hoping to recode the combo box so that it will allow a user to type in any word from the company field in order to bring up the correct company name.

    Does that make sense?

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    Your combo box has a rowsource -- what exactly is the rowsource? It should be a drop down list of Values that you have identified in some manner. I don't understand how you can be keyword search a combo box. Your going to have to tell us what's in the combo; what and how you are searching values in the combo???

    When I ask you to tell us in plain English, I mean no Access, no combos... If you met someone in the line at McDonalds who doesn't know you, doesn't know database and has never heard of Access and he is someone you have never met and he asks you "what are you trying to do?" ...What do you say (no access, no combos...just plain English)?


    Show us some code, but it sure seems you may have some mis-conception of combos and their use, but perhaps it's just a communications issue. Let's see how it evolves and then you can tell/show us how you have set up for "keyword" search of that combo.

    Have you tried searching this forum for "true keyword search" ?

  6. #6
    pbouk is offline Advanced Beginner
    Windows Vista Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    58
    Thanks June7. I do have a separate form for a keyword search across all fields in my database, so if people can't find the contact through the combo box they can switch to this search form instead.
    I was just hoping to be able to enter a key word in the Company combo box, as it's the most common field searched. That way people don't have to switch to the keyword form.
    The soundex idea could be helpful, I need to look at a bit more....

    Orange: Yes, quite possibly I have a misconception about combo boxes...this is the first databse I've built. It's a contacts database, and I'm trying to enable my users to find a Company name easily. I have a combo box where the user can select from list of company names. They type in the first word of the company they're looking for and it auto-selects it from the list. I'd like it if the user could type in any word from the company name and Access would still be able locate it from the list. This might not be possible though.
    Here is my rowsource info:
    Click image for larger version. 

Name:	Rowsource.PNG 
Views:	19 
Size:	21.9 KB 
ID:	12536

    The article I posted in the first post seems find a solution, but it's fairly complicated. I was just wondering if there is a quicker/easier solution.

  7. #7
    pbouk is offline Advanced Beginner
    Windows Vista Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    58
    Click image for larger version. 

Name:	CompanyCombo.jpg 
Views:	15 
Size:	36.2 KB 
ID:	12537

    Here is my Combo box for Company name. The user types in a name or selects from the drop down list.

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    On second thought, maybe a combo will work. Set the LimitToList property to No. Then criteria in query: "*" & Forms!formname!comboboxname & "*"
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    pbouk is offline Advanced Beginner
    Windows Vista Access 2010 64bit
    Join Date
    Nov 2012
    Posts
    58
    Quote Originally Posted by June7 View Post
    On second thought, maybe a combo will work. Set the LimitToList property to No. Then criteria in query: "*" & Forms!formname!comboboxname & "*"
    Thanks June7, it didn't work, but I'm going to keep working on it.

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Okay, I got it to work with combobox. I forgot to include LIKE operator in my posted suggestion. Try:

    LIKE "*" & Forms!formname!comboboxname & "*"
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. A TRUE Keyword Search
    By Meep in forum Queries
    Replies: 72
    Last Post: 05-13-2013, 06:45 PM
  2. Replies: 18
    Last Post: 01-31-2013, 01:18 PM
  3. Multiple Keyword Search
    By gatsby in forum Access
    Replies: 15
    Last Post: 01-21-2013, 10:53 PM
  4. Keyword search with Access 2010 FE
    By Brian62 in forum SQL Server
    Replies: 1
    Last Post: 06-15-2012, 06:06 PM
  5. Making a keyword search
    By timmy in forum Forms
    Replies: 9
    Last Post: 03-14-2011, 02:57 AM

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