Entry Form Allows page up and page to scroll through records

  • Thread starter Thread starter Robert_DubYa
  • Start date Start date
R

Robert_DubYa

This seams like a simple question... I have a form that opens to a new
entry. This form allows the user to use the page up and page down keys to
navigate through the records already entered. Is there a way to disable the
page up and page down navigation in a form?
 
It is possible. Set the form's KeyPreview property to Yes. Then examine the
value of the keypress in the form's KeyDown event, and destroy the keystroke
(by setting it to zero) if it is vbKeyPageUp or vbKeyPageDown.

Of course, you are now destroying built-in functionality, so you need to
have a pretty good reason for doing that. We often see people doing that
because they don't understand that they must do their record-level
validation in Form_BeforeUpdate. There are so many ways that a record can be
saved, that just disabling PgDn and PgUp for that purpose would be useless.
 
Back
Top