[AccessD] Access Combo Box - Stop Text Entry

Gustav Brock Gustav at cactus.dk
Fri Feb 11 07:18:46 CST 2005


Hi Paul

You can use this - which also blocks Alt+ArrowDown and Ctrl-V, thus no
selecting or paste by keypress while mouseclicks still works.

Private Sub cboTestCombo_KeyDown(KeyCode As Integer, Shift As Integer)

  KeyCode = 0
  
End Sub

To block mouse right-clicks too:

Private Sub cboTestCombo_MouseDown(Button As Integer, Shift As Integer,
X As Single, Y As Single)

  If Button And acRightButton = acRightButton Then
    Button = 0
  End If

End Sub

/gustav

>>> paul.hartland at fsmail.net 11-02-2005 13:16:40 >>>
To all,

I have a combo box on a form with a list of five entries, I want to be
able to make the user select from the list, but not be able to type in
the box is there anyway of doing this

Thanks in advance for any help on this.

Paul Hartland
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list