Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Dim intCtrlDown As Integer
intCtrlDown = (Shift And acCtrlMask) > 0
If intCtrlDown Then
If KeyCode = 15 Then
Me.Recordset.AddNew
KeyCode = 0
End If
End If
End Sub
这个代码为什么不行????
用下面这段代码,按Ctrl就可以直接跳到新记录
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Dim intCtrlDown As Integer
intCtrlDown = (Shift And acCtrlMask) > 0
If intCtrlDown Then
Me.Recordset.AddNew
End If
End Sub