472,093 Members | 2,481 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,093 software developers and data experts.

Auto Expand Drop Down Menu Box

I've got a control on my form that allows the user to select a record
based on a form field (in this example, the drop down menu shows the
company name, followed by the contact name but uses the contactid to
change the data on the form). Most users, start typing the company
name which will auto complete itself with the first entry with the
letters typed so far. They can then click on the arrow to view the
listings, select the one they want and the form changes.

However, I have a bunch of mini-me's in the office, that like to do
everything by keyboard if possible. So they are using ALT+Down Arrow
to expand the list. Is it possible to code the control to auto expand
when entered, preferrable not till the first letter is typed?

Thanks a bunch!

mike
(Dim mike=novice coder)

Sep 5 '07 #1
4 13886
"magmike" <ma******@yahoo.comwrote in message
news:11*********************@k79g2000hse.googlegro ups.com...
I've got a control on my form that allows the user to select a record
based on a form field (in this example, the drop down menu shows the
company name, followed by the contact name but uses the contactid to
change the data on the form). Most users, start typing the company
name which will auto complete itself with the first entry with the
letters typed so far. They can then click on the arrow to view the
listings, select the one they want and the form changes.

However, I have a bunch of mini-me's in the office, that like to do
everything by keyboard if possible. So they are using ALT+Down Arrow
to expand the list. Is it possible to code the control to auto expand
when entered, preferrable not till the first letter is typed?

Thanks a bunch!

mike
(Dim mike=novice coder)
Lets say your combo is called Combo1. You need an OnEnter event proc that
looks like:

Private Sub Combo1_Enter()
Me.Combo1.Dropdown
End Sub

Sep 5 '07 #2
On Sep 5, 12:03 pm, "Stuart McCall" <smcc...@myunrealbox.comwrote:
"magmike" <magmi...@yahoo.comwrote in message

news:11*********************@k79g2000hse.googlegro ups.com...


I've got a control on my form that allows the user to select a record
based on a form field (in this example, the drop down menu shows the
company name, followed by the contact name but uses the contactid to
change the data on the form). Most users, start typing the company
name which will auto complete itself with the first entry with the
letters typed so far. They can then click on the arrow to view the
listings, select the one they want and the form changes.
However, I have a bunch of mini-me's in the office, that like to do
everything by keyboard if possible. So they are using ALT+Down Arrow
to expand the list. Is it possible to code the control to auto expand
when entered, preferrable not till the first letter is typed?
Thanks a bunch!
mike
(Dim mike=novice coder)

Lets say your combo is called Combo1. You need an OnEnter event proc that
looks like:

Private Sub Combo1_Enter()
Me.Combo1.Dropdown
End Sub- Hide quoted text -

- Show quoted text -
I put this in the OnChange property, which waits to pop it up until
typing takes place, which is what I wanted. That works great when
using all keyboard, but when someone uses the mouse to click on their
selection, the combo box pops it back up after clicking. Is there a
way to use the OnChange property so it stays put until the keyboarders
start typing but that it wont stay up when someone uses their mouse to
click on a selection?

(NOTE - the keyboarders are typing until they get to their desired
record, then hitting the ENTER button)

Thanks!

Sep 5 '07 #3
On Sep 5, 3:16 pm, magmike <magmi...@yahoo.comwrote:
On Sep 5, 12:03 pm, "Stuart McCall" <smcc...@myunrealbox.comwrote:
"magmike" <magmi...@yahoo.comwrote in message
news:11*********************@k79g2000hse.googlegro ups.com...
I've got a control on my form that allows the user to select a record
based on a form field (in this example, the drop down menu shows the
company name, followed by the contact name but uses the contactid to
change the data on the form). Most users, start typing the company
name which will auto complete itself with the first entry with the
letters typed so far. They can then click on the arrow to view the
listings, select the one they want and the form changes.
However, I have a bunch of mini-me's in the office, that like to do
everything by keyboard if possible. So they are using ALT+Down Arrow
to expand the list. Is it possible to code the control to auto expand
when entered, preferrable not till the first letter is typed?
Thanks a bunch!
mike
(Dim mike=novice coder)
Lets say your combo is called Combo1. You need an OnEnter event proc that
looks like:
Private Sub Combo1_Enter()
Me.Combo1.Dropdown
End Sub- Hide quoted text -
- Show quoted text -

I put this in the OnChange property, which waits to pop it up until
typing takes place, which is what I wanted. That works great when
using all keyboard, but when someone uses the mouse to click on their
selection, the combo box pops it back up after clicking. Is there a
way to use the OnChange property so it stays put until the keyboarders
start typing but that it wont stay up when someone uses their mouse to
click on a selection?

(NOTE - the keyboarders are typing until they get to their desired
record, then hitting the ENTER button)

Thanks!
Try this

Private Sub Combo1_KeyPress(KeyAscii As Integer)
If Len(Me.Combo1.Text) = 0 Then
Me.Combo1.Dropdown
End If
End Sub

Sep 5 '07 #4
On Sep 5, 2:59 pm, lgeastw...@gmail.com wrote:
On Sep 5, 3:16 pm, magmike <magmi...@yahoo.comwrote:


On Sep 5, 12:03 pm, "Stuart McCall" <smcc...@myunrealbox.comwrote:
"magmike" <magmi...@yahoo.comwrote in message
>news:11*********************@k79g2000hse.googlegr oups.com...
I've got a control on my form that allows the user to select a record
based on a form field (in this example, the drop down menu shows the
company name, followed by the contact name but uses the contactid to
change the data on the form). Most users, start typing the company
name which will auto complete itself with the first entry with the
letters typed so far. They can then click on the arrow to view the
listings, select the one they want and the form changes.
However, I have a bunch of mini-me's in the office, that like to do
everything by keyboard if possible. So they are using ALT+Down Arrow
to expand the list. Is it possible to code the control to auto expand
when entered, preferrable not till the first letter is typed?
Thanks a bunch!
mike
(Dim mike=novice coder)
Lets say your combo is called Combo1. You need an OnEnter event proc that
looks like:
Private Sub Combo1_Enter()
Me.Combo1.Dropdown
End Sub- Hide quoted text -
- Show quoted text -
I put this in the OnChange property, which waits to pop it up until
typing takes place, which is what I wanted. That works great when
using all keyboard, but when someone uses the mouse to click on their
selection, the combo box pops it back up after clicking. Is there a
way to use the OnChange property so it stays put until the keyboarders
start typing but that it wont stay up when someone uses their mouse to
click on a selection?
(NOTE - the keyboarders are typing until they get to their desired
record, then hitting the ENTER button)
Thanks!

Try this

Private Sub Combo1_KeyPress(KeyAscii As Integer)
If Len(Me.Combo1.Text) = 0 Then
Me.Combo1.Dropdown
End If
End Sub- Hide quoted text -

- Show quoted text -
Perfect! Thanks!

Sep 5 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Angie H. | last post: by
2 posts views Thread by hemanth.singamsetty | last post: by
2 posts views Thread by Krustov | last post: by
4 posts views Thread by TycoonUK | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.