D
Dou
How to Delete current record in a subform using a command button? But it
still show other records.
Thanks
still show other records.
Thanks
Allen Browne said:With Me.[NameOfYourSubformControlHere].Form
If .NewRecord Then
Beep
Else
.RecordsetClone.Bookmark = .Bookmark
.RecordsetClone.Delete
End If
End With
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
Dou said:How to Delete current record in a subform using a command button? But it
still show other records.
Thanks
Dou said:Thanks, I use your code, it can delete the selected record,
but after Requery subform, other record cann'r be shown, like this:
With Me![OrderAddSubform].Form
If .NewRecord Then
Beep
Else
.RecordsetClone.Bookmark = .Bookmark
.RecordsetClone.Delete
Me![OrderAddSubform].Requery
End If
End With
Allen Browne said:With Me.[NameOfYourSubformControlHere].Form
If .NewRecord Then
Beep
Else
.RecordsetClone.Bookmark = .Bookmark
.RecordsetClone.Delete
End If
End With
Dou said:How to Delete current record in a subform using a command button? But
it
still show other records.
Thanks
Allen Browne said:So the other records were showing in the subform before the delete. After
the delete they are still in the table, and they are still there in the
subform unless you requery. But after you requery the subform, they
disappear???
I don't understand why that would be so. They should still be there.