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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to disable

Status
Not open for further replies.

aqm

Programmer
Aug 26, 2002
65
0
0
AO
hi,
please help, how can i disable page up and page down keys?
i have already used this code:
'************ Code Start **********
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
'33 - PgUp; 34 - PgDown; 9 - Tab; 18=Alt
Select Case KeyCode
Case 33, 34, 9, 18
KeyCode = 0
Case Else
'Debug.Print KeyCode, Shift
End Select
End Sub
'************ Code End **********

and set the form´s key prieview event, but didn´t work.
please help.help.
 
Set the KeyPreview property to Yes, and use this code:

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 33 Or KeyCode = 34 Then
KeyCode = 0
End If
End Sub
---
Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@yahoo.com
 
hi,
i tried it but could not work. where do i put it, on the keydown click?
 
On forms key down event. Make sure the forms key preview property is set to yes. Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@yahoo.com
 
hi, the pgup and down now are not working, but it is being down by the mouse wheel(scroll). how do i disable it totally?
help
aqm
 
I answered this question about disabling the mouse scrolling yesterday. If you will search for my posts yesterday, you should be able to find the answer. Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@yahoo.com
 
you just told me to search the microsoft site, but i found nothing.
please help
aqm
 
I looked it up for you. I thought I remembered your name. I answered your question yesterday. Below is the entire thread. I hope this helps you.

aqm (Programmer)
Oct 23, 2002
hi,
iam using access 2000, how can disable a mouse scroll? i check microsoft KB didn´t find it.
help
aqm


Mark this post as a helpful/expert post!

Inappropriate post?
If so, Red Flag it!

Check out the FAQ
area for this forum!


thornmastr (Programmer)
Oct 23, 2002
Is the Cycle property of the form set to Current Record? If yes and if you
still experience this problem, then try upgrading the Mouse Drivers from
I've heard reports that the latest drivers fix
this problem.

Codewise, the only way is to hook into the messages via AddressOf and eat
the MouseWheel events. There should be some code at ->
API section.


Also, you might want to look at


function.htm

Robert Berman
Data Base consultant
Vulcan Software Services


Robert Berman
Data Base consultant
Vulcan Software Services
thornmastr@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top