>For i = 0 To (dv.Count - 1) > If Me.dgFileInfo.IsSelected(i) Then > dr = dv.Item(i).Row > strFileNumber = CType(dr("FileNumber"), String) > If strFileNumber = "" Then > dr.Delete() > Else > MessageBox.Show("Unable to delete file " & strFileNumber & ".") > End If >Next >>I noticed that if all the rows I select in the grid have a File Number (which means none of the selected rows will be deleted), this seems to work fine. A messagebox pops up x number of times telling me I can't delete file 'xyz'. However if all (or some) of the rows do not have a File Number this doesn't work correctly. Stepping through the code I see that the first File Number it hits which equals "", gets deleted (dr.Delete). Howevever after that, the If Me.dgFileInfo.IsSelected(i) check is never true again. I have tried various combinations of records selected in the grid and every time once a record has been deleted, the IsSelected check doesn't equal true anymore.