Hi,

I have a listview on a form and a textbox. When I enter text in the textbox and hit return it adds it to the listview - no problems so far.

I'm not trying to stop duplicates by checking the last row in the listview and if it's the same as the textbox then disregard it.

VB Code:
  1. If serials.ListItems.Item(serials.ListItems.Count).Text <> serialindiv.Text Then
  2.       serials.ListItems.Add , , serialindiv.Text
  3.    Else
  4.    End If

That's the code I am using now, and I've tried a few variations on it, but still cant get it to work.

Any help would be much appreciated.
Cheers,
Sparky.