G
Guest
Several people here have posted the silmilar questions, but it seems there is still no solution to this
I have a main form with a continuous form subform in it. The main form and the subform are are bound to two different tables. The relationship between the main form and the subform is one to many. I'd like to build a CmdButton in the main form to enable me to delete record or records in the subform. I have tried several ways like using the button building wizard or DoCmd.RunCommand acCmdDeleteRecord, but when I press the delete button the record in the main form with all the related records in the subform are deleted. I know I can do this easily by selecting the record or records in the subform and press the delete key on the keyboard, but I prefer using a delete button on the form. Can anyone help me with this? Thanks.
I have a main form with a continuous form subform in it. The main form and the subform are are bound to two different tables. The relationship between the main form and the subform is one to many. I'd like to build a CmdButton in the main form to enable me to delete record or records in the subform. I have tried several ways like using the button building wizard or DoCmd.RunCommand acCmdDeleteRecord, but when I press the delete button the record in the main form with all the related records in the subform are deleted. I know I can do this easily by selecting the record or records in the subform and press the delete key on the keyboard, but I prefer using a delete button on the form. Can anyone help me with this? Thanks.