Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2009
    Posts
    3

    Unanswered: Access: 'Smart' Combo box behavior. Is it possible?

    The default behavior for normal combo boxes is like this:

    #1 George Stones
    #2 Brian Williams

    So if i wanted to find #1 George Stones I'd have to type the first letter "G" and then the next letter "e"

    I cannot type "Stones" and have the combo fox for #1

    Nowadays there are many search boxes which provides the functionality which doesn't involve writing every letter in the only correct order (i.e. typing Stones and getting "George Stones"). Is there any way to implement that in Access?

  2. #2
    Join Date
    May 2005
    Posts
    1,191
    Welcome to the forums.

    While I think it would be possible to do what your saying, it would be quite complex and involve a fair amount of programming. Why not just have a textbox right above or below the combo box which the user can type whatever they want in, and then use that input to filter the items in the combo box? Similar in concept at least to a cascading list.
    Me.Geek = True

  3. #3
    Join Date
    Apr 2009
    Posts
    3
    Quote Originally Posted by nckdryr
    Welcome to the forums.

    While I think it would be possible to do what your saying, it would be quite complex and involve a fair amount of programming. Why not just have a textbox right above or below the combo box which the user can type whatever they want in, and then use that input to filter the items in the combo box? Similar in concept at least to a cascading list.
    Thanks for the welcome

    Interesting solution, but right now I am considering putting in a script that actually modifies the row source as I type it on the go. But yeah I'll look at the cascading list first.

  4. #4
    Join Date
    May 2005
    Posts
    1,191
    The thing about having a script to modify the row source as it's typed is that the user can't "see" what his criteria is as it's being applied. So you'll need to mess around with setting the timer. For instance, if the user types "s" and then "t", but then accidentally hits "p" instead of "o", how does the user know he hit the wrong key? And then how do you "reset" the filter? Is it set to a timer such that after a second of not typing anything it "resets" the filter? What about people who don't type fast? There's a lot of unknowns when you can't see what you're typing or have the ability to alter it once it's entered.

    What's more, is that if, using your example, you have a "George Stones", but later in the list you have a "Stone Phillips", and you type "Stone", how do you choose which one the user meant? That's an advantage to filtering the list down, the user can still choose from all applicable choices, not just whatever one your code picks for them (users don't like it when code assumes something they don't want it to do, very frustrating for them).

    Just my thoughts, let us know how you get along.
    Me.Geek = True

  5. #5
    Join Date
    Apr 2009
    Posts
    3
    I actually got something 'close' to work

    But the fundamental nature of the combo box messes it up half the time so guess I'll be using the cascading list method.

Posting Permissions

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