Entry Form Allows page up and page to scroll through records

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?
 
A

Allen Browne

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top