Type in drop down boxes 
Author Message
 Type in drop down boxes

Quote:

>We are trying to use a text box that will allow a person to type in
>more than just the first letter, and have it scroll through the entire
>list.  Using the combo box, we can type in the first letter, but we
>need people to type an entire string and have it search that string
>(like the Search box in Help).  Any suggestions?  This list has helped
>me tremendously, and I am extremely greatfull for it.

Take a look at November 95 VBPJ (for VB3) or the January 96 edition
for VB4. There is example code in both of these to handle this case.

Regards,
Rod



Sun, 19 Jul 1998 03:00:00 GMT  
 Type in drop down boxes
We are trying to use a text box that will allow a person to type in
more than just the first letter, and have it scroll through the entire
list.  Using the combo box, we can type in the first letter, but we
need people to type an entire string and have it search that string
(like the Search box in Help).  Any suggestions?  This list has helped
me tremendously, and I am extremely greatfull for it.

-Scott Charlton




Sun, 19 Jul 1998 03:00:00 GMT  
 Type in drop down boxes

Quote:


>>We are trying to use a text box that will allow a person to type in
>>more than just the first letter, and have it scroll through the entire
>>list.  Using the combo box, we can type in the first letter, but we
>>need people to type an entire string and have it search that string
>>(like the Search box in Help).  Any suggestions?  This list has helped
>>me tremendously, and I am extremely greatfull for it.

> Take a look at November 95 VBPJ (for VB3) or the January 96 edition
> for VB4. There is example code in both of these to handle this case.

> Regards,
> Rod

Use the "SendMessage" API function with CB_FINDSTRING or
CB_FINDSTRINGEXACT

Lawrence Bartel    



Tue, 21 Jul 1998 03:00:00 GMT  
 Type in drop down boxes
Quote:

>We are trying to use a text box that will allow a person to type in
>more than just the first letter, and have it scroll through the entire
>list.  Using the combo box, we can type in the first letter, but we
>need people to type an entire string and have it search that string
>(like the Search box in Help).  Any suggestions?  This list has helped
>me tremendously, and I am extremely greatfull for it.

>-Scott Charlton



If I understand you correctly you need to search for an intire string in a list box.
The code below will search the list with each additional character entered, getting
more specific with each character entered.

In the Text1 Key Down event place this code.

Check = LEN(LTRIM$(Text1.Text)) 'get the length of the string in Text1
CheckText$ = LTRIM$(Text1.Text) 'get just the non null characters in Text1

FOR i = 0 TO List1.ListCount - 1        'set the counter to check each item in the list
     List1.ListIndex = i
  IF LEFT$(List1.List(i), Check) = CheckText$ THEN         'check the item aginst Text1
    EXIT FOR                                  'if the string is found stop search
  END IF
NEXT i

I hope this will help.
Good Luck,
Bryan



Wed, 22 Jul 1998 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Drop Down List Box - Drop Down portion does not always disappear after Click event

2. drop down box and down arrow key

3. Drop Down Combo box with smaller down arrow icon

4. Press F1 key while drop-down menu item highlighted, drop-down menu stays on top

5. Data bound drops downs dont drop down!

6. VBA code to go to a bookmarked drop down goes to wrong drop down

7. List box with embeded drop down boxes

8. add, edit using drop down boxes and list boxes

9. Hiding combo box border and drop-down box

10. Disable IE5.5 drop down list when I type text within a web page - PLEASE HELP

11. Disable IE5.5 drop down list when I type text within a web page - PLEASE HELP

12. Disable IE5.5 drop down list when I type text within a web page - PLEASE HELP

 

 
Powered by phpBB® Forum Software