Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Dim lRows As Long
Dim I As Long
If KeyCode = 116 Then
If MsgBox("您确定要复制 " & SelHeight & " 条数据吗?", vbExclamation + vbYesNo) = vbNo Then Exit Sub
lRows = Me.SelHeight ' 选定的行数
DoCmd.Echo False
For I = lRows To lRows
CurrentDb.Execute "INSERT INTO Tbl2 ( A, B, C ) SELECT Tbl1.A, Tbl1.B, Tbl1.C FROM Tbl1 WHERE Tbl1.ID=" & Me.ID & ";" Me.Recordset.MoveNext
Next
Forms!copyform.sFrm2.Form.Requery
DoCmd.Echo True
End If