以下のコードを使用すると、エラー 3021 が表示されることがあります。これは、レコードセットに 1 つのレコードがある場合にのみ発生します。原因と修正方法を教えてください。私はすべてを試したようです!
ありがとう
Private Sub cmdDelSelectedAction_Click()
response = MsgBox("Are you sure?", vbYesNo, "Confirmation required")
If response = vbNo Then Exit Sub
If Me.[Arrangement-Actions subform].Form.Recordset.EOF Then
Me.[Arrangement-Actions subform].Form.Recordset.MovePrevious
End If
If Me.[Arrangement-Actions subform].Form.Recordset.BOF Then
Me.[Arrangement-Actions subform].Form.Recordset.MoveNext
End If
Me.[Arrangement-Actions subform].Form.Recordset.Delete
Me.[Arrangement-Actions subform].Form.Recordset.MoveNext
End Sub