Coding Combo Box for keyboard navigation

  • Thread starter Thread starter Marie-Lynn
  • Start date Start date
M

Marie-Lynn

I have created a combo box that is dependent on the table/query. The combo
box is functioning flawlessly, but I need to be able to navigate the form
using only the keyboard. Currently, 'tab' will bring me to the combo box,
but no keyboard control exists for selecting from the drop-down list. I am
spicifically looking for the 'up' and 'down' keys to control navigation, and
the 'enter' key to select the input option. Through my own research, I think
that the coding for this will be found in creating a macro in either 'on got
focus' or 'on enter' but, other than this, I am lost. As I am not at all
proficient with coding/macros (though I have a very basic understanding), may
anyone be able to help me with a solution?

Thanks,
ML
 
I might have found a solution:

OnGotFocus property > event procedure:
Private Sub ComboBox_GotFocus()
ComboBox.Dropdown
End Sub

Is this the best solution? I am looking for the best solution for
accessibility for someone that is using a screen reader (no mouse use, verbal
announcement of on screen), by the way.
 
Hello,

Generally, when addressing (disability-related) accessibility in design, one
keystroke is preferred. So for this, and other, reasons Alt+Down would
probably not work. the solution that I presented myself seems to be working:
do you know of any inherent problems with coding the combo box this way?

Thanks for your feedback!
ML
 
Hi Marie,

I've used code like you posted on several occasions and never ran into any
problem with it. It sounds like it may be a good option for you.

Good luck,
CW
 
Back
Top