R
Robert
I have a main form with a datasheet subform on it. Records can be deleted
from the subform by selecting the record and then clicking on the delete
icon on the toolbar. But I want a custom delete button. And you can't put
a button on a datasheet. So if I put a button on the main form, what code
do I use to delete the selected record(s) on the datasheet subform? The
following when placed in the button's on click event do not work:
DoCmd.RunCommand acCmdDeleteRecord
and
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Robert
from the subform by selecting the record and then clicking on the delete
icon on the toolbar. But I want a custom delete button. And you can't put
a button on a datasheet. So if I put a button on the main form, what code
do I use to delete the selected record(s) on the datasheet subform? The
following when placed in the button's on click event do not work:
DoCmd.RunCommand acCmdDeleteRecord
and
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
Robert