Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Acess 2007 Tab Through Items in a Combo Box

Status
Not open for further replies.

HisSheep

Programmer
Sep 25, 2009
7
US
I would like to have the user be able to hit a letter on the keyboard and have the cursor in the combo box skip to the next item that starts with the same letter. I thought that this was basic functionality with most programming but have not been able to find anything on it.

Example: User types "r" on the keyboard.

tabs through this list and brings up all the items one right after the other that begins with "r"

- Entered
-Received
-Processed In this example the "Received" and then
-Route the "Route" whould show in the text box
as the user hits "r" on the keyboard.

thanks for the help
HisSheep
 
Set the MatchEntry property of the comboBox:

ComboBox1.MatchEntry = fmMatchEntryFirstLetter

or

ComboBox1.MatchEntry = FmMatchEntryComplete
 
The above solution is for an MSFORMS combobox which you can use on an access form if you select additional active X controls. In a native access combobox the property is "auto expand" which is true or false. The property is similar to match entry complete. I assumed you wanted to limit the list to those matching the criteria.
 
I want to be able to have the user hit a letter corresponding to the first letter and if there are more than one record with the same first letter.....have combo box cycle through all the records with that letter.
 
I should have added...each time the letter is typed on the keyboard.....so each time the letter is typed on the keyboard the curser in the combo box will hop to the next record with the same first letter. Aso I am not using Active X so any solution should be directed toward the native combo....thanks for the help
 
This is not a feature of the native combo, but it is a feature with the MSFORMS combo. The property is

fmMatchEntryFirstLetter

The behavior with an access combo is different. Assume you have

ab
aab
aacd

If you type "a" it will go to "ab". If you type "a" again it goes to "aab". It will not go to aacd until you type "aac"

It is not difficult to add the MSFORMS combo. The only difficult part is that there is not a rowsource property. You would have to load the combo through code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top