keyongtech


  keyongtech > access.* > access.forms > 07/2007

 #1  
07-26-07, 04:04 PM
Song Su
I have a continuse form. When I hit down arrow key, it highlight moves
across to the right instead of same field next record. Is it possible to
move down when pressing down arrow and move up when pressing up arrow?
 #2  
07-26-07, 07:17 PM
B. Edwards
Set the Key Preview property of the form to Yes

In the KeyDown event of the form place the following code:

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
On Error GoTo Err_Label
Select Case KeyCode
Case vbKeyDown
DoCmd.GoToRecord Record:=acNext
KeyCode = 0
Case vbKeyUp
DoCmd.GoToRecord Record:=acPrevious
KeyCode = 0
Case Else
' do nothing
End Select

Exit_Label:
Exit Sub
Err_Label:
If Err.Number = 2105 Then
KeyCode = 0
Else
MsgBox Err.Number
End If
Resume Exit_Label
End Sub


"Song Su" <csitnnn> wrote in message
news:3400
[..]
 #3  
07-26-07, 09:38 PM
Song Su
Thanks a lot. It works great!

"B. Edwards" <bedwards> wrote in message
news:1598
[..]
Similar Threads
Whole sheet moves with arrow

My brother's having problems with Excel (Windows) - he has a couple of spreadsheets he's developed which suddenly won't allow him to change cells using the arrows - the whole...

Excel: When I arrow down, it moves the page, not to new cell.

I changed the preferences to select the cell to the right (instead of below) when I hit enter. Now when I use the arrow key to move to the next cell down, it moves the whole...

using arrow keys moves page not the cell

Arrow keys moves the sheet, not the marker!

Hi! This "feature" is driving me nuts! When I use the arrow keys in the excel worksheet, I'm not moving the marker between cells, but instead I'm scrolling the work sheet,...

arrow moves in excel

The arrow keys are moving the entire grid. It is not moving from box to box. What needs to be changed?


All times are GMT. The time now is 03:15 AM. | Privacy Policy