Results 1 to 4 of 4

Thread: Lookup Algorithm

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Mobile, AL, USA
    Posts
    600
    Hi,

    Does someone have an algorithm that will do a lookup in a combobox based on the value that a user types in the textbox portion of the combobox? When you type a letter, the value in the list that best corresponds to what you've type is selected, like in a webbrowser's address box.

    For example:

    The user types: "One", and "OneSource" is selected from the list.

    Thanks.

    P.S. If no one has this algorithm, will someone code it?

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    combobox has that utility built into it..use 2 dropdown sytle
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  3. #3
    Guest
    onesource, yep i have the source in a VB book, gimme a day or two and I'll send it to you.

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Mobile, AL, USA
    Posts
    600

    Thanks HeSaidJoe ...

    I almost qualify for the "duh" award on this one! What's even worse is that I had already set the style to 2 for my combobox.

    In my defense, I was using the drop down arrow to make selections from the combobox, rather than typing text in. The good news is that I don't need to alter my app at all. So wossname, I don't need that code after all, but thanks anyway.

    However, I did discover that the "lookup" functionality included in the combobox is not a true lookup. For example, if the combobox contains these items:
    • Charles
    • Carl
    • Hunter
    and you type "Ch" hoping to get Charles, Hunter will be selected. In order to cycle through the items, you have to continue to type the first letter of the item you are looking for, in this case "c". Just a little info. for those who may want it. And a feeble attempt on my part to save face.

    All the best.

Posting Permissions

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



Click Here to Expand Forum to Full Width