I added to your Select code
case VbRetur
Call Me.List2_clic
to enable seklection via Enter ke
Thanks
- Davi
----- Stephen Lebans wrote: ----
If you'd like to use the Arrow Keys to navigate through a ListBox eve
if the ListBox does not have the focus then read on
Go to Form properties and set the Key Preview to Yes
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer
Select Case KeyCod
Case vbKeyDow
Me.List2 = Me.List2.ItemData(Me.List2.ListIndex + 1
KeyCode =
Case vbKeyU
Me.List2 = Me.List2.ItemData(Me.List2.ListIndex - 1
KeyCode =
Case Els
End Selec
End Su
Tthe above code is for a ListBox named List2. Change the name to reflec
your ListBox. Also this is set to work with a ListBox WITHOUT Colum
Headers turned on. You'll have to adjust it if you use Column Headers
Finally the Arrow Keys are sent to oblivion with the Line KeyCode =0
Your mileage may vary. :-
-
HT
Stephen Leban
http://www.lebans.co
Access Code, Tips and Trick
Please respond only to the newsgroups so everyone can benefit