Writing code for arrows in fields

ThatDougGuy

Registered User.
Local time
Today, 03:56
Joined
Feb 25, 2001
Messages
10
Hi All
Im new at VBA and boy am i stuck. What i need to do is write code for the arrow keys(up, down, left, right). the keys will be a command button and will need to work just like the keys on the keyboard(I need to remake the wheel here).

I made a basic keyborad on the screen with cmd buttons so when the user click on the button the letter will show up in the text box that has focus. and want them able to go back and edit the info without clearing the whole field.(to chang typos). This program will be running on a touch screen when finshed. Im using Access becuse thats what they want.

IF any one could help PLEASE do i don't know where to start with the arrow(the only think left to do). I can sent you a copy of the Form and code if you need more info.

Thanks ,
Lost entry level programmer
 
You will need to trap for the forms KeyPress value to see if one of the arrow keys was pressed. If so, you need to set the focus to the correct cmdButton and call the underlying code.
 
Code snippet for the Keypress-event:

select case key
case VBDOWN
key=0 ' deactivate the "Standard" behaviour
' your code
' and so on!
 

Users who are viewing this thread

Back
Top Bottom