Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Stop PgDw key from affecting combo box

Posted on 1997-06-30
3
Medium Priority
?
172 Views
Last Modified: 2006-11-17
I am using a video soft view port and am using the following code to scroll the page with the page up and page down buttons

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case &H21: vsViewPort1.VirtualTop = vsViewPort1.VirtualTop - 5000
Case &H22: vsViewPort1.VirtualTop = vsViewPort1.VirtualTop + 5000
End Select
End Sub


This works fine except when a combo box is in focus. Pushing page down not only scowls the page but also has the undesirable affect of changing the selection in the combo box. Is there any way to stop the selection from changing in the combo box?

David
0
Comment
Question by:davidb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
tward earned 400 total points
ID: 1427899
Try on the COMBO1_KEYDOWN to set the Keycode = 0.  This is the way I eat up certain key strokes in the KEYPRESS Event.
0
 

Author Comment

by:davidb
ID: 1427900
I forgot to mention that I would like to have the up and down arrow keys move the como box selections but not the page up and down keys. Any thing that will do this?

David
0
 
LVL 7

Expert Comment

by:tward
ID: 1427901
Only thing I can think of is when you trap keys trap the Left and Right Arrows and change the Keycode to be the keycode of the PAGEDOWN key.
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question