L
Lachlan Sharp
I want to be able to navigate between records in Form view
by using the up and down arrow keys the same as is done in
a forms datasheet view.
The keydown event for my textbox controls looks like this:
' ********
If Me.CurrentView = 1 Then ' When in Form View
Select Case KeyCode
Case 38 ' Arrow Up
If Shift = 0 Then
' If only the arrow key pressed then _
replace keystroke with ctrl+PgeUp
KeyCode = 33 ' Page Up
Shift = 2 ' Ctrl
End If
Case 40 ' Arrow Down
If Shift = 0 Then
' If only the arrow key pressed then _
replace keystroke with ctrl+PgDn
KeyCode = 34 ' Page Down
Shift = 2 ' Ctrl
End If
End Select
End If
' *******
The problem is that I don't seem to be able to change
the 'Shift' value and hence the result is the same as
the 'Page Up' or 'Page Down' keys on their own.
How can I emmulate Ctrl+PgUp and Ctrl+PgDn?
Thanks
Lachlan Sharp
by using the up and down arrow keys the same as is done in
a forms datasheet view.
The keydown event for my textbox controls looks like this:
' ********
If Me.CurrentView = 1 Then ' When in Form View
Select Case KeyCode
Case 38 ' Arrow Up
If Shift = 0 Then
' If only the arrow key pressed then _
replace keystroke with ctrl+PgeUp
KeyCode = 33 ' Page Up
Shift = 2 ' Ctrl
End If
Case 40 ' Arrow Down
If Shift = 0 Then
' If only the arrow key pressed then _
replace keystroke with ctrl+PgDn
KeyCode = 34 ' Page Down
Shift = 2 ' Ctrl
End If
End Select
End If
' *******
The problem is that I don't seem to be able to change
the 'Shift' value and hence the result is the same as
the 'Page Up' or 'Page Down' keys on their own.
How can I emmulate Ctrl+PgUp and Ctrl+PgDn?
Thanks
Lachlan Sharp