How to disable pageup/pagedown in a form so users can't browse records

  • Thread starter Thread starter David Kistner
  • Start date Start date
D

David Kistner

I have a data entry form that I need to limit functionality so that
users cannot browse other records with the form. I think I have
everything disabled except for the pageup and pagedown keys still allow
a user to browse records. How do I disable this? Thanks in advance.

- David Kistner
 
Good morning

The following code should help


Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
' If user presses TAB, ENTER, PAGE UP, PAGE DOWN
Case 13, 9, 33, 34
' Disable the keystroke by setting it to 0
KeyCode = 0
Case Else

Debug.Print KeyCode, Shift
End Select
End Sub


Best Regards

Maurice St-Cyr
Micro Systems Consultants, Inc.
 
Where do I place the code? I've never worked with code in Access.
Thank you very much in advance.

- David Kistner
 
Back
Top