Üst üste 2. kaydı silerken
run-time error 3021 no current record hatası veriyor. Kod şöyle;
Kod:
Private Sub Komut98_Click()
Dim blnLast As Boolean
'MsgBox call must return the value in order to be checked.
'If user says no then cancelling is not required. It is only required
' that the deletion command is not invoked.
If MsgBox(Prompt:="Bu kaydı silmek istediğinizden eminmisiniz?" _
, Buttons:=vbYesNo Or vbQuestion _
, Title:="Deleting Record") = vbNo Then Exit Sub
'At this point it's clear we need to delete the record.
'Using With Me is a more efficient approach to object usage.
With Me
'Remember for later if record is last.
blnLast = (.CurrentRecord = .Recordset.RecordCount)
Call .Recordset.Delete
'Only step back if deleted record was the last.
If blnLast Then Call DoCmd.GoToRecord(Record:=acPrevious)
End With
End Sub