![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm using Access 2010 with a form containing a list box. The code I'm using for the KeyPress event in the list box, calls the after update event for the same control. But somehow, it is also triggering a call to the Click Event. It's happening on one form, but not on another with a similar set up. Can anyone point me in the right direction? -- Bob Darlington Brisbane |
#3
| |||
| |||
|
|
"Bob Darlington"<bob (AT) dpcman (DOT) com.au> wrote in message news:4efd5c2a$0$26205$c3e8da3$c14f6927 (AT) news (DOT) astraweb.com... I'm using Access 2010 with a form containing a list box. The code I'm using for the KeyPress event in the list box, calls the after update event for the same control. But somehow, it is also triggering a call to the Click Event. It's happening on one form, but not on another with a similar set up. Can anyone point me in the right direction? -- Bob Darlington Brisbane The up& down arrow keys trigger a click event in listboxes. Could these be the keys you're trying to control? If so, consider using the KeyDown event to detect them, then destroy the keypress using KeyCode = 0. I'm pretty sure that'll occur before they are passed to the listbox. Select Case KeyCode Case vbKeyDown KeyCode = 0 'process the key here Case KeyUP KeyCode = 0 ... Thanks Stuart. |
![]() |
| Thread Tools | |
| Display Modes | |
| |