能否对下面的代码优化一下
Private Sub Command4_Click() '删除本条记录If Adodc3.Recordset.RecordCount = 0 Then Exit Sub '记录表中无记录时,如果要删除,就立即退出Adodc3.Recordset.DeleteIf Adodc3.Recordset.RecordCount = 0 Then Exit Sub '删除了最后一条记录则退出Adodc3.Recordset.MoveNextEnd Sub
Private Sub Command4_Click() '删除本条记录 On Error Resume Next If Adodc1.Recordset.EOF Then Exit Sub Adodc3.Recordset.Delete If Err.Number <> 0 Then Err.Clear: Exit Sub Adodc3.Recordset.MoveNext If Err.Number <> 0 Then Err.ClearEnd Sub