Private Sub Form_Current() '窗体成为当前事件代码
If Me.NewRecord = True Then '如果新增记录
If MsgBox("是否复制上笔记录?", vbYesNo) = vbNo Then '提示是否复制
Exit Sub
End If
Dim rsClone As Recordset '定义记录集
Set rsClone = Me.RecordsetClone
rsClone.MoveLast '移动到最后一条记录
Me!科目编号 = rsClone!科目编号
Me!学号 = rsClone!学号
Me!姓名 = rsClone!姓名
Me!考试日期 = rsClone!考试日期
Me!单元 = rsClone!单元
Me!考试类别 = rsClone!考试类别
Me!成绩 = rsClone!成绩
Set rsClone = Nothing '关闭记录集
End If
End Sub