Using Microsoft Access 97, I would like to create a custom delete button that will delete a set of records that was selected by the user. To do this, the user would open a form, in Datasheet view, use the record selector along the left side to choose the records they want deleted (by highlighting them), and finally, hit the custom delete button.
My problem is this: With the exception of the 'CurrentRecord', I don't know of any way to gain access to the OTHER records selected. Ideally, what I would like to have is a way to step through each record that was selected, and delete each one along the way. Is there anyway to do this? If the recordset object had an [ItemsSelected] property like the list box does, that would be great, but I can't seem to find anything like this.
If anybody has any suggestions on how I could do this, I would really appreciate it.
P.S. I tried the 'RunCommand acCmdDeleteRecord' option, however it still did not do what I wanted it to do. Any other suggestions would be appreciated.
My problem is this: With the exception of the 'CurrentRecord', I don't know of any way to gain access to the OTHER records selected. Ideally, what I would like to have is a way to step through each record that was selected, and delete each one along the way. Is there anyway to do this? If the recordset object had an [ItemsSelected] property like the list box does, that would be great, but I can't seem to find anything like this.
If anybody has any suggestions on how I could do this, I would really appreciate it.
P.S. I tried the 'RunCommand acCmdDeleteRecord' option, however it still did not do what I wanted it to do. Any other suggestions would be appreciated.