Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access PAGEUP and PAGEDOWN keys 1

Status
Not open for further replies.

DH

Programmer
Dec 8, 2000
168
Is there a way to disable or prevent the PAGEUP,PAGEDOWN keys and mouse wheel from moving to a blank record when viewing and form? Thanks.
 
Set the Form's Key Preview Event to Yes and use:


Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyPageDown Or KeyCode = vbKeyPageUp Then
KeyCode = 0
End If
End Sub


PaulF
 
Thanks! Any suggestions for disabling the wheel mouse from moving to a new/blank record when scrolling in a form?
 
Not really, however I just looked at the code listed at this URL


take a look at it, there's some code in there that you might be able to use to do what you want. I don't have a wheel mouse on my machine here at home, so I can't do any testing on it.

PaulF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top