Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    CaptainKen is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Location
    Arizona
    Posts
    31

    Yes. I would also like the cbo to dropdown/open while the user types in the txtSearchForm so they can see the results as they type rather than after the fact.

  2. #17
    SteveF is offline Generally AccessAble
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2010
    Location
    Fourth Corner
    Posts
    123
    Quick update: It’s not the most elegant solution I’ve ever seen, but I did come up with something that filters with the wild cards. I still need to finish the coding and get things cleaned up, but I should have something back to you on Monday.

    Steve

  3. #18
    SteveF is offline Generally AccessAble
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2010
    Location
    Fourth Corner
    Posts
    123
    OK, here's the solution I came up with. As I mentioned, it's not the most elegant, but it does work. There's a Word doc in the ZIP file as well that explains what I did.

    Steve
    Attached Files Attached Files

  4. #19
    CaptainKen is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Location
    Arizona
    Posts
    31
    Wow, thank you for your hard work and time! Word doc is a nice bonus! I feel lucky!

    Geez you even had to use the Timer! Access can sure be clumsy at times. Interesting to know not all languages are as bad as VBA.

    Not sure what happened regarding the missing references, as I didn't do anything.

    I can't wait to implement this into my live database, but probably won't happen today as I'm getting slammed with emails.

    Ken

  5. #20
    CaptainKen is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Location
    Arizona
    Posts
    31
    Working out pretty good except for one snag we just came across. It doesn't allow searching with spaces.

  6. #21
    SteveF is offline Generally AccessAble
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2010
    Location
    Fourth Corner
    Posts
    123
    Ya got me stumped on this one! At first I thought that maybe you had re-introduced the ignore-space code on your original form, and that was causing the problem, but I'm seeing the described behavior without that code. Taking out the "jump to the end of the string" code in the text box GotFocus event didn't help either.

    I think you may have to bite the bullet and choose between a "contains" search that can't handle spaces, and a "starts with" search where spaces are OK. The latter is the default behavior of a Combo Box, so you can replace the text box/list box pair on that form with a single Combo that will do the same job.

    Steve

  7. #22
    CaptainKen is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Location
    Arizona
    Posts
    31
    Thanks for taking another look at this.

    If anyone else has a way to tackle the space issue let me know.

  8. #23
    CaptainKen is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2012
    Location
    Arizona
    Posts
    31
    I just discovered another issue. If the first letter to search on is the letter " i ", then the following error occurs:

    Run-time error 2110:
    Microsoft Access can't move the focus to the control txtHidden

    I think this one is Gremlins at play!

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

Similar Threads

  1. Cant see where its wrong - VBA wildcard search.
    By shabbaranks in forum Programming
    Replies: 3
    Last Post: 03-22-2012, 03:56 AM
  2. combobox rowsource
    By dirkvw in forum Forms
    Replies: 3
    Last Post: 06-20-2011, 05:12 PM
  3. ComboBox Search - No Results
    By cvansickle in forum Forms
    Replies: 5
    Last Post: 03-27-2011, 03:37 PM
  4. Wildcard Expressions in Search Field
    By eww in forum Programming
    Replies: 4
    Last Post: 09-29-2010, 10:27 AM
  5. Use combobox to control Subform
    By bundy75 in forum Forms
    Replies: 2
    Last Post: 09-22-2010, 03:31 AM

Tags for this Thread

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