Office中国论坛/Access中国论坛

标题: 转:在绑定数据窗中,如何阻止按PageUp、PageDown及箭头键跳到其它记录? [打印本页]

作者: Macinley    时间: 2003-2-22 11:42
标题: 转:在绑定数据窗中,如何阻止按PageUp、PageDown及箭头键跳到其它记录?
[B]转:在绑定数据窗中,如何阻止按PageUp、PageDown及箭头键跳到其它记录?
和 阻止鼠标的滚轮?[/B]



[URL=http://www.office-cn.net/bbs/dispbbs.asp?boardID=2&RootID=30731&ID=30731][/URL]
作者: zhengjialon    时间: 2003-2-22 16:46
用这个锁定试试,滚轮不会
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Dim intCtrlDown As Integer
    intCtrlDown = (Shift And acCtrlMask) > 0
    If intCtrlDown And KeyCode = vbKeyZ Then
        MsgBox "现在不可用Ctrl+Z撤消!" & KeyCode, 48
        KeyCode = 0
    ElseIf KeyCode = vbKeyEscape Then
        MsgBox "现在不可用ESC键撤消!" & KeyCode, 48
        KeyCode = 0
    End If
End Sub





欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) Powered by Discuz! X3.3