Disable default settings of PAGE UP and PAGE DOWN keys in a form (1 Viewer)

dbone

New member
Local time
Tomorrow, 00:49
Joined
May 4, 2022
Messages
2
In a MS Access form, the PAGE UP and PAGE DOWN keys navigate between records by default.

Since this is hardly intuitive to me, I aim to disalble this default setting.

Instead I would like to configure the setting as one is accustomed to from any other application that comes to mind (be it Outlook, Word, any web browser, Adobe Reader etc.) which is jump up or down the screen respectively.
 

GPGeorge

Grover Park George
Local time
Today, 15:49
Joined
Nov 25, 2004
Messages
678
You can trap the keypress and do something different. I am sure there's sample code around; a search on trapping keypress and keycodes should turn up some possibilities.

That said, I'm curious how this would actually look in Access, as opposed to Word, etc.

Let's say you have a form displaying a record in Single Form View. That record has multiple fields, bound to controls on the form. What would a "page" be in that situation and how would "jumping down the screen" look?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 17:49
Joined
Feb 28, 2001
Messages
22,820
George brings up a good point. You want to configure it to be like something else. But I want to suggest that part of the problem is in your viewpoint. The "like any other application that comes to mind" ignores the fact that Access isn't like any of the other applications. Its uniqueness is that it manipulates data in different-sized gulps than those other programs. The "Page Down" key is giving you "one gulp" and you need to see it that way.

Having said that, far be it from me to tell you it can't be done. You need to look into implementing a "KeyPress" event for EACH FORM that you want to exhibit this changed behavior. There is no "global" keypress filter, but you can intercept keys on every form and can substitute different keys for each form; i.e. the substituted character does not have to be the same for each form. You can then intercept each keypress to see if it is PgUp or PgDn and either "eat" or "alter" the character that Access sees. Or, if the form doesn't have a situation that requires whatever you are trying to do, you can do nothing and let the characters pass through unaltered.


There is a discussion in that article of which events occur during certain form actions. If you are going to do this, read carefully.
 

Gasman

Enthusiastic Amateur
Local time
Today, 23:49
Joined
Sep 21, 2011
Messages
10,561
In a MS Access form, the PAGE UP and PAGE DOWN keys navigate between records by default.

Since this is hardly intuitive to me, I aim to disalble this default setting.

Instead I would like to configure the setting as one is accustomed to from any other application that comes to mind (be it Outlook, Word, any web browser, Adobe Reader etc.) which is jump up or down the screen respectively.
If you use a Continuous or Datasheet form then it behaves as even you are accustomed to?, so your logic is flawed?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 18:49
Joined
Feb 19, 2002
Messages
36,352
For forms in single view, you should almost always change the Cycle property on the Other tab to "Current Record". This prevents the user from using tab or enter to change records accidentally. I usually do it for continuous/DS form views also. I always want the user to be conscious that he is moving to a new record so I want him to always use the scroll bar.

CycleProperty.JPG
 

Users who are viewing this thread

Top Bottom