Open a Combo box using the keyboard

E

ernie

I have a combo box on an input form which I would like to open and make the
selection using the keyboard rather than turning to the mouse. This is
probably some built in thing but I don't see it in Help.
Thank you,
ern.
 
D

Douglas J. Steele

When the combo box has focus, F4 will drop the list down. You can move up
and down through the list using the up and down arrows.
 
M

missinglinq via AccessMonster.com

You could set up a "hotkey" to set the focus on the combobox then drop it
down.

Place a command button on your form; name it CBODropDown.
Make its caption something like &DropDown Combobox
Goto Properties - Format and set Transparent property to YES

Private Sub CBODropDown_Click()
YourComboBoxName.SetFocus
YourComboBoxName.Dropdown
End Sub

Now the key combination <Alt> + <D> will dropdown the combobox

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
T

tina

as an alternative, you can set a hotkey on any letter in the combobox
control's label, using the ampersand in the label's Caption property, and
add code to the combobox's Enter event procedure to dropdown the list, as

Private Sub ComboboxName_Enter()

Me!ComboboxName.Dropdown

End Sub

hth
 
M

missinglinq via AccessMonster.com

Much simpler, Tina! I didn't realize you could do that with the cbo label!
as an alternative, you can set a hotkey on any letter in the combobox
control's label, using the ampersand in the label's Caption property, and
add code to the combobox's Enter event procedure to dropdown the list, as

Private Sub ComboboxName_Enter()

Me!ComboboxName.Dropdown

End Sub

hth
You could set up a "hotkey" to set the focus on the combobox then drop it
down.
[quoted text clipped - 9 lines]
Now the key combination <Alt> + <D> will dropdown the combobox

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
T

tina

yes, you can use the ampersand in any form control's associated label to
create a hot key to set focus on that control.

hth


missinglinq via AccessMonster.com said:
Much simpler, Tina! I didn't realize you could do that with the cbo label!
as an alternative, you can set a hotkey on any letter in the combobox
control's label, using the ampersand in the label's Caption property, and
add code to the combobox's Enter event procedure to dropdown the list, as

Private Sub ComboboxName_Enter()

Me!ComboboxName.Dropdown

End Sub

hth
You could set up a "hotkey" to set the focus on the combobox then drop it
down.
[quoted text clipped - 9 lines]
Now the key combination <Alt> + <D> will dropdown the combobox

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
R

RoyVidar

ernie said:
I have a combo box on an input form which I would like to open and make the
selection using the keyboard rather than turning to the mouse. This is
probably some built in thing but I don't see it in Help.
Thank you,
ern.

In addition to F4, mentioned by Douglas Steele, hitting ALT + DownArrow
is also a standard Windows shortcut to open a combo box.
 
E

ernie

RoyVidar said:
In addition to F4, mentioned by Douglas Steele, hitting ALT + DownArrow
is also a standard Windows shortcut to open a combo box.

Thank you, I should have known that.
Regards,
ern.
 
E

ernie

Useful in a list of options,
regards,
ern.

tina said:
yes, you can use the ampersand in any form control's associated label to
create a hot key to set focus on that control.

hth


missinglinq via AccessMonster.com said:
Much simpler, Tina! I didn't realize you could do that with the cbo label!
drop
it
down.
[quoted text clipped - 9 lines]

Now the key combination <Alt> + <D> will dropdown the combobox

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
E

ernie

Thank you for F4,
ern.

Douglas J. Steele said:
When the combo box has focus, F4 will drop the list down. You can move up
and down through the list using the up and down arrows.
 
P

Pete D.

I'm like the home row keys too and hate moving to the mouse.

Private Sub YourControl_GotFocus()
Me!YourControl.Dropdown
End Sub


--
Pete D.

ernie said:
Useful in a list of options,
regards,
ern.

tina said:
yes, you can use the ampersand in any form control's associated label to
create a hot key to set focus on that control.

hth


missinglinq via AccessMonster.com said:
Much simpler, Tina! I didn't realize you could do that with the cbo label!

tina wrote:
as an alternative, you can set a hotkey on any letter in the combobox
control's label, using the ampersand in the label's Caption property, and
add code to the combobox's Enter event procedure to dropdown the list, as

Private Sub ComboboxName_Enter()

Me!ComboboxName.Dropdown

End Sub

hth

You could set up a "hotkey" to set the focus on the combobox then
drop
it
down.
[quoted text clipped - 9 lines]

Now the key combination <Alt> + <D> will dropdown the combobox

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
E

ernie

I have built the expression =[Combo8].[AutoExpand] in the On Got Focus event
of the combo box, it does not work to drop the box on it getting the focus,
should I replace AutoExpand with Dropdown? I don't know where to put your
(personalized) code, could you give more detail please.

Thank you,
ern.

Pete D. said:
I'm like the home row keys too and hate moving to the mouse.

