I am trying to make it so it will just exit the sub if there is nothing else to be deleted.

Private Sub DeleteItem()
Dim j As String
Dim f As String

If rs.RecordCount <> 0 Then
Exit Sub
Else
f = MsgBox("Are you sure?", vbYesNo + vbExclamation, "Delete Current Item?") 'Confirms the deletion
If f = vbYes Then 'If Yes is clicked then it will delete the current item in lstserial
j = lstItems.SelectedItem.Text 'j is a string for the text in the lstserial
SelectData "List", "Applicaton", j 'This opens the data base and seaches for the selected item in the lstserial and deletes in the lstserial
On Error Resume Next
rs.Delete 'Deletes recordset in database
InitDB "List", "Db.mdb", "Applicaton" 'This indeacates what Database, the list and what name
Fill_ListView 'Fills lstserial with the records in the database
Else
Exit Sub
End If
End If
End Sub