When I use the code below, I sometimes receive a Error 3021. This only happens when I have one record in the recordset. Can you please tell me why, and how to fix it? It seems I've tried everything!
Thanks
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