Disable Pg Up and Pg Down

J

Justin

Hi,

I need to disable the Page Up and Page Down buttons for a sub-form only.
Any assistantance will be appreciated.
 
A

Allen Browne

1. Open the subform in design view.

2. Set its KeyPreview property to Yes.

3. Add code to the KeyDown event of the form.

4. If the KeyCode matches vbKeyUp or vbKeyDown, destroy the keystroke by
setting KeyCode to zero.
 
Top