Prevent move to next record in form

lynxbci

Registered User.
Local time
Today, 05:08
Joined
Nov 27, 2007
Messages
73
I have a form with no scroll bars, no record selectors, no navigation buttons, and the cycle property set to current record. However when the users presses page down or scrolls with mouse, it moves to the next record in the data source. Can i stop this happening?

The data in the form is editable but records can not be deleted or added.

thanks in advance

Lynxbci
 
You can capture the page down or page up by using the key down event of the form (but you have to set the form's Key Preview property to YES) and then you can use this code:

Code:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    Select Case KeyCode
    Case 33, 34
        KeyCode = 0
    End Select
End Sub
 

Users who are viewing this thread

Back
Top Bottom