Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disabling Page Up and down 3

Status
Not open for further replies.

scrano

Technical User
Jan 24, 2001
51
AU
Can anyone please help me and tell me how to disable the Page Up and Page Down keys. Please. Thanks in advance.
 
I doubt you want to globally disable these keys throughout Access. If you want to disable them for a specific form, set the form's Key Preview property to Yes, and then add the following code in the KeyDown event procedure:
Code:
    If (KeyCode = vbKeyPageUp) Or (KeyCode = vbKeyPageDown) Then
        KeyCode = 0
    End If
Rick Sprague
 
Thanks Rick. Had the right code, missed the Key Preview property.

Bill [2thumbsup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top