Access 2000 -- Keeping combo-box open while typing

D

David Dubroff

Microsoft Access 2000 Question:
-----------------------------------

What is the best way to drop-down a combo box if a key has been pressed that
makes a match within the list?

When the first letter pressed makes a match, I do not want any other key
presses to close the combo box. I want the combo box to remain open until
the user selects that row. Only the initial key press should open the combo
box and the box should remain open on other key presses.

Bottom line: I want a combo box to open on the first key press when a match
occurs, and I want the combo box to stay open if additional keys are pressed
that continue to match.


Please advise....
Dave
 
A

Andy Cole

Dave

Try this;


Private Sub Combo0_KeyPress(KeyAscii As Integer)
Me.Combo0.Dropdown
End Sub

HTH

Andy
 
A

Andy Cole

Dave

Try this;


Private Sub Combo0_KeyPress(KeyAscii As Integer)
Me.Combo0.Dropdown
End Sub

HTH

Andy
 
D

David Dubroff

Andy...

Thanks for the reply. I will try that. However, that seems like the combo
box will always open with every key press, and I was wondering if I could
have a bit more intelligence associated with the drop-down. I only wanted
the drop-down to occur if the typing caused a match within the list. If no
match, keep the combo-box closed.

If you think of some way to achieve this intelligence / behavior, please let
me know.

Thanks again....
Dave
 
D

David Dubroff

Andy...

Thanks for the reply. I will try that. However, that seems like the combo
box will always open with every key press, and I was wondering if I could
have a bit more intelligence associated with the drop-down. I only wanted
the drop-down to occur if the typing caused a match within the list. If no
match, keep the combo-box closed.

If you think of some way to achieve this intelligence / behavior, please let
me know.

Thanks again....
Dave
 
L

Larry Daugherty

Dave,

In your combobox with the Autoexpand property on, the box will only drop
down automatically if one or more entries in the list begins with the first
letter you type.

HTH
 
L

Larry Daugherty

Dave,

In your combobox with the Autoexpand property on, the box will only drop
down automatically if one or more entries in the list begins with the first
letter you type.

HTH
 

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