Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / October 2005

Tip: Looking for answers? Try searching our database.

Combo Box Dropdown

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul Hammond - 14 Oct 2005 20:00 GMT
Here's another combo box question.

I like it when the user start to key in a combo box for it to automatically
dropdown and zone in on the desired selection.

I have done this using the keypress event, but I have to exclude certain
Ascii codes (tab, Enter) in order for the combo box to work correctly.  
Again, this works, but I was looking for a simpler way.

TIA

Paul Hammond
Richmond, VA
Ken Snell [MVP] - 14 Oct 2005 20:11 GMT
Are you using the Dropdown method of the combo box?

You could use the Change event of the combo box to automatically cause the
dropdown list to show when a key is pressed and the key is the first
character for the combo box entry (though, as a user, I wouldn't necessarily
like that result all the time):

Private Sub ComboBoxName_Change()
   If Len(Me.ComboBoxName.Text & "") = 1 Then Me.Dropdown
End Sub

Signature

       Ken Snell
<MS ACCESS MVP>

> Here's another combo box question.
>
[quoted text clipped - 10 lines]
> Paul Hammond
> Richmond, VA
Paul Hammond - 14 Oct 2005 20:51 GMT
I got this work without the "if" statement, but not with it.    One problem,
if the user uses a mouse click to pick out the selection, the list will not
close.   It feels like the selection has been ignored, when it hasn't.

This forces the user to tab or click elsewhere, which doesn't feel natural
with  combo box open.   It seems, 6 of one, 1/2 dozen of another

PH

> Are you using the Dropdown method of the combo box?
>
[quoted text clipped - 21 lines]
> > Paul Hammond
> > Richmond, VA
Ken Snell [MVP] - 14 Oct 2005 21:17 GMT
Yes, had forgotten that the clicking of an item in the combo box's dropdown
list also causes the Change event to occur. And, if the user has typed at
least letter/number into the combo box (assuming that you're using it
without the If statement), the list will remain open when he/she clicks the
item. Coding around this natural behavior may be unnecessarily burdensome
work.....

Not sure why it didn't work with the If statement? Did you get an error of
some type? What happened?

Per Karl's question, cannot AutoExpand just do this for you? Or perhaps you
might like a spin box next to the combo that would allow the user to scroll
the list without dropping it down (see
http://www.cadellsoftware.org/SampleDBs.htm#Cbospin)?

Signature

       Ken Snell
<MS ACCESS MVP>

>I got this work without the "if" statement, but not with it.    One
>problem,
[quoted text clipped - 35 lines]
>> > Paul Hammond
>> > Richmond, VA
Paul Hammond - 14 Oct 2005 22:20 GMT
I actually did get your code to work, but I had to turn autoexpand off, since
it autmatically filled in the entire box and the text length was alway more
than 1.

Seems like some coding is the only way to go here.

I just like the dropdown with the autoexpand feature on, it feels natural
and fast.

Paul
Signature


> Yes, had forgotten that the clicking of an item in the combo box's dropdown
> list also causes the Change event to occur. And, if the user has typed at
[quoted text clipped - 50 lines]
> >> > Paul Hammond
> >> > Richmond, VA
Ken Snell [MVP] - 14 Oct 2005 22:52 GMT
>I actually did get your code to work, but I had to turn autoexpand off,
>since
> it autmatically filled in the entire box and the text length was alway
> more
> than 1.

Ahhhh... yes, that would be the result of AutoExpand.

Signature

       Ken Snell
<MS ACCESS MVP>

Paul Hammond - 17 Oct 2005 14:14 GMT
Again, I think I am making a simple task, difficult.   Lookinig at the
character set values I think this should give me the functionality I want.

Private Sub cboCallResultCode_KeyPress(KeyAscii As Integer)
   If KeyAscii > 31 Then Me.cboCallResultCode.Dropdown
End Sub

Paul
Signature


> >I actually did get your code to work, but I had to turn autoexpand off,
> >since
[quoted text clipped - 3 lines]
>
> Ahhhh... yes, that would be the result of AutoExpand.
KARL DEWEY - 14 Oct 2005 20:22 GMT
Maybe you are talking about the AutoExpand property.

> Here's another combo box question.
>
[quoted text clipped - 9 lines]
> Paul Hammond
> Richmond, VA
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.