PgUp and PgDown keys.

miki

Registered User.
Local time
Today, 09:23
Joined
Oct 23, 2001
Messages
18
How I can avoid the record transition when I use PgUp and PgDown keys.
(I have larg and long form and i need use PgUp and PgDown keys to move up and down but avoid the record transition to next or previous)
thanks.


[This message has been edited by miki (edited 11-04-2001).]
 
First open your form in design view. In the property list for the form change the "Key Preview" property to Yes (default is No).

Now in the "On Key Down" property of the form, use the following code:

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
' KeyCode 33 = PgUp, KeyCode 34 = PgDown
If KeyCode = 33 Or KeyCode = 34 Then
  KeyCode = 0
End If
End Sub

HTH
RDH

[This message has been edited by R. Hicks (edited 11-04-2001).]
 

Users who are viewing this thread

Back
Top Bottom