If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Right and Left Arrow Keys
I have a form with two command buttons:
cmdNextRecord cmdPreviousRecord Is there coding out there that will allow the user to control the command button "cmdNextRecord" On Click Event with the keyboard's right arrow key?... And the command button "cmdPreviousRecord" with the left arrow key? Any help would be great!!!! -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200911/1 |
#2
|
|||
|
|||
Right and Left Arrow Keys
Not sure how to code for the right/left arrow keys, but you users can use the
PageUp and PageDown keys to scroll among the records. -- Daryl S "User via AccessMonster.com" wrote: I have a form with two command buttons: cmdNextRecord cmdPreviousRecord Is there coding out there that will allow the user to control the command button "cmdNextRecord" On Click Event with the keyboard's right arrow key?... And the command button "cmdPreviousRecord" with the left arrow key? Any help would be great!!!! -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200911/1 . |
#3
|
|||
|
|||
Right and Left Arrow Keys
For the form, goto Properties - Events and set Key Preview to Yes.
Then use this code: Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyRight Then Call cmdNextRecord_Click If KeyCode = vbKeyLeft Then Call cmdPreviousRecord_Click End Sub But I have to warn you, most users are going to expect the Left/Right arrows to move the cursor to the left or right and might not like to find out that standard functions have been removed! -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via http://www.accessmonster.com |
#4
|
|||
|
|||
Right and Left Arrow Keys
Events and set Key Preview to Yes.
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyRight Then Call cmdNextRecord_Click If KeyCode = vbKeyLeft Then Call cmdPreviousRecord_Click End Sub Works Great!!! Thank You!!!!! -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200911/1 |
#5
|
|||
|
|||
Right and Left Arrow Keys
Glad we could help!
-- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via http://www.accessmonster.com |
Thread Tools | |
Display Modes | |
|
|