View Single Post
  #2  
Old May 9th, 2010, 03:58 AM posted to microsoft.public.access.queries
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Combobox Dropdown jump to selections starting with E's

Iram wrote:
I have a combobox field with selections starting from A through Z. When I
click on the combobox I need the drop down to skip down to the E's - Z's. In
other words skip all the A's, B's, C's, D's and start with the E's. I still
want the ability to scroll up into the A's through D's.



Well, the problem with what you asked is that combo box's
behave differently depending on where you click on them. If
you click on the down arrow the list will drop, but if you
click in the text poertion, it just positions the cursor for
editing the text in the box.

IF you are talking about some other control having the focus
at the time you click in the combo box, you could use the
GotFocus event to drop the list regardless of where you
click in the combo box:
Me.combobox.DropDown

Positioning the combo box's scroll bar so the first E entry
is at the top of the list is not something that Access
provides a setting for. On the other hand, all that is auto
matic if the combo box's AutoExpand property is set to Yes.
Then when you tab into the combo box and type an E or the
first letter of any entry in the list to auto position the
list to the first item that starts with the letter.

OTOH, if your users are totally locked in on only using the
mouse, you can simulate typing an E in the GotFocus event by
using:
Me.combobox.Text = "E"

--
Marsh
MVP [MS Access]