Button alternative to deleting subform records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want a 'Delete' button on the main form that deletes the selected record(s)
in the subform.
My problem is that I want the 'Delete' button to be disabled until a subform
record is selected. I cannot find an event to catch selection of a record
using the record selector. Is there a way of doing this?
Rick
 
That's not going to work.

You can select multiple records in the subform, but as soon as you click the
button on the main form, the subform loses focus. When it loses focus, the
multiple-record selection is lost. So, when your delete button's click event
fires, the desired selection in the subform has already been lost.

So, you cannot use a button on the form, but you can use a button on the
toolbar. In fact, this takes no effort at all. You just select the records
to be deleted, and click the Delete button in the toolbar to get rid of
them. And the button greys out by itself too! All without any coding.
 
Back
Top