L
LAS
I tried this and that and finally, via Google, came up with this? Is there
a more intuitive, straightforward way to delete a record from a table and
simultaneously cause the form to go to the next record?
Public Function fncDelCurrentRec(ByRef frmSomeForm As Form) As Boolean
With frmSomeForm
If .NewRecord Then
.Undo
fncDelCurrentRec = True
GoTo Exit_DelCurrentRec
End If
End With
With frmSomeForm.RecordsetClone
.Bookmark = frmSomeForm.Bookmark
.Delete
' frmSomeForm.Requery
End With
fncDelCurrentRec = True
Exit_DelCurrentRec:
Exit Function
Err_DelCurrentRec:
MsgBox (Err.Description)
fncDelCurrentRec = False
Resume Exit_DelCurrentRec
End Function
a more intuitive, straightforward way to delete a record from a table and
simultaneously cause the form to go to the next record?
Public Function fncDelCurrentRec(ByRef frmSomeForm As Form) As Boolean
With frmSomeForm
If .NewRecord Then
.Undo
fncDelCurrentRec = True
GoTo Exit_DelCurrentRec
End If
End With
With frmSomeForm.RecordsetClone
.Bookmark = frmSomeForm.Bookmark
.Delete
' frmSomeForm.Requery
End With
fncDelCurrentRec = True
Exit_DelCurrentRec:
Exit Function
Err_DelCurrentRec:
MsgBox (Err.Description)
fncDelCurrentRec = False
Resume Exit_DelCurrentRec
End Function