Re: Page Down Key Action
- From: "Damon Heron" <damon327@xxxxxxxxxxx>
- Date: Tue, 27 Feb 2007 12:01:09 -0800
Put this code on the form, and set the form's Cycle property to
currentrecord. You may have to experiment with the count numbers for your
particular form, or adjust the length of the form somewhat. The ct is a
variable that is global for the form.
Private Sub Form_Current()
ct = 1
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
'33 - PgUp; 34 - PgDown;
Select Case KeyCode
Case 33
ct = ct - 1
If ct <= 1 Then
KeyCode = 0
ct = 1
End If
Case 34
ct = ct + 1
If ct > 2 Then
KeyCode = 0
ct = 3
End If
Case Else
End Select
End Sub
Private Sub Form_Load()
Me.KeyPreview = True
End Sub
"B F Cole" <bfcole@xxxxxxxxx> wrote in message
news:45e461f3$0$5228$4c368faf@xxxxxxxxxxxxxxxxx
I have a form that is larger than one screen vertically.. The user can
scroll down or press the Page Down key to get to the bottom. If the user
presses Page Down twice, the form goes to a new blank record which I want
to prevent. I know how to disable the Page up & Page Down keys, how to
count the number of times the key has been pressed, etc, but how do I
prevent Page Down on a form from going to a new blank record? There should
be a parameter that controls this action or locks the form to the current
record only. I haven't found it. Any suggestions?
Thanks,
Bill
.
- References:
- Page Down Key Action
- From: B F Cole
- Page Down Key Action
- Prev by Date: Re: Code for conditional formatting
- Next by Date: Re: Passing values to another form WITHOUT opening it?
- Previous by thread: Re: Page Down Key Action
- Next by thread: Make a db become visible
- Index(es):
Relevant Pages
|