B
Byron
I am using Access 2002 and have tried many things but I
still do not have this correct.
I need to delete the current record in a subform using a
command button and if there are other existing records in
the subform move to the previous record.
I am currently using code that I have modified, which I
have used before, from Dev Ashish's web site, as follows:
msgStr = "Delete Current Record?" & vbNewLine &
vbNewLine & " " _
& "Are sure you want to delete the
current ""Contact Times"" record?"
vbResponse = MsgBox(msgStr, vbQuestion + vbYesNo +
vbDefaultButton2, "Delete Record?")
If vbResponse = vbYes Then
With Me.RecordsetClone
.Bookmark = Me.Bookmark
.Delete
Me.Requery
End With
End If
I get a message: "Record has been deleted" when the code
gets to the Me.Requery and the code stops.
What am I missing?
still do not have this correct.
I need to delete the current record in a subform using a
command button and if there are other existing records in
the subform move to the previous record.
I am currently using code that I have modified, which I
have used before, from Dev Ashish's web site, as follows:
msgStr = "Delete Current Record?" & vbNewLine &
vbNewLine & " " _
& "Are sure you want to delete the
current ""Contact Times"" record?"
vbResponse = MsgBox(msgStr, vbQuestion + vbYesNo +
vbDefaultButton2, "Delete Record?")
If vbResponse = vbYes Then
With Me.RecordsetClone
.Bookmark = Me.Bookmark
.Delete
Me.Requery
End With
End If
I get a message: "Record has been deleted" when the code
gets to the Me.Requery and the code stops.
What am I missing?