Delete selected records in subform in Datasheet view

D

DrewTheFather

I have a form created that also uses a subform. In the main form, I select a
"user" from a combo box, and all the "groups" that the "user" belongs to are
displayed in the subform in the datasheet view.

In the datasheet view in the subform, I would like to select a single
record, or multiple records, (the records would then be highlighted), and
delete these selected records from a Delete button housed in the main form.

What would be the code to do this? I would ideally like to keep the
datasheet view which, from a little toyng around with, prevents a Delete
button in the subforms Footer section from being displayed, and to fit the
overall design schema of the forms, a Delete Button on the main form would be
ideal.

Thank in advance for the help,

DtF
 
A

Allen Browne

You cannot do that, because when you click any command button the
multiple-record selection is lost.

To get around that issue, use the Delete button in the toolbar instead of a
command button on the form.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top