Keyboard shortcut to navigate to a combo box

S

scs

I learned how to use the & character to underline a letter to use as a
shortcut in combination with the Alt key. Now I'd like to make away to
quickly jumb to a combo box using the keyboard. I have the tab order set
the way I want but I want to be able to get to it quickly from anywhere on
the form. Can someone give me hint? Or better yet tell me how?

Thanks
Steve
 
F

fredg

I learned how to use the & character to underline a letter to use as a
shortcut in combination with the Alt key. Now I'd like to make away to
quickly jumb to a combo box using the keyboard. I have the tab order set
the way I want but I want to be able to get to it quickly from anywhere on
the form. Can someone give me hint? Or better yet tell me how?

Thanks
Steve

Add a command button to the form.
Set it's Caption to:
C&ombo

If you don't wish to see the command button set it's Width and Height
properties to 0"

Code it's click event:
Me![ComboName].SetFocus

Whenever you press Alt + o the combo box will get the focus.

If you also would like the combo to automatically drop down at the
same time, just add to the above code:

Me![ComboName].Dropdown
 
S

scs

Excellent!!! Thanks!

fredg said:
I learned how to use the & character to underline a letter to use as a
shortcut in combination with the Alt key. Now I'd like to make away to
quickly jumb to a combo box using the keyboard. I have the tab order set
the way I want but I want to be able to get to it quickly from anywhere
on
the form. Can someone give me hint? Or better yet tell me how?

Thanks
Steve

Add a command button to the form.
Set it's Caption to:
C&ombo

If you don't wish to see the command button set it's Width and Height
properties to 0"

Code it's click event:
Me![ComboName].SetFocus

Whenever you press Alt + o the combo box will get the focus.

If you also would like the combo to automatically drop down at the
same time, just add to the above code:

Me![ComboName].Dropdown
 
J

Joan Wild

You can also use the & character anywhere in the label attached to the
combobox to set focus to it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top