G
Guest
I have a ListBox bound to a DataSet. I'd like to be able to select two or
more items in the ListBox and delete the corresponding records in the Access
table which serves as the data source.
I have figured out how to edit multiple records, by using a Do...Loop
construct to check each item in turn, test its state and edit it if it's
selected. But I couldn't make that approach work when deleting records,
because of course the number of records, and the index of each, changes every
time a record is deleted. I know about the For Each...Next construct and the
SelectedIndices collection, but I can't figure out how to use them to achieve
the goal. Any ideas, anybody?
more items in the ListBox and delete the corresponding records in the Access
table which serves as the data source.
I have figured out how to edit multiple records, by using a Do...Loop
construct to check each item in turn, test its state and edit it if it's
selected. But I couldn't make that approach work when deleting records,
because of course the number of records, and the index of each, changes every
time a record is deleted. I know about the For Each...Next construct and the
SelectedIndices collection, but I can't figure out how to use them to achieve
the goal. Any ideas, anybody?