I have a form called frmProducts with a subform on it called subProducts.
The subform is in datasheet view.
I have a 'Delete' button on my form which when pressed I want the SELECTED records in the subform deleted.
The subform has it's RecordSelectors visible - this is how the user can select mutliple records.
In the button click event I have:
The problem is that as soon as the user Clicks the 'Delete' button the focus moves from the subform which causes the selection of records in the subform to change. The selection changes to become only the current record.
Is there a way to stop this behaviour?
Currently the only way the user can delete a range of records is by right mouse clicking on the selection to bring up the 'context sensitive' menu (also know as pop-up menu) and selecting delete from here. Obviously such menus do not cause a change of focus to occur.
The use of context sensitive menus is far from intuitive for most users however - so this is far from idea as a solution.
Just clicking a button is much better.