G
Guest
Hi everyone,
I have a command button and a couple of textbox controls in my subform's
Detail section (with continuous form as the default view). I'd like to be
able to click the button and delete record in the subform.
Arvin Meyer has kindly wrote out the lines for me as below:
Private Sub cmdButtonName_Click()
CurrentDb.Execute "Delete * From tblTableName Where IDName ='" & Me.IDName &
"'"
Me.Requery
End Sub
This allows me to delete ALL records with the same IDName in the table.
However, since all records in my subform have the same IDName, what may I do
if I only wanna delete any one record at a time? Any suggestion is
appreciated.
Regards,
Sam
I have a command button and a couple of textbox controls in my subform's
Detail section (with continuous form as the default view). I'd like to be
able to click the button and delete record in the subform.
Arvin Meyer has kindly wrote out the lines for me as below:
Private Sub cmdButtonName_Click()
CurrentDb.Execute "Delete * From tblTableName Where IDName ='" & Me.IDName &
"'"
Me.Requery
End Sub
This allows me to delete ALL records with the same IDName in the table.
However, since all records in my subform have the same IDName, what may I do
if I only wanna delete any one record at a time? Any suggestion is
appreciated.
Regards,
Sam