Private Sub YourControl_GotFocus()
Me!YourControl.Dropdown
End Sub


--
Pete D.

ernie said:
Useful in a list of options,
regards,
ern.

tina said:
yes, you can use the ampersand in any form control's associated label to
create a hot key to set focus on that control.

hth


Much simpler, Tina! I didn't realize you could do that with the cbo label!

tina wrote:
as an alternative, you can set a hotkey on any letter in the combobox
control's label, using the ampersand in the label's Caption
property,
and
add code to the combobox's Enter event procedure to dropdown the
list,
as
Private Sub ComboboxName_Enter()

Me!ComboboxName.Dropdown

End Sub

hth

You could set up a "hotkey" to set the focus on the combobox then drop
it
down.
[quoted text clipped - 9 lines]

Now the key combination <Alt> + <D> will dropdown the combobox

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
P

Pete D.

In the combo box right click while in design mode. put your cursor in the
event GotFocus and then click the dropdown on the right. Go to the code
window and you will see Private Sub YourControlName_GotFocus() Add
Me!YourControlName.Dropdown and end sub will be their already. Every time
cursor goes to this box it will drop down for you.


Private Sub YourControl_GotFocus()
Me!YourControl.Dropdown
End Sub


--
Pete D.

ernie said:
I have built the expression =[Combo8].[AutoExpand] in the On Got Focus
event
of the combo box, it does not work to drop the box on it getting the
focus,
should I replace AutoExpand with Dropdown? I don't know where to put your
(personalized) code, could you give more detail please.

Thank you,
ern.

Pete D. said:
I'm like the home row keys too and hate moving to the mouse.

Private Sub YourControl_GotFocus()
Me!YourControl.Dropdown
End Sub


--
Pete D.

ernie said:
Useful in a list of options,
regards,
ern.

yes, you can use the ampersand in any form control's associated label to
create a hot key to set focus on that control.

hth


Much simpler, Tina! I didn't realize you could do that with the cbo
label!

tina wrote:
as an alternative, you can set a hotkey on any letter in the combobox
control's label, using the ampersand in the label's Caption property,
and
add code to the combobox's Enter event procedure to dropdown the list,
as

Private Sub ComboboxName_Enter()

Me!ComboboxName.Dropdown

End Sub

hth

You could set up a "hotkey" to set the focus on the combobox then
drop
it
down.
[quoted text clipped - 9 lines]

Now the key combination <Alt> + <D> will dropdown the combobox

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
E

ernie

That's great, works fine. Thank you.

Regards,
ern.

Pete D. said:
In the combo box right click while in design mode. put your cursor in the
event GotFocus and then click the dropdown on the right. Go to the code
window and you will see Private Sub YourControlName_GotFocus() Add
Me!YourControlName.Dropdown and end sub will be their already. Every time
cursor goes to this box it will drop down for you.


Private Sub YourControl_GotFocus()
Me!YourControl.Dropdown
End Sub


--
Pete D.

ernie said:
I have built the expression =[Combo8].[AutoExpand] in the On Got Focus
event
of the combo box, it does not work to drop the box on it getting the
focus,
should I replace AutoExpand with Dropdown? I don't know where to put your
(personalized) code, could you give more detail please.

Thank you,
ern.

Pete D. said:
I'm like the home row keys too and hate moving to the mouse.

Private Sub YourControl_GotFocus()
Me!YourControl.Dropdown
End Sub


--
Pete D.

Useful in a list of options,
regards,
ern.

yes, you can use the ampersand in any form control's associated
label
to
create a hot key to set focus on that control.

hth


Much simpler, Tina! I didn't realize you could do that with the cbo
label!

tina wrote:
as an alternative, you can set a hotkey on any letter in the combobox
control's label, using the ampersand in the label's Caption property,
and
add code to the combobox's Enter event procedure to dropdown the list,
as

Private Sub ComboboxName_Enter()

Me!ComboboxName.Dropdown

End Sub

hth

You could set up a "hotkey" to set the focus on the combobox then
drop
it
down.
[quoted text clipped - 9 lines]

Now the key combination <Alt> + <D> will dropdown the combobox

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
 
L

Larry Linson

ernie said:
I have built the expression =[Combo8].[AutoExpand]
in the On Got Focus event of the combo box,
it does not work to drop the box on it getting the focus,
should I replace AutoExpand with Dropdown?

What happened when you tried doing so?

Larry Linson
Microsoft Access MVP
 
E

ernie

Oops, I never did try "Dropdown" after getting Pete D's code into the Event
Procedure.
OK, I just tried it and it works fine. Is there a preferred method?
Thank you,
ern.

Larry Linson said:
ernie said:
I have built the expression =[Combo8].[AutoExpand]
in the On Got Focus event of the combo box,
it does not work to drop the box on it getting the focus,
should I replace AutoExpand with Dropdown?

What happened when you tried doing so?

Larry Linson
Microsoft Access MVP
 

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