Combo Box Lookup

94Sport5sp

Registered User.
Local time
Today, 11:55
Joined
May 23, 2012
Messages
115
Hi:

I have a table with thousands of unique numbers, each of which describes one item. I would like to design a form that the user could use to look for a specific number and then to display the information associated with that number. I was thinking of a combo box but I did not want to populate the box with all the numbers. Any better ideas?

Additional information, the user is not to be allowed to add numbers or to modify existing numbers. Generally the user knows what the number starts with. So the idea is that the user starts typing a number and items are displayed. The more numbers the user type the shorter the list until the desired item is found or not found as the case may be.

Thanks
 
Modify the combo control source each time 1, 2, 3, etc. (to suit) digits are entered.
 
Modify the combo control source each time 1, 2, 3, etc. (to suit) digits are entered.

Hi:

I am not understanding the advantage of that?

thanks
 
It dramatically reduces the number of records in you combo control source.
 
It dramatically reduces the number of records in you combo control source.

Hi:

Yes, eventually I can see that reducing the number of records in the combo box but initially they have to start somewhere. Since I do not know where they will start then the combo box would contain all the numbers.

Thanks
 
No, you are incorrect. Don't set the combo control source until you've trapped the requisite number of key strokes. Take a look at the KeyPress event.
 
...Don't set the combo control source until you've trapped the requisite number of key strokes. ....

Hi:

So you are thinking of setting up an empty combo box where the user is allowed to key in the beginning of a number. Then after a specific set of numbers (like 3 digits), or when the user presses enter or some such key, then populate the combo box and continue to allow the user to refine the number.

Thanks
 
That's it. Count the digits with the OnKeyPress event. Good luck,
 

Users who are viewing this thread

Back
Top Bottom