AnnaHansen
Board Regular
- Joined
- Oct 27, 2014
- Messages
- 58
I have a combobox on a userform that pre-selects an item if it thinks it knows what the user is going to select, based on a very simple prediction that I put together.
If it guesses wrong, then of course the user needs to find the correct item they want. Most users are using a keyboard to make selections and would start typing the value they want to select, rather then using the drop down or using the up/down arrows to scroll through the list.
Problem is, once the combobox makes a guess, the "cursor" (the cursor is not actually visible) is at the end of the predicted item, so the user has to highlight it all and delete it, or hold down backspace before they can start typing to find their value. (I have MatchEntry set to fmMatchEntryComplete)
I also have textboxes that do a similar prediction thing, and in that case, using the .setfocus command on the textbox after the prediction sets the value highlights the predicted text and so the user can just start typing to overwrite it if it is wrong.
The .setfocus command on the combobox makes the combobox the active element on the form but doesn't highlight the text.
Does anyone know how to have it select the text (or if it even can be done)?
Thanks,
If it guesses wrong, then of course the user needs to find the correct item they want. Most users are using a keyboard to make selections and would start typing the value they want to select, rather then using the drop down or using the up/down arrows to scroll through the list.
Problem is, once the combobox makes a guess, the "cursor" (the cursor is not actually visible) is at the end of the predicted item, so the user has to highlight it all and delete it, or hold down backspace before they can start typing to find their value. (I have MatchEntry set to fmMatchEntryComplete)
I also have textboxes that do a similar prediction thing, and in that case, using the .setfocus command on the textbox after the prediction sets the value highlights the predicted text and so the user can just start typing to overwrite it if it is wrong.
The .setfocus command on the combobox makes the combobox the active element on the form but doesn't highlight the text.
Does anyone know how to have it select the text (or if it even can be done)?
Thanks,