Celoyce Hocamızın çözümüne alternatif olarak aşağıdaki kod da olur sanırım.
İyi çalışmalar.
On Error GoTo hata
If MsgBox("Bu Kayıdı Silmek İstiyormusunuz?", vbYesNo, "Kayıt Silme") = vbYes Then
DoCmd.RunCommand acCmdDeleteRecord
Else
txtCurrentRecord.SetFocus
End If
Exit Sub
hata:
MsgBox "Buraya vermek istediğiniz mesajı yazın.", vbCritical
Resume Next