Access 2000 -- Keeping combo-box open while typing

  • Thread starter Thread starter David Dubroff
  • Start date Start date
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
 
Dave

Try this;


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

HTH

Andy
 
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
 
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
 
Back
Top